错误数据跳过

This commit is contained in:
fan 2023-08-29 16:43:32 +08:00
parent 9b3cfdab78
commit 2d7cdff431

View File

@ -27,7 +27,11 @@ export function parser(data, skinCode, showConfig) {
zrUtil.each(centralStationList, elem => { zrUtil.each(centralStationList, elem => {
mapDevice[elem.code].stationCode = elem.code; mapDevice[elem.code].stationCode = elem.code;
zrUtil.each(elem.chargeStationCodeList || [], item => { zrUtil.each(elem.chargeStationCodeList || [], item => {
mapDevice[item].stationCode = elem.code; if (mapDevice[item]) {
mapDevice[item].stationCode = elem.code;
} else {
console.error('未获取到设备' + item);
}
}); });
}); });
zrUtil.each(data.sectionList || [], elem => { zrUtil.each(data.sectionList || [], elem => {