大铁线路 现地 上电解锁代码调整

This commit is contained in:
joylink_cuiweidong 2022-09-05 16:35:42 +08:00
parent 229528d1ff
commit cd3c6e586a

View File

@ -86,7 +86,8 @@
<center><b>S引导总锁</b></center>
</span>
</button>
<button :id="Station.powerUnLock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="powerOnUnlock()">
<!-- powerOnUnlock -->
<button :id="Station.powerUnLock.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Station.powerUnLock.button.operation,['Station'])">
<!--<span style="color:black">-->
<span style="color:#800000">
<center><b>上电解锁</b></center>
@ -334,6 +335,9 @@ export default {
} else if (operate.operationPre === this.Switch.guideLock.rightButton.operation || operate.operation === this.Switch.guideLock.rightButton.operation) {
this.guideLockRightFlag = !this.guideLockRightFlag;
}
if (operate.operationPre == this.Station.powerUnLock.button.operation) {
this.clearOperate();
}
// debugger;
// this.$store.dispatch('menuOperation/setButtonOperation', operate.operation); //
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
@ -366,26 +370,38 @@ export default {
}
}
},
// 线
powerOnUnlock() {
const operate = {
over:true,
operation:this.Station.powerUnLock.button.operation,
cmdType:CMD.Station.CMD_STATION_POWER_ON_UNLOCK,
code:this.$store.state.map.showCentralizedStationCode,
param:{stationCode: this.$store.state.map.showCentralizedStationCode}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.clearOperate();
} else {
this.$refs.noticeInfo.doShow();
}
}).catch((error) => {
console.error(error);
this.$refs.noticeInfo.doShow();
});
},
// // 线
// handelPowerUnLock(model) {
// debugger;
// const operate = {
// over: true,
// code: model.code,
// operation: this.$store.state.menuOperation.buttonOperation,
// userOperationType: 'leftClick',
// cmdType: CMD.Station.CMD_STATION_POWER_ON_UNLOCK,
// param:{stationCode: this.$store.state.map.showCentralizedStationCode}
// };
// this.sendCommand(operate);
// },
// powerOnUnlock() {
// const operate = {
// over:true,
// operation:this.Station.powerUnLock.button.operation,
// cmdType:CMD.Station.CMD_STATION_POWER_ON_UNLOCK,
// code:this.$store.state.map.showCentralizedStationCode,
// param:{stationCode: this.$store.state.map.showCentralizedStationCode}
// };
// this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
// if (valid) {
// this.clearOperate();
// } else {
// this.$refs.noticeInfo.doShow();
// }
// }).catch((error) => {
// console.error(error);
// this.$refs.noticeInfo.doShow();
// });
// },
//
handelDefectiveShunting(model) {
// CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING;
@ -444,13 +460,17 @@ export default {
userOperationType: 'leftClick'
};
//
const operationList = [this.Signal.humanTrainRoute.button.operation, this.Section.fault.button.operation, this.Section.defectiveShunting.button.operation,
const operationList = [this.Signal.humanTrainRoute.button.operation,
this.Section.fault.button.operation,
this.Section.defectiveShunting.button.operation,
this.Station.powerUnLock.button.operation,
this.Signal.signalTurnOff.menuButton.operation];
const operationMap = {
[this.Signal.humanTrainRoute.button.operation]:'总人解',
[this.Section.fault.button.operation]:'区故解',
[this.Section.defectiveShunting.button.operation]:'分路不良',
[this.Signal.signalTurnOff.menuButton.operation]:'灭灯'
[this.Signal.signalTurnOff.menuButton.operation]:'灭灯',
[this.Station.powerUnLock.button.operation]:'上电解锁'
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
@ -461,6 +481,10 @@ export default {
//
if (operationList.includes(operation)) {
operate['operateNext'] = this.Command.close.password.operation;
if (operation == this.Station.powerUnLock.button.operation) {
operate.nextCmdType = CMD.Station.CMD_STATION_POWER_ON_UNLOCK;
operate.param = {stationCode: this.$store.state.map.showCentralizedStationCode};
}
this.$refs.password.doShow(operate, operationMap[operation]);
}
this.timeNode = this.$store.state.socket.simulationTimeSync;