代码调整
This commit is contained in:
parent
71a045bd14
commit
75fd967879
@ -7,10 +7,11 @@
|
||||
:before-close="doClose"
|
||||
:z-index="2000"
|
||||
:modal="false"
|
||||
title="密码校验"
|
||||
:title="title"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
>
|
||||
<!-- 密码校验 -->
|
||||
<el-row>
|
||||
<el-input v-model="encryptionPassword" placeholder="" size="medium" :disabled="true" style="width: 180px;display: inline-block;float: left;" />
|
||||
<el-button @click="backSpace">退格</el-button>
|
||||
@ -109,7 +110,8 @@ export default {
|
||||
/* 输入值替换为对应长度的星号*/
|
||||
encryptionPassword: '',
|
||||
loading: false,
|
||||
showMistake: false
|
||||
showMistake: false,
|
||||
title:''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -124,7 +126,8 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow(operate) {
|
||||
doShow(operate, title) {
|
||||
this.title = title;
|
||||
this.operate = operate || {};
|
||||
this.operation = operate.operation;
|
||||
if (operate.operateNext) {
|
||||
@ -140,6 +143,7 @@ export default {
|
||||
this.loading = false;
|
||||
this.dialogShow = false;
|
||||
this.showMistake = false;
|
||||
this.title = '';
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
},
|
||||
commit() { // 确定
|
||||
|
@ -389,7 +389,7 @@ export default {
|
||||
operate.param = {throat: 'S', stationCode: this.$store.state.map.showCentralizedStationCode};
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
operate['operateNext'] = this.Command.close.password.operation;
|
||||
this.$refs.password.doShow(operate);
|
||||
this.$refs.password.doShow(operate, 'S引导总锁');
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -405,7 +405,7 @@ export default {
|
||||
operate.param = {throat: 'X', stationCode: this.$store.state.map.showCentralizedStationCode};
|
||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||
operate['operateNext'] = this.Command.close.password.operation;
|
||||
this.$refs.password.doShow(operate);
|
||||
this.$refs.password.doShow(operate, 'X引导总锁');
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -418,6 +418,12 @@ export default {
|
||||
// 以下 会弹出密码框 (总人解,区故解) 铅封按钮
|
||||
const operationList = [this.Signal.humanTrainRoute.button.operation, this.Section.fault.button.operation, this.Section.defectiveShunting.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.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
|
||||
if (valid) {
|
||||
this.operation = operation;
|
||||
@ -427,7 +433,7 @@ export default {
|
||||
// 判断是否需要 弹窗密码框
|
||||
if (operationList.includes(operation)) {
|
||||
operate['operateNext'] = this.Command.close.password.operation;
|
||||
this.$refs.password.doShow(operate);
|
||||
this.$refs.password.doShow(operate, operationMap[operation]);
|
||||
}
|
||||
this.timeNode = this.$store.state.socket.simulationTimeSync;
|
||||
this.$store.dispatch('training/emitTipFresh');
|
||||
@ -555,7 +561,7 @@ export default {
|
||||
this.sendCommand(operate);
|
||||
} else {
|
||||
operate.nextCmdType = CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE;
|
||||
this.$refs.password.doShow(operate);
|
||||
this.$refs.password.doShow(operate, '引导信号');
|
||||
}
|
||||
},
|
||||
// 人解进路
|
||||
@ -649,7 +655,7 @@ export default {
|
||||
operate.cmdType = CMD.Switch.CMD_SWITCH_MASTER_LOCK;
|
||||
this.sendCommand(operate);
|
||||
} else {
|
||||
this.$refs.password.doShow(operate);
|
||||
this.$refs.password.doShow(operate, '引导信号');
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -758,6 +764,7 @@ export default {
|
||||
const modelTypeMap = {
|
||||
// 总辅助按钮
|
||||
'ASSIST':{
|
||||
name:'总辅助',
|
||||
operation:this.CTCCommand.assistPressMainAssist.menu.operation,
|
||||
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_MAIN_ASSIST,
|
||||
param:{
|
||||
@ -768,6 +775,7 @@ export default {
|
||||
},
|
||||
// 改方
|
||||
'CHANGE_DIRECTION':{
|
||||
name:'改方',
|
||||
operation:this.CTCCommand.assistPressDownTurnDirection.menu.operation,
|
||||
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_DOWN_TURN_DIRECTION,
|
||||
param:{
|
||||
@ -778,6 +786,7 @@ export default {
|
||||
},
|
||||
// 接辅助按钮
|
||||
'PICK_ASSIST':{
|
||||
name:'接辅助',
|
||||
// this.CTCCommand.assistPressDownTurnDirection.menu.operation
|
||||
operation:this.CTCCommand.assistPressReceiveAssist.menu.operation,
|
||||
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_RECEIVE_ASSIST,
|
||||
@ -788,6 +797,7 @@ export default {
|
||||
},
|
||||
// 发辅助按钮
|
||||
'DEPART_ASSIST':{
|
||||
name:'发辅助',
|
||||
operation:this.CTCCommand.assistPressDeliverAssist.menu.operation,
|
||||
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_DELIVER_ASSIST,
|
||||
param:{
|
||||
@ -797,6 +807,7 @@ export default {
|
||||
},
|
||||
// 事故按钮
|
||||
'ACCIDENT':{
|
||||
name:'事故',
|
||||
operation:this.CTCCommand.assistPressAccident.menu.operation,
|
||||
nextCmdType:CMD.CTC.CTC_ASSIST_PRESS_ACCIDENT,
|
||||
param:{
|
||||
@ -855,7 +866,7 @@ export default {
|
||||
if (valid) {
|
||||
operate.nextCmdType = modelTypeMap[model.type].nextCmdType;
|
||||
operate['operateNext'] = this.Command.close.password.operation;
|
||||
this.$refs.password.doShow(operate);
|
||||
this.$refs.password.doShow(operate, modelTypeMap[model.type].name);
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
|
Loading…
Reference in New Issue
Block a user