实时数据对齐,修改成标准对应被检
This commit is contained in:
@@ -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
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user