调整mapDevice数据

This commit is contained in:
zyy 2020-12-09 10:38:46 +08:00
parent d5925c305b
commit a71217220a

View File

@ -216,8 +216,8 @@ export function parser(data, skinCode, showConfig) {
zrUtil.each(data.indicatorLightList || [], elem => {
mapDevice[elem.code] = createDevice(elem.type, elem, propConvert, showConfig);
if (elem.type == 'SwitchFault') {
mapDevice[elem.switchCode].switchFaultCode = elem.code; // 道岔数据上关联道岔故障表示灯需保证该数据在switchList之后处理
if (elem.type == 'SwitchFault' && mapDevice[elem.switchCode]) {
mapDevice[elem.switchCode]['switchFaultCode'] = elem.code; // 道岔数据上关联道岔故障表示灯需保证该数据在switchList之后处理
}
}, this);