ctc调整 总人解

This commit is contained in:
fan 2022-06-08 13:05:54 +08:00
parent 5e7c67205e
commit 9826b6b6f2
3 changed files with 50 additions and 30 deletions

View File

@ -30,7 +30,7 @@
<center><b></b><b></b></center>
</span>
</button>
<button :id="Signal.humanTrainRoute.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.humanTrainRoute.button.operation, ['Signal','SignalButton'])">
<button :id="Signal.humanTrainRoute.button.domId" class="button_box" :style="{width: width+'px', backgroundColor:buttonUpColor}" @click="buttonDown(Signal.humanTrainRoute.button.operation, ['Signal'])">
<span style="color: #800000">
<center><b></b></center>
<center><b></b><b></b></center>
@ -536,38 +536,48 @@
//
handleGuideSignal(model) {
const operate = {
over: true,
// over: true,
code: model.code,
operation: this.Signal.guide.button.operation,
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
// cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE,
param: {signalCode: model.signalCode}
};
const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode);
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
this.$store.dispatch('training/updateMapState', [{code: model.code, _type: model._type, hasSelected: 1}]);
}).catch((error) => {
this.$refs.noticeInfo.doShow();
});
// const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode);
// 15s
if (signal.guideTime) {
this.sendCommand(operate);
} else {
operate.nextCmdType = CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE;
this.$refs.password.doShow(operate);
}
// if (signal.guideTime) {
// this.sendCommand(operate);
// } else {
// operate.nextCmdType = CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE;
// this.$refs.password.doShow(operate);
// }
},
//
handleTotalHumanSolution(model) {
const operate = {
over: true,
// over: true,
code: model.code,
operation: this.$store.state.menuOperation.buttonOperation,
val: model.code,
cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
param: { signalCode: model.code }
// cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE
};
const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode || model.code);
if (model._type === 'SignalButton' && model.type === 'PICK' && signal.routeLock) {
operate.param = {signalCode: model.signalCode};
this.sendCommand(operate);
} else if (model._type === 'Signal' && model.type === 'SHUNTING' && signal.routeLock) {
operate.param = {signalCode: model.code};
this.sendCommand(operate);
}
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
}).catch((error) => {
this.$refs.noticeInfo.doShow();
});
// const signal = this.$store.getters['map/getDeviceByCode'](model.signalCode || model.code);
// if (model._type === 'SignalButton' && model.type === 'PICK' && signal.routeLock) {
// operate.param = {signalCode: model.signalCode};
// this.sendCommand(operate);
// } else if (model._type === 'Signal' && model.type === 'SHUNTING' && signal.routeLock) {
// operate.param = {signalCode: model.code};
// this.sendCommand(operate);
// }
},
handelSwitchOperate(model) {
const operate = {
@ -669,9 +679,11 @@
];
console.log(buttonOperation, this.Signal.arrangementRoute.button.operation, 'buttonOperation', this.commandTypeList.includes(model._type));
if (model._type === 'SignalButton' && model.type === 'GUIDE') {
this.handleGuideLock(model);
} else if (buttonOperation && this.commandTypeList.includes(model._type)) {
// if (model._type === 'SignalButton' && model.type === 'GUIDE') {
// this.handleGuideLock(model);
// this.handleGuideSignal(model);
// } else
if (buttonOperation && this.commandTypeList.includes(model._type)) {
if (buttonOperation === this.MixinCommand.totalCancel.button.operation) {
this.handelTotalCancel(model);
} else if (buttonOperation === this.Signal.humanTrainRoute.button.operation) {
@ -687,6 +699,8 @@
} else if (buttonOperation === this.Signal.arrangementRoute.button.operation) {
this.deviceList.push(model);
this.arrangementRouteOperation(this.deviceList);
} else if (buttonOperation === this.Signal.guide.button.operation ) {
this.handleGuideSignal(model);
} else {
this.clearOperate();
}
@ -754,11 +768,19 @@
} else if (this.operation === OperationEvent.Signal.guide.button.operation) {
const operate = {over: true, cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE};
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
this.$store.dispatch('training/updateMapState', [{code: this.selected.code, _type: this.selected._type, hasSelected: 0}]);
this.clearOperate();
}).catch(() => {
this.$store.dispatch('training/updateMapState', [{code: this.selected.code, _type: this.selected._type, hasSelected: 0}]);
this.$refs.noticeInfo.doShow();
this.clearOperate();
})
} else if (this.operation === OperationEvent.Signal.humanTrainRoute.button.operation) {
const operate = {over: true, cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE};
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
}).catch((e) => {
this.$refs.noticeInfo.doShow();
}).finally(() => { this.clearOperate() });
}
},
commandClear() {

View File

@ -78,6 +78,8 @@
this.showMessage = `下发“信号重开”命令吗?`;
} else if (this.operation === OperationEvent.Signal.guide.menu.operation) {
this.showMessage = `下发“引导进路”命令吗?`;
} else if (this.operation === OperationEvent.Signal.humanTrainRoute.menu.operation) {
this.showMessage = `下发“总人解”命令吗?`
} else {
this.showMessage = '';
}
@ -93,6 +95,8 @@
this.sendCommand(menuOperate.Signal.reopenSignal);
} else if (this.operation === OperationEvent.Signal.guide.menu.operation) {
this.$refs.passwordBox.doShow({ operation: OperationEvent.Signal.guide.menu.operation });
} else if (this.operation === OperationEvent.Signal.humanTrainRoute.menu.operation) {
this.sendCommand(menuOperate.Signal.humanTrainRoute);
}
},
cancel() {

View File

@ -102,11 +102,6 @@ export default {
handler: this.guide,
cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE
},
{
label: '点灯/灭灯',
handler: '',
cmdType: ''
},
{
label: '坡道解锁',
handler: '',
@ -301,8 +296,7 @@ export default {
humanTrainRoute() {
commitOperate(menuOperate.Signal.humanTrainRoute, {signalCode: this.selected.code}, 0).then(({valid, operate}) => {
if (valid) {
Object.assign(operate, {operation: OperationEvent.Signal.humanTrainRoute.button.operation });
this.$refs.passwordBox.doShow({...operate, ...{selected: this.selected}});
this.$refs.routeCancel.doShow(operate, this.selected);
}
});
},