Skip to content

Commit 00d804d

Browse files
committed
fix(ConditionBox.vue): improve node matching logic and streamline database type assignment
1 parent 1c516d6 commit 00d804d

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

packages/business/src/views/verification/components/ConditionBox.vue

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,12 @@ const handleChangeTable = (
909909
return
910910
}
911911
912-
if (matchNode.target === item[type].nodeId) {
912+
const temp = {
913+
source: 'target',
914+
target: 'source',
915+
}
916+
917+
if (matchNode[temp[type]] === item[type].nodeId) {
913918
matchNode = getReverseNodeInfo(matchNode)
914919
}
915920
const {
@@ -934,11 +939,11 @@ const handleChangeTable = (
934939
item.target.databaseType = targetDatabaseType
935940
return
936941
}
937-
// 自动填充目标连接和表
938-
item.source.databaseType = sourceDatabaseType
939942
943+
item.source.databaseType = sourceDatabaseType
940944
item.target.nodeId = target
941945
item.target.nodeName = targetName
946+
item.target.databaseType = targetDatabaseType
942947
item.target.connectionId = targetConnectionId
943948
item.target.connectionName = targetConnectionName
944949
item.target.currentLabel = `${targetName} / ${targetConnectionName}`

0 commit comments

Comments
 (0)