From 119af195223f3344bddb126cb1f5f990d6cf0c64 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Mon, 1 Jun 2020 10:57:19 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E4=BA=8C=E6=AC=A1=E6=8C=89?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E8=A1=8C=E8=BD=A6=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/map.js | 1 - src/views/newMap/jlmapNew/index.vue | 8 +++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/jmapNew/map.js b/src/jmapNew/map.js index e147ef126..d9b6dc9b8 100644 --- a/src/jmapNew/map.js +++ b/src/jmapNew/map.js @@ -289,7 +289,6 @@ class Jlmap { setUpdateMapDevice(list) { store.dispatch('map/updateMapDevice', list); (list || []).forEach(elem => { - const code = elem.code; const type = elem._type; if (elem.deviceType === 'TRAIN' && elem.type === 'HEAD') { diff --git a/src/views/newMap/jlmapNew/index.vue b/src/views/newMap/jlmapNew/index.vue index 0c024e860..184cddb81 100644 --- a/src/views/newMap/jlmapNew/index.vue +++ b/src/views/newMap/jlmapNew/index.vue @@ -433,7 +433,13 @@ export default { let list = []; nameList.forEach(item => { if (this.$store.state.map.map[item] && this.$store.state.map.map[item].constructor === Array) { - list = [...list, ...this.$store.state.map.map[item]]; + if (item === 'trainList') { + this.$store.state.map.map[item].forEach(elem => { + elem && list.push(elem); + }); + } else { + list = [...list, ...this.$store.state.map.map[item]]; + } } }); this.$jlmap.updateShowStation(list, stationCode);