BUG356 南京11站:无法跨联锁区排列进路

This commit is contained in:
fan 2021-08-09 16:42:18 +08:00
parent 0bc72ed589
commit fdf781951b

View File

@ -328,6 +328,7 @@ export default {
param: {}, param: {},
stationObj: null, stationObj: null,
selectedObj: null, selectedObj: null,
currentSelected: null,
oldClickObj: null, // oldClickObj: null, //
route: null, // route: null, //
overlap: null, // overlap: null, //
@ -416,7 +417,7 @@ export default {
return OperationEvent.Command.commandHaerbin.confrimCr2.domId; return OperationEvent.Command.commandHaerbin.confrimCr2.domId;
}, },
stationContorl() { stationContorl() {
return this.getStationControl(this.selectedObj || {}) || this.getStationControl({_type: 'Station', code: this.$store.state.map.showCentralizedStationCode}) || {}; return this.getStationControl(this.currentSelected || {}) || this.getStationControl({_type: 'Station', code: this.$store.state.map.showCentralizedStationCode}) || {};
}, },
isLocal() { isLocal() {
return this.$store.state.training.prdType == '01'; return this.$store.state.training.prdType == '01';
@ -462,14 +463,11 @@ export default {
EventBus.$emit('sendMsg', {}); // EventBus.$emit('sendMsg', {}); //
this.initMenus();// this.initMenus();//
this.selectedObj = this.actualSelected; this.selectedObj = this.actualSelected;
this.currentSelected = val;
this.rightClickDialogVisible = false; this.rightClickDialogVisible = false;
if (this.selectedObj._type && (val._event == MouseEvent.Left || (val._event == MouseEvent.Right && this.$store.state.training.prdType === '01'))) { if (this.selectedObj._type && (val._event == MouseEvent.Left || (val._event == MouseEvent.Right && this.$store.state.training.prdType === '01'))) {
const type = this.State2SimulationMap[this.$store.state.training.prdType]; const type = this.State2SimulationMap[this.$store.state.training.prdType];
if (val._type === 'Signal' && val.type === 'TRANSMISSION') { this.modeMatch = this.stationContorl.controlMode == type;
this.modeMatch = true;
} else {
this.modeMatch = this.stationContorl.controlMode == type;
}
// //
if (this.selectedObj._type == 'Section' && this.selectedObj.type == '03') { if (this.selectedObj._type == 'Section' && this.selectedObj.type == '03') {
this.selectedObj = this.selectedObj.switch; this.selectedObj = this.selectedObj.switch;
@ -480,7 +478,6 @@ export default {
code: this.selectedObj.code, code: this.selectedObj.code,
subType:this.$store.state.menuOperation.subType subType:this.$store.state.menuOperation.subType
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
if (valid) { this.handleDeviceMenu(); } if (valid) { this.handleDeviceMenu(); }
}).catch((error) => { }).catch((error) => {
@ -1385,7 +1382,7 @@ export default {
{ name: '交出控制', commandTip: '交出控制权', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menuButton, disabledCb: (stationControl) => ['Local', 'None'].includes(stationControl.controlMode) } { name: '交出控制', commandTip: '交出控制权', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menuButton, disabledCb: (stationControl) => ['Local', 'None'].includes(stationControl.controlMode) }
]; ];
this.routeParamList = [ this.routeParamList = [
{ name: '排列进路', commandTip: '进路排列', cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE, operate: OperationEvent.Signal.arrangementRoute.menuButton, disabledCb: (stationControl) => { console.log(this.modeMatch, this.route); return !this.modeMatch || !this.route; } }, { name: '排列进路', commandTip: '进路排列', cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE, operate: OperationEvent.Signal.arrangementRoute.menuButton, disabledCb: (stationControl) => !this.modeMatch || !this.route },
{ name: '取消进路', commandTip: '取消排列', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE, operate: OperationEvent.Signal.cancelTrainRoute.menuButton, disabledCb: (stationControl) => !this.modeMatch || !this.route } { name: '取消进路', commandTip: '取消排列', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE, operate: OperationEvent.Signal.cancelTrainRoute.menuButton, disabledCb: (stationControl) => !this.modeMatch || !this.route }
]; ];
} }