This commit is contained in:
joylink_cuiweidong 2022-08-30 16:54:00 +08:00
commit f38c129319
5 changed files with 6 additions and 5 deletions

View File

@ -266,8 +266,8 @@ export default {
commit() { commit() {
if (this.route) { if (this.route) {
this.loading = true; this.loading = true;
const type = this.route.lock ? menuOperate.Signal.cancelTrainRoute : menuOperate.Signal.arrangementRoute; const type = this.route.lock ? menuOperate.Signal.cancelTrainRoute : menuOperate.CTC.setRoute;
const param = this.route.lock ? { signalCode: this.route.startSignalCode } : { routeCode:this.route.code }; 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})=>{ commitOperate(type, param, 3).then(({valid, operate})=>{
this.loading = false; this.loading = false;
if (valid) { if (valid) {

View File

@ -467,6 +467,7 @@ const training = {
rtn && rtn.valid && commit('next'); rtn && rtn.valid && commit('next');
} }
} }
store.dispatch('trainingNew/setTrainingOperate');
resolve(rtn); resolve(rtn);
} }
}).catch(error => { }).catch(error => {

View File

@ -59,7 +59,7 @@ export default {
}, },
beforeDestroy() { beforeDestroy() {
this.$store.dispatch('socket/clearTrainingOverCount'); this.$store.dispatch('socket/clearTrainingOverCount');
this.$store.dispatch('training/clearStepOverCount'); this.$store.dispatch('trainingNew/clearStepOverCount');
}, },
mounted() { mounted() {
}, },
@ -91,7 +91,6 @@ export default {
this.$store.dispatch('socket/clearTrainingStepTip'); this.$store.dispatch('socket/clearTrainingStepTip');
this.$store.dispatch('trainingNew/clearStepOrder'); this.$store.dispatch('trainingNew/clearStepOrder');
this.$store.dispatch('trainingNew/changeTeachMode', ''); this.$store.dispatch('trainingNew/changeTeachMode', '');
this.$store.dispatch('trainingNew/setTrainingDetail', null);
}).catch(() => { }).catch(() => {
this.$message.error('结束实训失败!'); this.$message.error('结束实训失败!');
}); });

View File

@ -70,7 +70,7 @@ export default {
}, },
async beforeDestroy() { async beforeDestroy() {
this.$store.dispatch('socket/clearTrainingOverCount'); this.$store.dispatch('socket/clearTrainingOverCount');
this.$store.dispatch('training/clearStepOverCount'); this.$store.dispatch('trainingNew/clearStepOverCount');
}, },
mounted() { mounted() {
}, },

View File

@ -184,6 +184,7 @@ export default {
drawUp(index, row) { drawUp(index, row) {
console.log('编辑', index, row); console.log('编辑', index, row);
getTrainingAll(row.id).then(resp => { getTrainingAll(row.id).then(resp => {
this.$store.dispatch('trainingNew/setTrainingDetail', null);
if (resp.data && resp.data.mapLocationJson) { if (resp.data && resp.data.mapLocationJson) {
const mapLocation = JSON.parse(resp.data.mapLocationJson); const mapLocation = JSON.parse(resp.data.mapLocationJson);
this.$jlmap.updateTransform(mapLocation.scale, {x:mapLocation.x, y:mapLocation.y}); this.$jlmap.updateTransform(mapLocation.scale, {x:mapLocation.x, y:mapLocation.y});