Skip to content

Commit cfbec5c

Browse files
committed
fix: 修复工作流多路召回节点检索问题下拉框中有多个重复节点
1 parent 8b71e03 commit cfbec5c

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

ui/src/workflow/common/NodeCascader.vue

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,20 @@ function _getIncomingNode(id: String, startId: String, value: Array<any>) {
5959
if (list.length > 0) {
6060
list.forEach((item: any) => {
6161
if (!value.some((obj: any) => obj.id === item.id)) {
62-
value.unshift({
63-
value: item.id,
64-
label: item.properties.stepName,
65-
type: item.type,
66-
children: item.properties?.config?.fields || []
67-
})
68-
if (item.properties?.globalFields && item.type === 'start-node') {
69-
firstElement = {
70-
value: 'global',
71-
label: '全局变量',
72-
type: 'global',
73-
children: item.properties?.config?.globalFields || []
62+
if (!value.some((value_item) => value_item.value === item.id)) {
63+
value.unshift({
64+
value: item.id,
65+
label: item.properties.stepName,
66+
type: item.type,
67+
children: item.properties?.config?.fields || []
68+
})
69+
if (item.properties?.globalFields && item.type === 'start-node') {
70+
firstElement = {
71+
value: 'global',
72+
label: '全局变量',
73+
type: 'global',
74+
children: item.properties?.config?.globalFields || []
75+
}
7476
}
7577
}
7678
}

0 commit comments

Comments
 (0)