From 289f1dbff0b8cf66dbc178d7ed422c66f7e27b1f Mon Sep 17 00:00:00 2001 From: zyy <1787816799@qq.com> Date: Thu, 9 Apr 2020 17:37:27 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=8E=B0=E5=9C=B0=E5=88=97?= =?UTF-8?q?=E8=BD=A6=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/shape/Switch/index.js | 3 --- src/store/modules/map.js | 9 ++++++++- src/views/newMap/displayNew/index.vue | 2 ++ src/views/newMap/displayNew/menuDemon.vue | 7 +++++++ src/views/newMap/jlmapNew/index.vue | 4 ++-- 5 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/jmapNew/shape/Switch/index.js b/src/jmapNew/shape/Switch/index.js index a28daaca4..a9bff1778 100644 --- a/src/jmapNew/shape/Switch/index.js +++ b/src/jmapNew/shape/Switch/index.js @@ -426,9 +426,6 @@ export default class Switch extends Group { setState(model) { if (!this.isShowShape) return; this.recover(); - if (model.name == 'P021208') { - console.log(model); - } if (model.normalPosition) { this.setLocationAction(model); /** 定位*/ } else if (model.reversePosition) { diff --git a/src/store/modules/map.js b/src/store/modules/map.js index eb90fe3a2..421ce686b 100644 --- a/src/store/modules/map.js +++ b/src/store/modules/map.js @@ -204,7 +204,8 @@ const map = { version: '', // 地图版本, trainListUpdate:0, // 列车列表更新标识, runPlanStatus:false, // 是否正处于按计划行车 - showCentralizedStationCode: '' // 现地分集中站显示(集中站code) + showCentralizedStationCode: '', // 现地分集中站显示(集中站code) + showCentralizedStationNum: 0 // 现地分集中站显示判断 }, getters: { @@ -718,6 +719,9 @@ const map = { }, setShowCentralizedStationCode: (state, stationCode) => { state.showCentralizedStationCode = stationCode; + }, + setShowCentralizedStationNum: (state) => { + state.showCentralizedStationNum++; } }, @@ -887,6 +891,9 @@ const map = { }, setShowCentralizedStationCode: ({commit}, stationCode) => { commit('setShowCentralizedStationCode', stationCode); + }, + setShowCentralizedStationNum: ({commit}) => { + commit('setShowCentralizedStationNum'); } } }; diff --git a/src/views/newMap/displayNew/index.vue b/src/views/newMap/displayNew/index.vue index 470dca0c0..5c2fbb16f 100644 --- a/src/views/newMap/displayNew/index.vue +++ b/src/views/newMap/displayNew/index.vue @@ -36,6 +36,7 @@ :offset-bottom="offsetBottom" :group="group" :quest-id="questId" + :show-station="showStation" @tryTime="tryTime" @hidepanel="hidepanel" @passflow="passflow" @@ -589,6 +590,7 @@ export default { switchStationMode(val) { this.showStation = val; this.$store.dispatch('map/setShowCentralizedStationCode', this.showStation); + this.$store.dispatch('map/setShowCentralizedStationNum'); }, setStationList(val) { this.stationList = []; diff --git a/src/views/newMap/displayNew/menuDemon.vue b/src/views/newMap/displayNew/menuDemon.vue index dc9862965..6e7fcd506 100644 --- a/src/views/newMap/displayNew/menuDemon.vue +++ b/src/views/newMap/displayNew/menuDemon.vue @@ -61,6 +61,12 @@ export default { default() { return 0; } + }, + showStation: { + type: String, + default() { + return ''; + } } }, data() { @@ -164,6 +170,7 @@ export default { this.$store.dispatch('training/simulationStart').then(() => { this.$store.dispatch('map/setRunPlanStatus', true); this.$store.dispatch('training/setInitTime', +new Date(`${new Date().getFullYear()} ${model.initTime}`)); + this.$store.dispatch('map/setShowCentralizedStationNum'); }); }).catch(error => { this.isDisable = false; diff --git a/src/views/newMap/jlmapNew/index.vue b/src/views/newMap/jlmapNew/index.vue index 525cdeac0..287691459 100644 --- a/src/views/newMap/jlmapNew/index.vue +++ b/src/views/newMap/jlmapNew/index.vue @@ -137,8 +137,8 @@ export default { '$store.state.training.prdType': function (val) { this.changePrdType(val); }, - '$store.state.map.showCentralizedStationCode': function (val) { - this.setShowStation(val); + '$store.state.map.showCentralizedStationNum': function (val) { + this.setShowStation(this.$store.state.map.showCentralizedStationCode); }, '$store.state.training.offsetStationCode': function(code) { if (code && this.localStationShow && this.$store.state.training.prdType === '01') {