实时数据对齐,修改成标准对应被检

This commit is contained in:
sjl
2025-08-13 10:06:55 +08:00
parent 865d52c135
commit 1ec8cce63e
2 changed files with 67 additions and 218 deletions

View File

@@ -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
}
})