diff --git a/src/store/modules/map.js b/src/store/modules/map.js index 44a899239..d3b1cb5c3 100644 --- a/src/store/modules/map.js +++ b/src/store/modules/map.js @@ -1334,13 +1334,13 @@ const map = { initClearTrainData: ({ commit, state}) => { if (Vue.prototype.$jlmap) { Vue.prototype.$jlmap.initClearTrainData(); - let showConfig = {}; - if (Vue.prototype.$jlmap && typeof Vue.prototype.$jlmap.getShowConfig === 'function') { - showConfig = Vue.prototype.$jlmap.getShowConfig(); - } - const parser = parserFactory(ParserType.Graph.value); - parser.parserTrainData(state.mapDevice, state.map.trainList, state.map.skinVO.code, showConfig); } + let showConfig = {}; + if (Vue.prototype.$jlmap && typeof Vue.prototype.$jlmap.getShowConfig === 'function') { + showConfig = Vue.prototype.$jlmap.getShowConfig(); + } + const parser = parserFactory(ParserType.Graph.value); + parser.parserTrainData(state.mapDevice, state.map.trainList, state.map.skinVO.code, showConfig); }, setTrainWindowShow: ({ commit, state }, show) => { if (state.map) { diff --git a/src/views/newMap/display/stationDiagram/jlmap/index.vue b/src/views/newMap/display/stationDiagram/jlmap/index.vue index 92a4928f4..a5df3665a 100644 --- a/src/views/newMap/display/stationDiagram/jlmap/index.vue +++ b/src/views/newMap/display/stationDiagram/jlmap/index.vue @@ -112,11 +112,11 @@ export default { $route() { this.mapViewLoaded(true); }, - '$store.state.socket.simulationReset': function (val) { // 仿真结束标识 - if (val) { - this.simulationReset(val); - } - }, + // '$store.state.socket.simulationReset': function (val) { // 仿真结束标识 + // if (val) { + // this.simulationReset(val); + // } + // }, '$store.state.training.rezoomCount': function () { let code = this.$store.state.training.offsetStationCode; // 偏移集中站坐标 if (code && code.includes('Cycle')) { // 单独处理 自动折返 @@ -283,14 +283,14 @@ export default { break; } }, - simulationReset() { - this.$store.dispatch('socket/setSimulationStart');// 设置仿真状态-结束 - this.$store.dispatch('map/initClearTrainData'); // 清除战场图列车显示 - this.$store.dispatch('map/setTrainWindowShow', false); // 结束清除车次窗显示 - this.$store.dispatch('training/over'); // 设置实训状态-结束 - this.$store.dispatch('map/resetActiveTrainList'); // 清除活动列车列表 - this.$store.dispatch('training/setMapDefaultState'); // 设置默认状态 - }, + // simulationReset() { + // this.$store.dispatch('socket/setSimulationStart');// 设置仿真状态-结束 + // this.$store.dispatch('map/initClearTrainData'); // 清除战场图列车显示 + // this.$store.dispatch('map/setTrainWindowShow', false); // 结束清除车次窗显示 + // this.$store.dispatch('training/over'); // 设置实训状态-结束 + // this.$store.dispatch('map/resetActiveTrainList'); // 清除活动列车列表 + // this.$store.dispatch('training/setMapDefaultState'); // 设置默认状态 + // }, // 视图缩放事件 onDataZoom(dataZoom) { this.dataZoom.offsetX = dataZoom.offsetX.toFixed(1) + ''; diff --git a/src/views/newMap/display/terminals/index.vue b/src/views/newMap/display/terminals/index.vue index 07f2f58f3..9e61dea1c 100644 --- a/src/views/newMap/display/terminals/index.vue +++ b/src/views/newMap/display/terminals/index.vue @@ -181,6 +181,11 @@ export default { this.showStationCode = device.code; this.pictureChange('troDetailWork'); } + }, + '$store.state.socket.simulationReset': function (val) { // 仿真结束标识 + if (val) { + this.simulationReset(val); + } } }, mounted() { @@ -311,6 +316,14 @@ export default { mapViewLoaded(loading) { this.loading = loading; this.$store.dispatch('app/animationsClose'); + }, + simulationReset() { + this.$store.dispatch('socket/setSimulationStart');// 设置仿真状态-结束 + this.$store.dispatch('map/initClearTrainData'); // 清除战场图列车显示 + this.$store.dispatch('map/setTrainWindowShow', false); // 结束清除车次窗显示 + this.$store.dispatch('training/over'); // 设置实训状态-结束 + this.$store.dispatch('map/resetActiveTrainList'); // 清除活动列车列表 + this.$store.dispatch('training/setMapDefaultState'); // 设置默认状态 } } };