BPM:增加 task 的审批建议

This commit is contained in:
YunaiV 2024-03-18 18:41:11 +08:00
parent 03b8bd5e22
commit 60ddc45b9b
4 changed files with 9 additions and 18 deletions

View File

@ -33,12 +33,6 @@ const bpmnControlForm = ref({
prefix: 'flowable' prefix: 'flowable'
}) })
const activityList = ref([]) // const activityList = ref([]) //
// const bpmnXML = computed(() => { // TODO
// if (!props.processInstance || !props.processInstance.processDefinition) {
// return
// }
// return DefinitionApi.getProcessDefinitionBpmnXML(props.processInstance.processDefinition.id)
// })
/** 初始化 */ /** 初始化 */
onMounted(async () => { onMounted(async () => {

View File

@ -3,7 +3,7 @@
<template #header> <template #header>
<span class="el-icon-picture-outline">审批记录</span> <span class="el-icon-picture-outline">审批记录</span>
</template> </template>
<el-col :offset="4" :span="16"> <el-col :offset="3" :span="17">
<div class="block"> <div class="block">
<el-timeline> <el-timeline>
<el-timeline-item <el-timeline-item
@ -20,8 +20,7 @@
v-if="!isEmpty(item.children)" v-if="!isEmpty(item.children)"
@click="openChildrenTask(item)" @click="openChildrenTask(item)"
> >
<Icon icon="ep:memo" /> <Icon icon="ep:memo" /> 子任务
子任务
</el-button> </el-button>
</p> </p>
<el-card :body-style="{ padding: '10px' }"> <el-card :body-style="{ padding: '10px' }">
@ -92,7 +91,7 @@ const getTimelineItemIcon = (item) => {
} }
/** 获得任务对应的颜色 */ /** 获得任务对应的颜色 */
const getTimelineItemType = (item) => { const getTimelineItemType = (item: any) => {
if (item.status === 1) { if (item.status === 1) {
return 'primary' return 'primary'
} }

View File

@ -302,9 +302,6 @@ const loadRunningTask = (tasks) => {
loadRunningTask(task.children) loadRunningTask(task.children)
} }
// 2.1 // 2.1
// if (task.status !== 1 && task.status !== 6) {
// return
// }
if (task.status !== 1 && task.status !== 6) { if (task.status !== 1 && task.status !== 6) {
return return
} }

View File

@ -75,16 +75,17 @@
prop="endTime" prop="endTime"
width="180" width="180"
/> />
<el-table-column align="center" label="审批状态" prop="status" width="120">
<template #default="scope">
<dict-tag :type="DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column align="center" label="审批建议" prop="reason" min-width="180" />
<el-table-column align="center" label="耗时" prop="durationInMillis" width="120"> <el-table-column align="center" label="耗时" prop="durationInMillis" width="120">
<template #default="scope"> <template #default="scope">
{{ formatPast2(scope.row.durationInMillis) }} {{ formatPast2(scope.row.durationInMillis) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="审批状态" prop="status" width="100">
<template #default="scope">
<dict-tag :type="DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column align="center" label="流程编号" prop="id" :show-overflow-tooltip="true" /> <el-table-column align="center" label="流程编号" prop="id" :show-overflow-tooltip="true" />
<el-table-column align="center" label="任务编号" prop="id" :show-overflow-tooltip="true" /> <el-table-column align="center" label="任务编号" prop="id" :show-overflow-tooltip="true" />
<el-table-column align="center" label="操作" fixed="right" width="80"> <el-table-column align="center" label="操作" fixed="right" width="80">