问题数据兼容调整

This commit is contained in:
fan 2020-09-28 09:42:20 +08:00
parent 7a37e5cf5e
commit abc2ef4e62

View File

@ -63,7 +63,11 @@ export function parser(data, skinCode, showConfig) {
if (elem.type == '02' || elem.type == '03') { if (elem.type == '02' || elem.type == '03') {
mapDevice[elem.code].parentName = mapDevice[elem.parentCode] ? mapDevice[elem.parentCode].name : ''; mapDevice[elem.code].parentName = mapDevice[elem.parentCode] ? mapDevice[elem.parentCode].name : '';
} else if (elem.type == '01' && (elem.standTrack || elem.reentryTrack) && elem.belongStation) { } else if (elem.type == '01' && (elem.standTrack || elem.reentryTrack) && elem.belongStation) {
mapDevice[elem.belongStation].sectionCode = elem.code; if (mapDevice[elem.belongStation]) {
mapDevice[elem.belongStation].sectionCode = elem.code;
} else {
elem.belongStation = '';
}
} }
}, this); }, this);