剧本代码调整
This commit is contained in:
parent
a7ca270be0
commit
29b0937253
@ -683,15 +683,29 @@ export default {
|
||||
}
|
||||
},
|
||||
switchStationMode(val) {
|
||||
debugger;
|
||||
if (this.stationList.length > 0) {
|
||||
if (val == null) {
|
||||
this.showStation = this.stationList[0].value;
|
||||
} else {
|
||||
this.showStation = val;
|
||||
}
|
||||
this.$store.dispatch('map/setShowCentralizedStationCode', this.showStation);
|
||||
this.$store.dispatch('map/setShowCentralizedStationNum');
|
||||
const nameList = Object.keys(this.$store.state.map.map);
|
||||
let list = [];
|
||||
nameList.forEach(item => {
|
||||
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]];
|
||||
}
|
||||
}
|
||||
});
|
||||
this.$jlmap.updateShowStation(list, this.showStation);
|
||||
this.setCenter(this.showStation);
|
||||
// this.$store.dispatch('map/setShowCentralizedStationCode', this.showStation);
|
||||
// this.$store.dispatch('map/setShowCentralizedStationNum');
|
||||
}
|
||||
},
|
||||
setStationList(val) {
|
||||
|
Loading…
Reference in New Issue
Block a user