成都三号线现地仿真操作控制权判断调整
This commit is contained in:
parent
2d1da55ffc
commit
5b1362f94b
@ -396,19 +396,28 @@ export default {
|
|||||||
operation: this.$store.state.menuOperation.buttonOperation,
|
operation: this.$store.state.menuOperation.buttonOperation,
|
||||||
param: {}
|
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.cmdType = CMD.Stand.CMD_STAND_SET_JUMP_STOP;
|
||||||
operate.param = {standCode: model.code, trainGroupNumber: ''};
|
operate.param = {standCode: model.code, trainGroupNumber: ''};
|
||||||
operate.code = model.code;
|
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.cmdType = CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP;
|
||||||
operate.param = {standCode: model.code, trainGroupNumber: ''};
|
operate.param = {standCode: model.code, trainGroupNumber: ''};
|
||||||
operate.code = model.code;
|
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.cmdType = CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK;
|
||||||
operate.param = {cycleCode: model.cycleCode};
|
operate.param = {cycleCode: model.cycleCode};
|
||||||
operate.code = model.code;
|
operate.code = model.code;
|
||||||
} else if (model._type === 'AutomaticRoute') {
|
} else if (model._type === 'AutomaticRoute' && controlMode === 'Interlock') {
|
||||||
const route = this.routeData[model.automaticRouteCode];
|
const route = this.routeData[model.automaticRouteCode];
|
||||||
operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_CI_AUTO;
|
operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_CI_AUTO;
|
||||||
operate.param = {signalCode: route.startSignalCode};
|
operate.param = {signalCode: route.startSignalCode};
|
||||||
@ -443,6 +452,9 @@ export default {
|
|||||||
operate.code = model.code;
|
operate.code = model.code;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
this.$message.info('请检查操作设备或控制权');
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
this.$store.dispatch('trainingNew/next', operate).then(({ valid, response }) => {
|
this.$store.dispatch('trainingNew/next', operate).then(({ valid, response }) => {
|
||||||
// 判断是否需要 弹窗密码框
|
// 判断是否需要 弹窗密码框
|
||||||
@ -705,37 +717,36 @@ export default {
|
|||||||
this.handelFunctionButton(model, subType);
|
this.handelFunctionButton(model, subType);
|
||||||
} else {
|
} else {
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](model.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](model.stationCode);
|
||||||
|
const list1 = ['Local', 'Emergency', 'Interlock'];
|
||||||
|
const list2 = ['Local', 'Emergency'];
|
||||||
if (station) {
|
if (station) {
|
||||||
if (station.controlMode == 'Local' || station.controlMode == 'Emergency') {
|
|
||||||
if (buttonOperation && this.commandTypeList.includes(model._type)) {
|
if (buttonOperation && this.commandTypeList.includes(model._type)) {
|
||||||
this.deviceList.push(model);
|
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);
|
this.arrangementRouteOperation(this.deviceList);
|
||||||
} else if (buttonOperation === this.MixinCommand.totalCancel.button.operation) {
|
} else if (buttonOperation === this.MixinCommand.totalCancel.button.operation) {
|
||||||
this.handelTotalCancel(model, subType);
|
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);
|
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);
|
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);
|
this.handelControlRoute(model);
|
||||||
} else if (switchOperation.includes(buttonOperation)) {
|
} else if (switchOperation.includes(buttonOperation) && list1.includes(station.controlMode)) {
|
||||||
this.handelSwitchOperate(model);
|
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);
|
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);
|
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);
|
this.handelFaultSection(model);
|
||||||
} else {
|
} else {
|
||||||
this.clearOperate();
|
this.clearOperate();
|
||||||
|
this.operatemode != OperateMode.FAULT && this.$message.info('请检查操作设备或控制权');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.clearOperate();
|
this.clearOperate();
|
||||||
}
|
this.operatemode != OperateMode.FAULT && this.$message.info('请检查操作设备或控制权');
|
||||||
} else {
|
|
||||||
this.clearOperate();
|
|
||||||
this.operatemode != OperateMode.FAULT && this.$message.info('请先切换到站控或紧急站控');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user