调整现地列车显示

This commit is contained in:
zyy 2020-04-09 17:37:27 +08:00
parent da62178c72
commit 289f1dbff0
5 changed files with 19 additions and 6 deletions

View File

@ -426,9 +426,6 @@ export default class Switch extends Group {
setState(model) { setState(model) {
if (!this.isShowShape) return; if (!this.isShowShape) return;
this.recover(); this.recover();
if (model.name == 'P021208') {
console.log(model);
}
if (model.normalPosition) { if (model.normalPosition) {
this.setLocationAction(model); /** 定位*/ this.setLocationAction(model); /** 定位*/
} else if (model.reversePosition) { } else if (model.reversePosition) {

View File

@ -204,7 +204,8 @@ const map = {
version: '', // 地图版本, version: '', // 地图版本,
trainListUpdate:0, // 列车列表更新标识, trainListUpdate:0, // 列车列表更新标识,
runPlanStatus:false, // 是否正处于按计划行车 runPlanStatus:false, // 是否正处于按计划行车
showCentralizedStationCode: '' // 现地分集中站显示(集中站code) showCentralizedStationCode: '', // 现地分集中站显示(集中站code)
showCentralizedStationNum: 0 // 现地分集中站显示判断
}, },
getters: { getters: {
@ -718,6 +719,9 @@ const map = {
}, },
setShowCentralizedStationCode: (state, stationCode) => { setShowCentralizedStationCode: (state, stationCode) => {
state.showCentralizedStationCode = stationCode; state.showCentralizedStationCode = stationCode;
},
setShowCentralizedStationNum: (state) => {
state.showCentralizedStationNum++;
} }
}, },
@ -887,6 +891,9 @@ const map = {
}, },
setShowCentralizedStationCode: ({commit}, stationCode) => { setShowCentralizedStationCode: ({commit}, stationCode) => {
commit('setShowCentralizedStationCode', stationCode); commit('setShowCentralizedStationCode', stationCode);
},
setShowCentralizedStationNum: ({commit}) => {
commit('setShowCentralizedStationNum');
} }
} }
}; };

View File

@ -36,6 +36,7 @@
:offset-bottom="offsetBottom" :offset-bottom="offsetBottom"
:group="group" :group="group"
:quest-id="questId" :quest-id="questId"
:show-station="showStation"
@tryTime="tryTime" @tryTime="tryTime"
@hidepanel="hidepanel" @hidepanel="hidepanel"
@passflow="passflow" @passflow="passflow"
@ -589,6 +590,7 @@ export default {
switchStationMode(val) { switchStationMode(val) {
this.showStation = val; this.showStation = val;
this.$store.dispatch('map/setShowCentralizedStationCode', this.showStation); this.$store.dispatch('map/setShowCentralizedStationCode', this.showStation);
this.$store.dispatch('map/setShowCentralizedStationNum');
}, },
setStationList(val) { setStationList(val) {
this.stationList = []; this.stationList = [];

View File

@ -61,6 +61,12 @@ export default {
default() { default() {
return 0; return 0;
} }
},
showStation: {
type: String,
default() {
return '';
}
} }
}, },
data() { data() {
@ -164,6 +170,7 @@ export default {
this.$store.dispatch('training/simulationStart').then(() => { this.$store.dispatch('training/simulationStart').then(() => {
this.$store.dispatch('map/setRunPlanStatus', true); this.$store.dispatch('map/setRunPlanStatus', true);
this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${model.initTime}`)); this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${model.initTime}`));
this.$store.dispatch('map/setShowCentralizedStationNum');
}); });
}).catch(error => { }).catch(error => {
this.isDisable = false; this.isDisable = false;

View File

@ -137,8 +137,8 @@ export default {
'$store.state.training.prdType': function (val) { '$store.state.training.prdType': function (val) {
this.changePrdType(val); this.changePrdType(val);
}, },
'$store.state.map.showCentralizedStationCode': function (val) { '$store.state.map.showCentralizedStationNum': function (val) {
this.setShowStation(val); this.setShowStation(this.$store.state.map.showCentralizedStationCode);
}, },
'$store.state.training.offsetStationCode': function(code) { '$store.state.training.offsetStationCode': function(code) {
if (code && this.localStationShow && this.$store.state.training.prdType === '01') { if (code && this.localStationShow && this.$store.state.training.prdType === '01') {