成都三号线现地仿真操作控制权判断调整

This commit is contained in:
joylink_fanyuhong 2024-09-26 16:10:09 +08:00
parent 2d1da55ffc
commit 5b1362f94b

View File

@ -396,19 +396,28 @@ export default {
operation: this.$store.state.menuOperation.buttonOperation,
param: {}
};
if (model._type === 'StationStand' && subType === 'StopJumpLamp') {
let controlMode = '';
const station = this.$store.getters['map/getDeviceByCode'](model.stationCode);
if (station) {
controlMode = station.controlMode;
// if (station.controlMode == 'Local' || station.controlMode == 'Emergency') {
// controlFlag = true;Interlock
// }
}
const list2 = ['Local', 'Emergency'];
if (model._type === 'StationStand' && subType === 'StopJumpLamp' && list2.includes(controlMode)) {
operate.cmdType = CMD.Stand.CMD_STAND_SET_JUMP_STOP;
operate.param = {standCode: model.code, trainGroupNumber: ''};
operate.code = model.code;
} else if (model._type === 'StationStand' && subType === 'CancelStopJumpLamp') {
} else if (model._type === 'StationStand' && subType === 'CancelStopJumpLamp' && list2.includes(controlMode)) {
operate.cmdType = CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP;
operate.param = {standCode: model.code, trainGroupNumber: ''};
operate.code = model.code;
} else if (model._type === 'AutoTurnBack' ) {
} else if (model._type === 'AutoTurnBack' && controlMode === 'Interlock') {
operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK;
operate.param = {cycleCode: model.cycleCode};
operate.code = model.code;
} else if (model._type === 'AutomaticRoute') {
} else if (model._type === 'AutomaticRoute' && controlMode === 'Interlock') {
const route = this.routeData[model.automaticRouteCode];
operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_CI_AUTO;
operate.param = {signalCode: route.startSignalCode};
@ -443,6 +452,9 @@ export default {
operate.code = model.code;
break;
}
} else {
this.$message.info('请检查操作设备或控制权');
return;
}
this.$store.dispatch('trainingNew/next', operate).then(({ valid, response }) => {
//
@ -705,37 +717,36 @@ export default {
this.handelFunctionButton(model, subType);
} else {
const station = this.$store.getters['map/getDeviceByCode'](model.stationCode);
const list1 = ['Local', 'Emergency', 'Interlock'];
const list2 = ['Local', 'Emergency'];
if (station) {
if (station.controlMode == 'Local' || station.controlMode == 'Emergency') {
if (buttonOperation && this.commandTypeList.includes(model._type)) {
this.deviceList.push(model);
if (buttonOperation === this.Signal.arrangementRoute.button.operation) {
if (buttonOperation === this.Signal.arrangementRoute.button.operation && list1.includes(station.controlMode)) {
this.arrangementRouteOperation(this.deviceList);
} else if (buttonOperation === this.MixinCommand.totalCancel.button.operation) {
this.handelTotalCancel(model, subType);
} else if (buttonOperation === this.Signal.humanTrainRoute.button.operation) {
} else if (buttonOperation === this.Signal.humanTrainRoute.button.operation && list1.includes(station.controlMode)) {
this.handleTotalHumanSolution(model);
} else if (buttonOperation === this.Signal.guide.button.operation) {
} else if (buttonOperation === this.Signal.guide.button.operation && list1.includes(station.controlMode)) {
this.handleGuideRoute(this.deviceList);
} else if (buttonOperation === this.Signal.atsAutoControl.button.operation || buttonOperation === this.Signal.humanControl.button.operation) {
} else if ((buttonOperation === this.Signal.atsAutoControl.button.operation || buttonOperation === this.Signal.humanControl.button.operation) && list2.includes(station.controlMode)) {
this.handelControlRoute(model);
} else if (switchOperation.includes(buttonOperation)) {
} else if (switchOperation.includes(buttonOperation) && list1.includes(station.controlMode)) {
this.handelSwitchOperate(model);
} else if (buttonOperation === this.MixinCommand.block.button.operation || buttonOperation === this.MixinCommand.unblock.button.operation) {
} else if ((buttonOperation === this.MixinCommand.block.button.operation || buttonOperation === this.MixinCommand.unblock.button.operation) && list1.includes(station.controlMode)) {
this.handelBlockOrUnblock(model);
} else if (buttonOperation === this.Station.guideLock.button.operation) {
} else if (buttonOperation === this.Station.guideLock.button.operation && station.controlMode === 'Interlock') {
this.handelGuideLock(model);
} else if (buttonOperation === this.Section.fault.button.operation) {
} else if (buttonOperation === this.Section.fault.button.operation && list1.includes(station.controlMode)) {
this.handelFaultSection(model);
} else {
this.clearOperate();
this.operatemode != OperateMode.FAULT && this.$message.info('请检查操作设备或控制权');
}
} else {
this.clearOperate();
}
} else {
this.clearOperate();
this.operatemode != OperateMode.FAULT && this.$message.info('请先切换到站控或紧急站控');
this.operatemode != OperateMode.FAULT && this.$message.info('请检查操作设备或控制权');
}
}
}