From 4c4d13cdd0a056c6d5cb803c240f721642f61970 Mon Sep 17 00:00:00 2001 From: jason <2667446@qq.com> Date: Sun, 24 Mar 2024 20:35:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E9=80=A0=E5=AE=A1=E6=89=B9=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE.=20=E6=95=B4=E5=90=88=E7=B3=BB=E7=BB=9F=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E4=BB=BB=E5=8A=A1=E7=9A=84=E5=80=99=E9=80=89=E4=BA=BA?= =?UTF-8?q?=E7=AD=96=E7=95=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SimpleProcessDesigner/src/addNode.vue | 39 ++- .../SimpleProcessDesigner/src/consts.ts | 47 +++ .../src/drawer/approverDrawer.vue | 311 ++++++++++++++++++ .../SimpleProcessDesigner/src/nodeWrap.vue | 157 +++++---- .../SimpleProcessDesigner/src/util.ts | 29 ++ src/store/modules/simpleWorkflow.ts | 6 +- src/views/bpm/simpleWorkflow/index.vue | 23 +- 7 files changed, 538 insertions(+), 74 deletions(-) create mode 100644 src/components/SimpleProcessDesigner/src/consts.ts create mode 100644 src/components/SimpleProcessDesigner/src/drawer/approverDrawer.vue diff --git a/src/components/SimpleProcessDesigner/src/addNode.vue b/src/components/SimpleProcessDesigner/src/addNode.vue index 6d09ae8a..9686165c 100644 --- a/src/components/SimpleProcessDesigner/src/addNode.vue +++ b/src/components/SimpleProcessDesigner/src/addNode.vue @@ -32,7 +32,7 @@ - + diff --git a/src/components/SimpleProcessDesigner/src/nodeWrap.vue b/src/components/SimpleProcessDesigner/src/nodeWrap.vue index 3c9d5eb1..ecfbdfec 100644 --- a/src/components/SimpleProcessDesigner/src/nodeWrap.vue +++ b/src/components/SimpleProcessDesigner/src/nodeWrap.vue @@ -6,40 +6,48 @@ * @FilePath: /Workflow-Vue3/src/components/nodeWrap.vue --> - + diff --git a/src/components/SimpleProcessDesigner/src/util.ts b/src/components/SimpleProcessDesigner/src/util.ts index f4acd76c..ae72bce0 100644 --- a/src/components/SimpleProcessDesigner/src/util.ts +++ b/src/components/SimpleProcessDesigner/src/util.ts @@ -1,3 +1,6 @@ +// @ts-ignore +import { DictDataVO } from '@/api/system/dict/types' +import { DICT_TYPE, getDictLabel } from '@/utils/dict' /** * todo */ @@ -51,6 +54,32 @@ export const setApproverStr = (nodeConfig: any) => { } } + +export const approveMethods: DictDataVO [] = [ + { label: '单人审批', value: 1 }, + { label: '多人审批(所有人审批通过)', value: 2 } + // TODO 更多的类型 +]; + +export const getApproverShowText = (approveMethod :number, candidateStrategy: number) => { + if(approveMethod && candidateStrategy) { + let appoveMethodText = '' + approveMethods.forEach((item) => { + if (item.value == approveMethod) { + appoveMethodText = item.label + } + }) + const strategyText = getDictLabel( + DICT_TYPE.BPM_TASK_CANDIDATE_STRATEGY, + candidateStrategy + ) + return `审批方式:${appoveMethodText}
+ 审批人规则类型:按${strategyText}` + } else { + return '' + } +} + export const copyerStr = (nodeConfig: any) => { if (nodeConfig.nodeUserList.length != 0) { return arrToStr(nodeConfig.nodeUserList) diff --git a/src/store/modules/simpleWorkflow.ts b/src/store/modules/simpleWorkflow.ts index cf98538d..dbeff606 100644 --- a/src/store/modules/simpleWorkflow.ts +++ b/src/store/modules/simpleWorkflow.ts @@ -14,7 +14,8 @@ export const useWorkFlowStore = defineStore('simpleWorkflow', { conditionDrawer: false, conditionsConfig1: { conditionNodes: [] - } + }, + userTaskConfig: {} }), actions: { setTableId(payload) { @@ -46,6 +47,9 @@ export const useWorkFlowStore = defineStore('simpleWorkflow', { }, setConditionsConfig(payload) { this.conditionsConfig1 = payload + }, + setUserTaskConfig(payload) { + this.userTaskConfig = payload } } }) diff --git a/src/views/bpm/simpleWorkflow/index.vue b/src/views/bpm/simpleWorkflow/index.vue index 144615e0..89132787 100644 --- a/src/views/bpm/simpleWorkflow/index.vue +++ b/src/views/bpm/simpleWorkflow/index.vue @@ -1,6 +1,13 @@