From 00d804db296759d174b10440a120a35ce1e913ca Mon Sep 17 00:00:00 2001 From: Feynman Date: Mon, 8 Sep 2025 10:35:55 +0800 Subject: [PATCH] fix(ConditionBox.vue): improve node matching logic and streamline database type assignment --- .../views/verification/components/ConditionBox.vue | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/business/src/views/verification/components/ConditionBox.vue b/packages/business/src/views/verification/components/ConditionBox.vue index 7e5a359c4..1a2766acc 100644 --- a/packages/business/src/views/verification/components/ConditionBox.vue +++ b/packages/business/src/views/verification/components/ConditionBox.vue @@ -909,7 +909,12 @@ const handleChangeTable = ( return } - if (matchNode.target === item[type].nodeId) { + const temp = { + source: 'target', + target: 'source', + } + + if (matchNode[temp[type]] === item[type].nodeId) { matchNode = getReverseNodeInfo(matchNode) } const { @@ -934,11 +939,11 @@ const handleChangeTable = ( item.target.databaseType = targetDatabaseType return } - // 自动填充目标连接和表 - item.source.databaseType = sourceDatabaseType + item.source.databaseType = sourceDatabaseType item.target.nodeId = target item.target.nodeName = targetName + item.target.databaseType = targetDatabaseType item.target.connectionId = targetConnectionId item.target.connectionName = targetConnectionName item.target.currentLabel = `${targetName} / ${targetConnectionName}`