From cfbec5c44c297ad702cfb095dd08173ef39acb87 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 Date: Fri, 25 Oct 2024 18:27:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E6=B5=81=E5=A4=9A=E8=B7=AF=E5=8F=AC=E5=9B=9E=E8=8A=82=E7=82=B9?= =?UTF-8?q?=E6=A3=80=E7=B4=A2=E9=97=AE=E9=A2=98=E4=B8=8B=E6=8B=89=E6=A1=86?= =?UTF-8?q?=E4=B8=AD=E6=9C=89=E5=A4=9A=E4=B8=AA=E9=87=8D=E5=A4=8D=E8=8A=82?= =?UTF-8?q?=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/workflow/common/NodeCascader.vue | 26 +++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/ui/src/workflow/common/NodeCascader.vue b/ui/src/workflow/common/NodeCascader.vue index ab9bf5eb6..272bc11c2 100644 --- a/ui/src/workflow/common/NodeCascader.vue +++ b/ui/src/workflow/common/NodeCascader.vue @@ -59,18 +59,20 @@ function _getIncomingNode(id: String, startId: String, value: Array) { if (list.length > 0) { list.forEach((item: any) => { if (!value.some((obj: any) => obj.id === item.id)) { - value.unshift({ - value: item.id, - label: item.properties.stepName, - type: item.type, - children: item.properties?.config?.fields || [] - }) - if (item.properties?.globalFields && item.type === 'start-node') { - firstElement = { - value: 'global', - label: '全局变量', - type: 'global', - children: item.properties?.config?.globalFields || [] + if (!value.some((value_item) => value_item.value === item.id)) { + value.unshift({ + value: item.id, + label: item.properties.stepName, + type: item.type, + children: item.properties?.config?.fields || [] + }) + if (item.properties?.globalFields && item.type === 'start-node') { + firstElement = { + value: 'global', + label: '全局变量', + type: 'global', + children: item.properties?.config?.globalFields || [] + } } } }