From 3be9bc566c83edfe783ffa54a95dc47d557c78a2 Mon Sep 17 00:00:00 2001 From: fan Date: Sat, 28 Jan 2023 15:07:27 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=A4=A7=E9=93=81=E6=A0=87=E5=87=86?= =?UTF-8?q?=E7=AB=99=E3=80=91=E5=AE=9E=E8=AE=AD=E8=AE=BE=E8=AE=A1=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E5=85=88=E7=BC=96=E5=88=B6=E4=B8=80=E4=B8=AA=E5=9C=BA?= =?UTF-8?q?=E6=99=AF=E6=B7=BB=E5=8A=A0=E5=88=97=E8=BD=A6=EF=BC=8C=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E8=83=8C=E6=99=AF=EF=BC=8C=E5=88=87=E6=8D=A2=E5=88=B0?= =?UTF-8?q?=E8=B7=AF=E7=A5=A8=EF=BC=8C=E8=BF=94=E5=9B=9E=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E6=96=B0=E5=BB=BA=E4=B8=80=E4=B8=AA=E5=9C=BA=E6=99=AF=EF=BC=8C?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E7=BC=96=E5=88=B6=EF=BC=8C=E5=88=87=E6=8D=A2?= =?UTF-8?q?=E5=88=B0=E8=81=94=E9=94=81=E7=95=8C=E9=9D=A2=EF=BC=8C=E6=96=B0?= =?UTF-8?q?=E5=BB=BA=E7=9A=84=E5=9C=BA=E6=99=AF=E4=BC=9A=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E5=88=97=E8=BD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/map.js | 12 ++++----- .../display/stationDiagram/jlmap/index.vue | 26 +++++++++---------- src/views/newMap/display/terminals/index.vue | 13 ++++++++++ 3 files changed, 32 insertions(+), 19 deletions(-) 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'); // 设置默认状态 } } };