BUG:【北京一号线】车站排列进路实训编制时点击始端信号机没有生成操作

This commit is contained in:
fan 2022-12-27 11:09:55 +08:00
parent 43eb3c4a39
commit 9bf43b5b45
2 changed files with 22 additions and 9 deletions

View File

@ -293,6 +293,11 @@ export default {
}, },
'$store.state.menuOperation.selectedCount': function (val) { '$store.state.menuOperation.selectedCount': function (val) {
this.selectedChange(); this.selectedChange();
},
'$store.state.trainingNew.trainingSwitch': function (val) {
if (val) {
this.$store.dispatch('menuOperation/setButtonOperation', null);
}
} }
}, },
methods: { methods: {

View File

@ -226,16 +226,24 @@ export default {
} }
this.clickNum = 0; this.clickNum = 0;
} else { } else {
this.oldSelected = selectType; const operate = {
this.routeList.forEach(elem => { code: selectType.code,
if (elem.startSignalCode === this.oldSelected.code) { operation: OperationEvent.Signal.arrangementRoute.button.operation
const signalCode = this.$store.getters['map/getDeviceByCode'](elem.endSignalCode); };
const data = Object.assign({_type: 'Signal'}, signalCode); this.$store.dispatch('trainingNew/next', operate).then(valid => {
data.isRouteActive = true; if (valid) {
this.$store.dispatch('map/updateMapDevices', data); this.oldSelected = selectType;
this.routeList.forEach(elem => {
if (elem.startSignalCode === this.oldSelected.code) {
const signalCode = this.$store.getters['map/getDeviceByCode'](elem.endSignalCode);
const data = Object.assign({_type: 'Signal'}, signalCode);
data.isRouteActive = true;
this.$store.dispatch('map/updateMapDevices', data);
}
});
this.clickNum++;
} }
}); });
this.clickNum++;
} }
break; break;
} }
@ -326,7 +334,7 @@ export default {
}, },
// //
setRoute(route) { setRoute(route) {
commitOperate(menuOperate.Signal.arrangementRoute, {routeCode:route.code}, 3).then(({valid, operate})=>{ commitOperate(menuOperate.Signal.arrangementRoute, {code: this.selected.code, routeCode:route.code}, 3).then(({valid, operate})=>{
}).catch(error=>{ }).catch(error=>{
console.error(error); console.error(error);
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();