4 changed files with 186 additions and 28 deletions
@ -0,0 +1,136 @@ |
|||||
|
<template> |
||||
|
<el-steps direction="vertical" finish-status="success" class="steps"> |
||||
|
<el-step |
||||
|
v-for="(item, index) in dataTo.child" |
||||
|
:key="index" |
||||
|
:status="item.isfinish == 2 ? 'success' : item.isfinish == 0 ? 'wait' : 'process'" |
||||
|
> |
||||
|
<template #title> |
||||
|
<div class="flex"> |
||||
|
<div> |
||||
|
{{ item.taskName }} |
||||
|
</div> |
||||
|
<div v-if="item.isfinish == 1"> |
||||
|
<a-button type="text" size="small" @click="handleShowprocess(item)"> |
||||
|
<template #icon> |
||||
|
<DownOutlined style="color: #0ac00d" /> |
||||
|
</template> |
||||
|
</a-button> |
||||
|
</div> |
||||
|
<div v-if="item.isfinish == 0"> |
||||
|
<a-button type="text" size="small" @click="handleShowprocess(item)"> |
||||
|
<template #icon> |
||||
|
<DownOutlined style="color: #0ac00d" /> |
||||
|
</template> |
||||
|
</a-button> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
<div> |
||||
|
{{ item.scheduledStartTime }} |
||||
|
</div> |
||||
|
<div> |
||||
|
{{ item.scheduledEndTime }} |
||||
|
</div> |
||||
|
<div v-if="item.showProcessDetail == true"> |
||||
|
<a-button |
||||
|
type="text" |
||||
|
size="small" |
||||
|
class="text-blue text-xs flex justify-end w-full" |
||||
|
@click="clickDetail(item)" |
||||
|
>详情</a-button |
||||
|
> |
||||
|
<div v-for="(process, index) in item.processDetail" class="flex text-black text-xs"> |
||||
|
<!-- 实心绿色圆球 --> |
||||
|
<div |
||||
|
class="rounded-full bg-green-500 h-3 w-3 mr-2 mt-0.5" |
||||
|
v-if="process.approvalStatue == 1" |
||||
|
></div> |
||||
|
<!-- 空心绿色圆圈 --> |
||||
|
<div |
||||
|
class="rounded-full border-2 border-green-500 h-3 w-3 mr-2 mt-0.5" |
||||
|
v-else-if="process.approvalStatue == 0 && process.isdangqian == 1" |
||||
|
></div> |
||||
|
<div class="rounded-full border-2 border-gray-300 h-3 w-3 mr-2 mt-0.5" v-else ></div> |
||||
|
|
||||
|
<div |
||||
|
v-if="process.approvalStatue == 0 && process.isdangqian == 0" |
||||
|
class="text-gray-300" |
||||
|
> |
||||
|
{{ process.taskName }} |
||||
|
</div> |
||||
|
<div v-else> |
||||
|
{{ process.taskName }} |
||||
|
</div> |
||||
|
<div |
||||
|
v-if="process.approvalStatue == 0 && process.isdangqian == 1" |
||||
|
class="ml-9 text-yellow-600" |
||||
|
> |
||||
|
{{ process.timedays }} |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
<template #description> |
||||
|
<childElstepchild v-if="item.children != null" :child="item.children"></childElstepchild> |
||||
|
</template> |
||||
|
</el-step> |
||||
|
</el-steps> |
||||
|
<planinfoFileDetail @register="registerFileInfo" /> |
||||
|
</template> |
||||
|
<script lang="ts" name="viewPlanDetail" setup> |
||||
|
import { defineProps, ref } from 'vue'; |
||||
|
import childElstepchild from './childElstepchild.vue'; |
||||
|
import { DownOutlined } from '@ant-design/icons-vue'; |
||||
|
import { getProcessDetailByPlaninfoid } from './projectPlan.api'; |
||||
|
import { useModal } from '@/components/Modal'; |
||||
|
import planinfoFileDetail from './planinfoFileDetail.vue'; |
||||
|
|
||||
|
const [registerFileInfo, { openModal: openFileInfo }] = useModal(); //文件上传和查看 |
||||
|
let dataTo = defineProps(['child']); |
||||
|
async function handleShowprocess(item) { |
||||
|
item['processDetail'] = await getProcessDetailByPlaninfoid({ planinfoid: item.id }); |
||||
|
|
||||
|
//更加id查询流程进度情况 |
||||
|
if (item['showProcessDetail']) { |
||||
|
item['showProcessDetail'] = !item['showProcessDetail']; |
||||
|
} else { |
||||
|
item['showProcessDetail'] = true; |
||||
|
} |
||||
|
console.log('processDetail', item.processDetail); |
||||
|
} |
||||
|
function clickDetail(item) { |
||||
|
openFileInfo(true, { |
||||
|
planinfoid: item.id, |
||||
|
taskName: item.taskName, |
||||
|
isfinish: item.isfinish, |
||||
|
projectid: item.projectId, |
||||
|
}); |
||||
|
} |
||||
|
</script> |
||||
|
<style lang="less" scoped> |
||||
|
@publicColor: #0ac00d; |
||||
|
@publicHeight: 35px; |
||||
|
.steps { |
||||
|
::v-deep .el-step { |
||||
|
.el-step__head.is-process { |
||||
|
color: @publicColor; |
||||
|
border-color: @publicColor; |
||||
|
} |
||||
|
.el-step__head.is-success { |
||||
|
color: @publicColor; |
||||
|
border-color: @publicColor; |
||||
|
} |
||||
|
.is-process .el-step__icon.is-text { |
||||
|
background: @publicColor; |
||||
|
color: #fff; |
||||
|
} |
||||
|
.el-step__title.is-process { |
||||
|
color: @publicColor; |
||||
|
} |
||||
|
.el-step__title.is-success { |
||||
|
color: @publicColor; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</style> |
Loading…
Reference in new issue