Browse Source

BPM:增加 task 的审批建议

YunaiV 1 năm trước cách đây
mục cha
commit
60ddc45b9b

+ 0 - 6
src/views/bpm/processInstance/detail/ProcessInstanceBpmnViewer.vue

@@ -33,12 +33,6 @@ const bpmnControlForm = ref({
   prefix: 'flowable'
 })
 const activityList = ref([]) // 任务列表
-// const bpmnXML = computed(() => { // TODO 芋艿:不晓得为啊哈不能这么搞
-//   if (!props.processInstance || !props.processInstance.processDefinition) {
-//     return
-//   }
-//   return DefinitionApi.getProcessDefinitionBpmnXML(props.processInstance.processDefinition.id)
-// })
 
 /** 初始化 */
 onMounted(async () => {

+ 3 - 4
src/views/bpm/processInstance/detail/ProcessInstanceTaskList.vue

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

+ 0 - 3
src/views/bpm/processInstance/detail/index.vue

@@ -302,9 +302,6 @@ const loadRunningTask = (tasks) => {
       loadRunningTask(task.children)
     }
     // 2.1 只有待处理才需要
-    // if (task.status !== 1 && task.status !== 6) {
-    //   return
-    // }
     if (task.status !== 1 && task.status !== 6) {
       return
     }

+ 5 - 4
src/views/bpm/task/done/index.vue

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