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);