3
3
<el-timeline class =" pt-20px" >
4
4
<!-- 遍历每个审批节点 -->
5
5
<el-timeline-item
6
- v-for =" (activity, index) in approveNodes "
6
+ v-for =" (activity, index) in activityNodes "
7
7
:key =" index"
8
8
size =" large"
9
9
:icon =" getApprovalNodeIcon(activity.status, activity.nodeType)"
107
107
</div >
108
108
</div >
109
109
<div
110
- v-if =" task.reason && activity.nodeType === NodeType.USER_TASK_NODE"
110
+ v-if ="
111
+ task.reason &&
112
+ [NodeType.USER_TASK_NODE, NodeType.END_EVENT_NODE].includes(activity.nodeType)
113
+ "
111
114
class =" text-#a5a5a5 text-13px mt-1 w-full bg-#f8f8fa p2 rounded-md"
112
115
>
113
116
审批意见:{{ task.reason }}
@@ -131,10 +134,11 @@ import auditorSvg from '@/assets/svgs/bpm/auditor.svg'
131
134
import copySvg from ' @/assets/svgs/bpm/copy.svg'
132
135
import conditionSvg from ' @/assets/svgs/bpm/condition.svg'
133
136
import parallelSvg from ' @/assets/svgs/bpm/parallel.svg'
137
+ import endSvg from ' @/assets/svgs/bpm/end.svg'
134
138
135
139
defineOptions ({ name: ' BpmProcessInstanceTimeline' })
136
140
defineProps <{
137
- approveNodes : ProcessInstanceApi .ApprovalNodeInfo [] // 审批节点信息
141
+ activityNodes : ProcessInstanceApi .ApprovalNodeInfo [] // 审批节点信息
138
142
}>()
139
143
140
144
// 审批节点
@@ -189,7 +193,9 @@ const nodeTypeSvgMap = {
189
193
// 条件分支节点
190
194
[NodeType .CONDITION_NODE ]: { color: ' #14bb83' , svg: conditionSvg },
191
195
// 并行分支节点
192
- [NodeType .PARALLEL_BRANCH_NODE ]: { color: ' #14bb83' , svg: parallelSvg }
196
+ [NodeType .PARALLEL_BRANCH_NODE ]: { color: ' #14bb83' , svg: parallelSvg },
197
+ // 结束节点
198
+ [NodeType .END_EVENT_NODE ]: { color: ' #ffffff' , svg: endSvg }
193
199
}
194
200
195
201
// 只有只有状态是 -1、0、1 才展示头像右小角状态小icon
@@ -205,7 +211,11 @@ const getApprovalNodeIcon = (taskStatus: number, nodeType: NodeType) => {
205
211
return statusIconMap [taskStatus ]?.icon
206
212
}
207
213
208
- if (nodeType === NodeType .START_USER_NODE || nodeType === NodeType .USER_TASK_NODE ) {
214
+ if (
215
+ nodeType === NodeType .START_USER_NODE ||
216
+ nodeType === NodeType .USER_TASK_NODE ||
217
+ nodeType === NodeType .END_EVENT_NODE
218
+ ) {
209
219
return statusIconMap [taskStatus ]?.icon
210
220
}
211
221
}
0 commit comments