From b892637e54049c743b77402455a90ec53ca0b206 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jack=E9=AD=8F?= Date: Sat, 13 Sep 2025 16:56:54 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E8=BF=9E=E7=BA=BF=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E4=BF=AE=E5=A4=8D=EF=BC=8C=E7=BC=96=E8=BE=91=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/createapp/components/workFlow.vue | 3 ++ .../workFlowConfig/yamlEditDrawer.vue | 53 ++++++++++--------- 2 files changed, 31 insertions(+), 25 deletions(-) diff --git a/src/views/createapp/components/workFlow.vue b/src/views/createapp/components/workFlow.vue index 9becaca..3958b2d 100644 --- a/src/views/createapp/components/workFlow.vue +++ b/src/views/createapp/components/workFlow.vue @@ -607,6 +607,9 @@ const updateNodeFunc = (id, status, constTime, content?, resultData?) => { changeTargetEdges.forEach((item) => { if (branchId === item.branchId) { updateEdgeData(item.id, { targetStatus: status }); + } else if (item.data.sourceStatus === 'success') { + // end的情况 + updateEdgeData(item.id, { targetStatus: item.data.sourceStatus }); } }); } else { diff --git a/src/views/createapp/components/workFlowConfig/yamlEditDrawer.vue b/src/views/createapp/components/workFlowConfig/yamlEditDrawer.vue index 82a74cc..8c9063a 100644 --- a/src/views/createapp/components/workFlowConfig/yamlEditDrawer.vue +++ b/src/views/createapp/components/workFlowConfig/yamlEditDrawer.vue @@ -620,34 +620,37 @@ watch( ); yamlExpress.value[2].yamlCode = props.yamlContent.output_parameters; - // 获取需要处理的 choices(倒序、过滤掉 is_default 为 true 的、只保留有条件的) - const processedChoices = props.yamlContent.input_parameters.choices - .slice() - .reverse() - .filter((choice) => !choice.is_default && choice.conditions.length > 0); + let inputParameters = props.yamlContent.input_parameters; + if (inputParameters.choices) { + // 获取需要处理的 choices(倒序、过滤掉 is_default 为 true 的、只保留有条件的) + const processedChoices = inputParameters.choices + .slice() + .reverse() + .filter((choice) => !choice.is_default && choice.conditions.length > 0); - // 初始化 paramoperateList.value,为每个需要处理的 choice 预先创建一个空数组 - // 这样后续异步回调中就能通过索引安全地访问和 push - paramoperateList.value = processedChoices.map(() => []); + // 初始化 paramoperateList.value,为每个需要处理的 choice 预先创建一个空数组 + // 这样后续异步回调中就能通过索引安全地访问和 push + paramoperateList.value = processedChoices.map(() => []); - // 如果input_parameters有值,则初始化 左值,paramoperateList选择项添加 - processedChoices.forEach((item, index) => { - if (!item.is_default) { - if (item.conditions.length > 0) { - item.conditions.forEach((conditionItem, conditionIndex) => { - let paramType = conditionItem.left.type; - if (paramType) { - api - .queryParameterOperate({ ParamType: paramType }) - .then((res) => { - paramoperateList.value[index].push(res?.[1]?.result); - }) - .catch((err) => [console.error(err)]); - } - }); + // 如果input_parameters有值,则初始化 左值,paramoperateList选择项添加 + processedChoices.forEach((item, index) => { + if (!item.is_default) { + if (item.conditions.length > 0) { + item.conditions.forEach((conditionItem, conditionIndex) => { + let paramType = conditionItem.left.type; + if (paramType) { + api + .queryParameterOperate({ ParamType: paramType }) + .then((res) => { + paramoperateList.value[index].push(res?.[1]?.result); + }) + .catch((err) => [console.error(err)]); + } + }); + } } - } - }); + }); + } }, { deep: true, immediate: true }, ); -- Gitee