From 2d7cdff43136fc524e350aa26be849c4efd6f6b5 Mon Sep 17 00:00:00 2001 From: fan Date: Tue, 29 Aug 2023 16:43:32 +0800 Subject: [PATCH] =?UTF-8?q?=E9=94=99=E8=AF=AF=E6=95=B0=E6=8D=AE=E8=B7=B3?= =?UTF-8?q?=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/parser/parser-graph.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/jmapNew/parser/parser-graph.js b/src/jmapNew/parser/parser-graph.js index 9216b42f0..142545358 100644 --- a/src/jmapNew/parser/parser-graph.js +++ b/src/jmapNew/parser/parser-graph.js @@ -27,7 +27,11 @@ export function parser(data, skinCode, showConfig) { zrUtil.each(centralStationList, elem => { mapDevice[elem.code].stationCode = elem.code; 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 => {