From 1ec8cce63e0efdab43baf0218a4dd204b44c201d Mon Sep 17 00:00:00 2001 From: sjl <1716605279@qq.com> Date: Wed, 13 Aug 2025 10:06:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E6=97=B6=E6=95=B0=E6=8D=AE=E5=AF=B9?= =?UTF-8?q?=E9=BD=90=EF=BC=8C=E4=BF=AE=E6=94=B9=E6=88=90=E6=A0=87=E5=87=86?= =?UTF-8?q?=E5=AF=B9=E5=BA=94=E8=A2=AB=E6=A3=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../home/components/deviceConnectionPopup.vue | 14 +- .../home/components/realTimeDataAlign.vue | 271 ++++-------------- 2 files changed, 67 insertions(+), 218 deletions(-) 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 @@
- + + :key="channel.stdDevNum" + :label="`通道${channel.stdDevNum}`" + :value="`通道${channel.stdDevNum}`"> - 被检设备:{{ deviceName }}-{{ selectedChannels[deviceName] }} ---> 标准设备:{{ formatStandardChannelLabel(getMappedStandardChannel(deviceName, selectedChannels[deviceName])) }} + 标准设备:{{ deviceName }}-{{ selectedChannels[deviceName] }} ---> 被检设备:{{ formatDutChannelLabel(getMappedDutChannel(deviceName, selectedChannels[deviceName])) }} 导出数据 @@ -44,17 +44,17 @@ :style="{ height: '400px',maxHeight: '400px',overflow:'hidden'}"> + + + + + + - - - - - - @@ -63,7 +63,7 @@