审批意见:{{ task.reason }}
@@ -131,10 +134,11 @@ import auditorSvg from '@/assets/svgs/bpm/auditor.svg'
import copySvg from '@/assets/svgs/bpm/copy.svg'
import conditionSvg from '@/assets/svgs/bpm/condition.svg'
import parallelSvg from '@/assets/svgs/bpm/parallel.svg'
+import endSvg from '@/assets/svgs/bpm/end.svg'
defineOptions({ name: 'BpmProcessInstanceTimeline' })
defineProps<{
- approveNodes: ProcessInstanceApi.ApprovalNodeInfo[] // 审批节点信息
+ activityNodes: ProcessInstanceApi.ApprovalNodeInfo[] // 审批节点信息
}>()
// 审批节点
@@ -189,7 +193,9 @@ const nodeTypeSvgMap = {
// 条件分支节点
[NodeType.CONDITION_NODE]: { color: '#14bb83', svg: conditionSvg },
// 并行分支节点
- [NodeType.PARALLEL_BRANCH_NODE]: { color: '#14bb83', svg: parallelSvg }
+ [NodeType.PARALLEL_BRANCH_NODE]: { color: '#14bb83', svg: parallelSvg },
+ // 结束节点
+ [NodeType.END_EVENT_NODE]: { color: '#ffffff', svg: endSvg }
}
// 只有只有状态是 -1、0、1 才展示头像右小角状态小icon
@@ -205,7 +211,11 @@ const getApprovalNodeIcon = (taskStatus: number, nodeType: NodeType) => {
return statusIconMap[taskStatus]?.icon
}
- if (nodeType === NodeType.START_USER_NODE || nodeType === NodeType.USER_TASK_NODE) {
+ if (
+ nodeType === NodeType.START_USER_NODE ||
+ nodeType === NodeType.USER_TASK_NODE ||
+ nodeType === NodeType.END_EVENT_NODE
+ ) {
return statusIconMap[taskStatus]?.icon
}
}
diff --git a/src/views/bpm/processInstance/detail/index.vue b/src/views/bpm/processInstance/detail/index.vue
index ab04d4a9..6a1d7425 100644
--- a/src/views/bpm/processInstance/detail/index.vue
+++ b/src/views/bpm/processInstance/detail/index.vue
@@ -65,7 +65,7 @@
-
+
@@ -229,7 +229,7 @@ const getApprovalDetail = async () => {
}
// 获取审批节点,显示 Timeline 的数据
- approveNodes.value = data.approveNodes
+ activityNodes.value = data.activityNodes
// 获取待办任务显示操作按钮
operationButtonRef.value?.loadTodoTask(data.todoTask)
@@ -239,7 +239,7 @@ const getApprovalDetail = async () => {
}
// 审批节点信息
-const approveNodes = ref
([])
+const activityNodes = ref([])
/**
* 设置表单权限
*/