11
11
>
12
12
<div class =" flex flex-col items-start" >
13
13
<div class =" font-bold" > {{ activity.name }}</div >
14
- <div class =" flex items-center mt-1" >
14
+ <div class =" flex items-center flex-wrap mt-1 " >
15
15
<!-- 情况一:遍历每个审批节点下的【进行中】task 任务 -->
16
16
<div v-for =" (task, idx) in activity.tasks" :key =" idx" class =" flex items-center" >
17
17
<div class =" flex flex-col pr-2" >
18
18
<div class =" position-relative" v-if =" task.assigneeUser || task.ownerUser" >
19
19
<!-- 信息:头像 -->
20
- <el-avatar
21
- :size =" 36"
22
- v-if =" task.assigneeUser && task.assigneeUser.avatar"
23
- :src =" task.assigneeUser.avatar"
24
- />
25
- <el-avatar v-else-if =" task.assigneeUser && task.assigneeUser.nickname" >
26
- {{ task.assigneeUser.nickname.substring(0, 1) }}
27
- </el-avatar >
28
- <el-avatar
29
- v-else-if =" task.ownerUser && task.ownerUser.avatar"
30
- :src =" task.ownerUser.avatar"
31
- />
32
- <el-avatar v-else-if =" task.ownerUser && task.ownerUser.nickname" >
33
- {{ task.ownerUser.nickname.substring(0, 1) }}
34
- </el-avatar >
20
+ <el-tooltip :content =" task.reason" placement =" bottom" v-if =" task.assigneeUser && task.assigneeUser.avatar" effect =" light" >
21
+ <el-avatar
22
+ :size =" 36"
23
+ :src =" task.assigneeUser.avatar"
24
+ />
25
+ </el-tooltip >
26
+ <el-tooltip :content =" task.reason" placement =" bottom" v-else-if =" task.assigneeUser && task.assigneeUser.nickname" effect =" light" >
27
+ <el-avatar >
28
+ {{ task.assigneeUser.nickname.substring(0, 1) }}
29
+ </el-avatar >
30
+ </el-tooltip >
31
+ <el-tooltip :content =" task.reason" placement =" bottom" v-else-if =" task.ownerUser && task.ownerUser.avatar" effect =" light" >
32
+ <el-avatar :src =" task.ownerUser.avatar" />
33
+ </el-tooltip >
34
+ <el-tooltip :content =" task.reason" placement =" bottom" v-else-if =" task.ownerUser && task.ownerUser.nickname" effect =" light" >
35
+ <el-avatar >
36
+ {{ task.ownerUser.nickname.substring(0, 1) }}
37
+ </el-avatar >
38
+ </el-tooltip >
35
39
<!-- 信息:任务 ICON -->
36
40
<div
37
41
class =" position-absolute top-26px left-26px bg-#fff rounded-full flex items-center p-2px"
57
61
>
58
62
{{ task.ownerUser.nickname }}
59
63
</div >
64
+ <!--
60
65
<div v-if="task.reason" class="text-#a5a5a5 my-4px text-12px flex items-center w-100%">
61
66
<div
62
67
:title="task.reason"
65
70
{{ task.reason }}
66
71
</div>
67
72
</div>
73
+ -->
68
74
</div >
69
75
</div >
70
76
</div >
@@ -134,25 +140,6 @@ import { TaskStatusEnum } from '@/api/bpm/task'
134
140
import { NodeType } from ' @/components/SimpleProcessDesignerV2/src/consts'
135
141
import { Check , Close , Loading , Clock , Minus , Delete } from ' @element-plus/icons-vue'
136
142
defineOptions ({ name: ' BpmProcessInstanceTimeline' })
137
- // const props = defineProps({
138
- // // 流程实例编号
139
- // processInstanceId: {
140
- // type: String,
141
- // required: false,
142
- // default: ''
143
- // },
144
- // // 流程定义编号
145
- // processDefinitionId: {
146
- // type: String,
147
- // required: false,
148
- // default: ''
149
- // },
150
- // approveNodes : {
151
- // type: ProcessInstanceApi.ApprovalNodeInfo[],
152
- // required: false,
153
- // default: ''
154
- // }
155
- // })
156
143
defineProps <{
157
144
approveNodes: ProcessInstanceApi .ApprovalNodeInfo [] // 审批节点信息
158
145
}>()
@@ -201,15 +188,6 @@ const statusIconMap = {
201
188
' 7' : { color: ' #00b32a' , icon: Check }
202
189
}
203
190
204
- /** 获得审批详情 */
205
- // const getApprovalDetail = async () => {
206
- // const data = await ProcessInstanceApi.getApprovalDetail(
207
- // props.processInstanceId,
208
- // props.processDefinitionId
209
- // )
210
- // approveNodes.value = data.approveNodes
211
- // }
212
-
213
191
const getApprovalNodeIcon = (taskStatus : number , nodeType : NodeType ) => {
214
192
if (taskStatus == TaskStatusEnum .NOT_START ) {
215
193
return statusIconMap [taskStatus ]?.icon
@@ -232,15 +210,4 @@ const getApprovalNodeTime = (node: ProcessInstanceApi.ApprovalNodeInfo) => {
232
210
return ` 创建时间:${formatDate (node .startTime )} `
233
211
}
234
212
}
235
-
236
- /** 重新刷新审批详情 */
237
- // const refresh = () => {
238
- // getApprovalDetail()
239
- // }
240
-
241
- // defineExpose({ refresh })
242
-
243
- // onMounted(async () => {
244
- // await getApprovalDetail()
245
- // })
246
213
</script >
0 commit comments