调整二次按计划行车报错

This commit is contained in:
fan 2020-06-01 10:57:19 +08:00
parent c2c543503d
commit 119af19522
2 changed files with 7 additions and 2 deletions

View File

@ -289,7 +289,6 @@ class Jlmap {
setUpdateMapDevice(list) { setUpdateMapDevice(list) {
store.dispatch('map/updateMapDevice', list); store.dispatch('map/updateMapDevice', list);
(list || []).forEach(elem => { (list || []).forEach(elem => {
const code = elem.code; const code = elem.code;
const type = elem._type; const type = elem._type;
if (elem.deviceType === 'TRAIN' && elem.type === 'HEAD') { if (elem.deviceType === 'TRAIN' && elem.type === 'HEAD') {

View File

@ -433,8 +433,14 @@ export default {
let list = []; let list = [];
nameList.forEach(item => { nameList.forEach(item => {
if (this.$store.state.map.map[item] && this.$store.state.map.map[item].constructor === Array) { if (this.$store.state.map.map[item] && this.$store.state.map.map[item].constructor === Array) {
if (item === 'trainList') {
this.$store.state.map.map[item].forEach(elem => {
elem && list.push(elem);
});
} else {
list = [...list, ...this.$store.state.map.map[item]]; list = [...list, ...this.$store.state.map.map[item]];
} }
}
}); });
this.$jlmap.updateShowStation(list, stationCode); this.$jlmap.updateShowStation(list, stationCode);
!isTraining && this.setCenter(stationCode); !isTraining && this.setCenter(stationCode);