From bcba84aa6ff552c7af53baac8f5b4c318b89c40e Mon Sep 17 00:00:00 2001 From: Lesan <1960681385@qq.com> Date: Fri, 20 Dec 2024 11:27:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0ChildProcess=E7=BB=93?= =?UTF-8?q?=E6=9E=84=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/SimpleProcessDesignerV2/src/consts.ts | 11 ++++++++++- .../src/nodes-config/ChildProcessNodeConfig.vue | 9 ++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/components/SimpleProcessDesignerV2/src/consts.ts b/src/components/SimpleProcessDesignerV2/src/consts.ts index ae3cb9e2b..2c3b61541 100644 --- a/src/components/SimpleProcessDesignerV2/src/consts.ts +++ b/src/components/SimpleProcessDesignerV2/src/consts.ts @@ -104,7 +104,7 @@ export interface SimpleFlowNode { // 活动的状态,用于前端节点状态展示 activityStatus?: TaskStatusEnum // 调用子流程 - childProcess?: string + childProcess?: ChildProcess } // 候选人策略枚举 ( 用于审批节点。抄送节点 ) export enum CandidateStrategy { @@ -591,3 +591,12 @@ export enum ProcessTypeEnum { */ CHILD = 2 } + +/** + * 子流程结构定义 + */ +export type ChildProcess = { + processKey: string + processName: string +} + diff --git a/src/components/SimpleProcessDesignerV2/src/nodes-config/ChildProcessNodeConfig.vue b/src/components/SimpleProcessDesignerV2/src/nodes-config/ChildProcessNodeConfig.vue index 90d5d1365..4aaed5f1d 100644 --- a/src/components/SimpleProcessDesignerV2/src/nodes-config/ChildProcessNodeConfig.vue +++ b/src/components/SimpleProcessDesignerV2/src/nodes-config/ChildProcessNodeConfig.vue @@ -154,7 +154,10 @@ const saveConfig = async () => { (option) => option.key === configForm.value.childProcessKey ) currentNode.value.name = nodeName.value! - currentNode.value.childProcess = `${childInfo.key}:${childInfo.name}` + currentNode.value.childProcess = { + processKey: childInfo.key, + processName: childInfo.name + } currentNode.value.showText = `调用子流程:${childInfo.name}` if (configForm.value.multiInstance) { currentNode.value.candidateStrategy = CandidateStrategy.EXPRESSION @@ -176,8 +179,8 @@ const saveConfig = async () => { // 显示子流程节点配置, 由父组件传过来 const showChildProcessNodeConfig = (node: SimpleFlowNode) => { nodeName.value = node.name - if (node.childProcess && node.childProcess !== '') { - configForm.value.childProcessKey = node.childProcess.split(':')[0] + if (node.childProcess) { + configForm.value.childProcessKey = node.childProcess.processKey } if (node.candidateStrategy) { configForm.value.multiInstance = true