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() {
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) {

View File

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

View File

@ -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('结束实训失败!');
});

View File

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

View File

@ -184,6 +184,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});