From 5ad7c1f8a1f23dee5e9d7bea23c2b126044cd09e Mon Sep 17 00:00:00 2001 From: fan Date: Tue, 30 Aug 2022 16:09:17 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/training.js | 1 + src/views/designPlatform/trainingDesign.vue | 3 +-- src/views/designPlatform/trainingPreview.vue | 2 +- src/views/trainingManage/trainingList.vue | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/store/modules/training.js b/src/store/modules/training.js index 774cb4f05..dd1de86d9 100644 --- a/src/store/modules/training.js +++ b/src/store/modules/training.js @@ -467,6 +467,7 @@ const training = { rtn && rtn.valid && commit('next'); } } + store.dispatch('trainingNew/setTrainingOperate'); resolve(rtn); } }).catch(error => { diff --git a/src/views/designPlatform/trainingDesign.vue b/src/views/designPlatform/trainingDesign.vue index c206093da..98416a282 100644 --- a/src/views/designPlatform/trainingDesign.vue +++ b/src/views/designPlatform/trainingDesign.vue @@ -59,7 +59,7 @@ export default { }, beforeDestroy() { this.$store.dispatch('socket/clearTrainingOverCount'); - this.$store.dispatch('training/clearStepOverCount'); + this.$store.dispatch('trainingNew/clearStepOverCount'); }, mounted() { }, @@ -91,7 +91,6 @@ export default { this.$store.dispatch('socket/clearTrainingStepTip'); this.$store.dispatch('trainingNew/clearStepOrder'); this.$store.dispatch('trainingNew/changeTeachMode', ''); - this.$store.dispatch('trainingNew/setTrainingDetail', null); }).catch(() => { this.$message.error('结束实训失败!'); }); diff --git a/src/views/designPlatform/trainingPreview.vue b/src/views/designPlatform/trainingPreview.vue index ec573ee03..9fe52ba61 100644 --- a/src/views/designPlatform/trainingPreview.vue +++ b/src/views/designPlatform/trainingPreview.vue @@ -70,7 +70,7 @@ export default { }, async beforeDestroy() { this.$store.dispatch('socket/clearTrainingOverCount'); - this.$store.dispatch('training/clearStepOverCount'); + this.$store.dispatch('trainingNew/clearStepOverCount'); }, mounted() { }, diff --git a/src/views/trainingManage/trainingList.vue b/src/views/trainingManage/trainingList.vue index 63e8bc00a..10078d314 100644 --- a/src/views/trainingManage/trainingList.vue +++ b/src/views/trainingManage/trainingList.vue @@ -178,6 +178,7 @@ export default { drawUp(index, row) { console.log('编辑', index, row); getTrainingAll(row.id).then(resp => { + this.$store.dispatch('trainingNew/setTrainingDetail', null); if (resp.data && resp.data.mapLocationJson) { const mapLocation = JSON.parse(resp.data.mapLocationJson); this.$jlmap.updateTransform(mapLocation.scale, {x:mapLocation.x, y:mapLocation.y}); From 656e7a13aa53420d9db2e08e1d660ad9c4f60e0b Mon Sep 17 00:00:00 2001 From: fan Date: Tue, 30 Aug 2022 16:25:34 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=8D=A0=E7=BA=BF=E6=9D=BF=E6=8E=92?= =?UTF-8?q?=E5=88=97=E8=BF=9B=E8=B7=AF=E6=8C=87=E4=BB=A4=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/theme/datie_02/menus/dialog/routeSelection1.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jmapNew/theme/datie_02/menus/dialog/routeSelection1.vue b/src/jmapNew/theme/datie_02/menus/dialog/routeSelection1.vue index 9b135292b..8b84cf582 100644 --- a/src/jmapNew/theme/datie_02/menus/dialog/routeSelection1.vue +++ b/src/jmapNew/theme/datie_02/menus/dialog/routeSelection1.vue @@ -266,8 +266,8 @@ export default { commit() { if (this.route) { this.loading = true; - const type = this.route.lock ? menuOperate.Signal.cancelTrainRoute : menuOperate.Signal.arrangementRoute; - const param = this.route.lock ? { signalCode: this.route.startSignalCode } : { routeCode:this.route.code }; + const type = this.route.lock ? menuOperate.Signal.cancelTrainRoute : menuOperate.CTC.setRoute; + const param = this.route.lock ? { signalCode: this.route.startSignalCode } : { routeCode:this.route.code, tripNumber: this.selected.tripNumber, force: false, duration: null }; commitOperate(type, param, 3).then(({valid, operate})=>{ this.loading = false; if (valid) {