From dca54d0760afc1e5079caab13f9416d349e5933f Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 26 Oct 2024 21:30:59 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E5=AE=8C?= =?UTF-8?q?=E5=96=84=E3=80=91=E5=B7=A5=E4=BD=9C=E6=B5=81=EF=BC=9A=E5=AE=A1?= =?UTF-8?q?=E6=89=B9=E8=AF=A6=E6=83=85=E7=95=8C=E9=9D=A2=EF=BC=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=20end=20=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/svgs/bpm/end.svg | 1 + .../detail/ProcessInstanceTimeline.vue | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 src/assets/svgs/bpm/end.svg diff --git a/src/assets/svgs/bpm/end.svg b/src/assets/svgs/bpm/end.svg new file mode 100644 index 00000000..21bd3a30 --- /dev/null +++ b/src/assets/svgs/bpm/end.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue b/src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue index 7c87d55f..329eab53 100644 --- a/src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue +++ b/src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue @@ -131,6 +131,7 @@ 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<{ @@ -189,7 +190,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 +208,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 } } From d599134de662bdec7b1e29eda56c4ee0a463659a Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sat, 26 Oct 2024 22:55:28 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E5=AE=8C?= =?UTF-8?q?=E5=96=84=E3=80=91=E5=B7=A5=E4=BD=9C=E6=B5=81=EF=BC=9A=E5=AE=A1?= =?UTF-8?q?=E6=89=B9=E8=AF=A6=E6=83=85=20approve-nodes=20=3D>=20activity-n?= =?UTF-8?q?odes=20=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../processInstance/detail/ProcessInstanceTimeline.vue | 9 ++++++--- src/views/bpm/processInstance/detail/index.vue | 6 +++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue b/src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue index 329eab53..d2a7a357 100644 --- a/src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue +++ b/src/views/bpm/processInstance/detail/ProcessInstanceTimeline.vue @@ -3,7 +3,7 @@
审批意见:{{ task.reason }} @@ -135,7 +138,7 @@ import endSvg from '@/assets/svgs/bpm/end.svg' defineOptions({ name: 'BpmProcessInstanceTimeline' }) defineProps<{ - approveNodes: ProcessInstanceApi.ApprovalNodeInfo[] // 审批节点信息 + activityNodes: ProcessInstanceApi.ApprovalNodeInfo[] // 审批节点信息 }>() // 审批节点 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([]) /** * 设置表单权限 */