diff --git a/frontend/src/views/home/components/deviceConnectionPopup.vue b/frontend/src/views/home/components/deviceConnectionPopup.vue index 455271d..280ab51 100644 --- a/frontend/src/views/home/components/deviceConnectionPopup.vue +++ b/frontend/src/views/home/components/deviceConnectionPopup.vue @@ -268,17 +268,17 @@ const generateChannelMapping = () => { const sourceDeviceText = sourceDeviceNode.data.label.children[1].children const targetDeviceText = targetDeviceNode.data.label.children[1].children - // 构造键名 - const sourceKey = `${sourceDeviceText}`.replace('设备名称:', '') - const targetValue = `${targetDeviceText}通道${targetChannel}`.replace('设备名称:', '') + // 构造键名 - 现在以标准设备为键 + const targetKey = `${targetDeviceText}`.replace('设备名称:', '') + const sourceValue = `${sourceDeviceText}通道${sourceChannel}`.replace('设备名称:', '') // 初始化对象 - if (!mapping[sourceKey]) { - mapping[sourceKey] = {} + if (!mapping[targetKey]) { + mapping[targetKey] = {} } - // 添加映射关系 - mapping[sourceKey][`通道${sourceChannel}`] = targetValue + // 添加映射关系 - 标准设备通道 -> 被检设备信息 + mapping[targetKey][`通道${targetChannel}`] = sourceValue } }) diff --git a/frontend/src/views/home/components/realTimeDataAlign.vue b/frontend/src/views/home/components/realTimeDataAlign.vue index e40d6e0..0f32ca6 100644 --- a/frontend/src/views/home/components/realTimeDataAlign.vue +++ b/frontend/src/views/home/components/realTimeDataAlign.vue @@ -17,7 +17,7 @@