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