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 @@