Explorar el Código

优化子流程展示提示

hubin hace 1 año
padre
commit
ff0ba73dd0

+ 14 - 4
src/views/approve/components/approvedContent.vue

@@ -73,12 +73,18 @@
 
 								<div v-show="active.type !== 0" class="timeline-box flex-1">
 									<span style="display: block" class="pl-1.5 mb-0">{{ active.taskName }}</span>
-									<span v-if="active.type === 22" class="text-gray-500 pl-1.5 mb-1">
-										调用子流程 [ {{ active.content.callProcess.split(':')[1] }} ]
-									</span>
 									<div class="flex flex-align-center">
 										<div class="timeline-box-user flex-1">
-											<span v-if="active.id" class="text-gray-500 pl-1.5">{{ active.createBy }}</span>
+											<span v-if="active.id" class="text-gray-500 pl-1.5">
+												{{ active.createBy }}
+											</span>
+											<span v-if="active.type === 22" class="text-gray-500">
+												<el-tooltip content="点击查看详情">
+													<a @click="lookSubProcess(active.content.callProcess.split(':')[0])">
+														发起的子流程( {{ active.content.callProcess.split(':')[1] }} )
+													</a>
+												</el-tooltip>
+											</span>
 											<div style="display: flex; gap: 6px; margin-top: 3px">
 												<FlowNodeAvatar v-for="nodeUser in active.local_nodeUserList" :key="nodeUser.id" :name="nodeUser.name" />
 												<FlowNodeAvatar v-for="nodeRole in active.local_nodeRoleList" :key="nodeRole.id" :name="nodeRole.name">
@@ -472,6 +478,10 @@ const getTaskDetail = () => {
 		})
 }
 
+const lookSubProcess = id => {
+	alert('子流程ID=' + id)
+}
+
 /**
  * 详情页面操作按钮回调
  */

+ 2 - 0
src/views/approve/components/approvedItem.vue

@@ -72,6 +72,8 @@
 								i.performType == 2 ? '会签' : i.performType == 3 ? '或签' : i.performType == 4 ? '票签' : ''
 							}}</el-text>
 
+							<el-tag v-if="i.processType === 'child'" type="warning" class="mr-1">子流程</el-tag>
+							<el-tag v-else-if="i.processType === 'business'" type="warning" class="mr-1">业务流程</el-tag>
 							<el-tag v-if="currentTaskType === 'pendingApproval'">待审批</el-tag>
 							<template v-else>
 								<el-tag v-if="i.instanceState === 0">审批中</el-tag>