ctc调整 总人解
This commit is contained in:
parent
5e7c67205e
commit
9826b6b6f2
@ -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() {
|
||||
|
@ -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() {
|
||||
|
@ -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);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user