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) {
this.selectedChange();
},
'$store.state.trainingNew.trainingSwitch': function (val) {
if (val) {
this.$store.dispatch('menuOperation/setButtonOperation', null);
}
}
},
methods: {

View File

@ -226,16 +226,24 @@ export default {
}
this.clickNum = 0;
} else {
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);
const operate = {
code: selectType.code,
operation: OperationEvent.Signal.arrangementRoute.button.operation
};
this.$store.dispatch('trainingNew/next', operate).then(valid => {
if (valid) {
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;
}
@ -326,7 +334,7 @@ export default {
},
//
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=>{
console.error(error);
this.$refs.noticeInfo.doShow();