北京一号线 现地 信号重开(进路锁闭情况) 区故解 操作代码调整

This commit is contained in:
joylink_cuiweidong 2020-03-12 17:15:18 +08:00
parent 6031ca59eb
commit 2ea2c297a3
3 changed files with 86 additions and 84 deletions

View File

@ -51,31 +51,31 @@ export default {
menu: [],
menuNormal: {
Local: [
{
label: '区段故障解锁',
handler: this.fault,
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
},
{
label: '区段激活',
handler: this.active,
cmdType: CMD.Section.CMD_SECTION_ACTIVE
},
{
label: '区段切除',
handler: this.split,
cmdType: CMD.Section.CMD_SECTION_CUT_OFF
},
{
label: '区段计轴预复位',
handler: this.axlePreReset,
cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET
},
{
label: '区段设置限速',
handler: this.setSpeed,
cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
}
// {
// label: '',
// handler: this.faultUnlock,
// cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
// },
// {
// label: '',
// handler: this.active,
// cmdType: CMD.Section.CMD_SECTION_ACTIVE
// },
// {
// label: '',
// handler: this.split,
// cmdType: CMD.Section.CMD_SECTION_CUT_OFF
// },
// {
// label: '',
// handler: this.axlePreReset,
// cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET
// },
// {
// label: '',
// handler: this.setSpeed,
// cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED
// }
],
Center: [
{
@ -172,14 +172,19 @@ export default {
},
operationHandler(buttonOperation, selectType) {
switch (buttonOperation) {
case OperationEvent.Signal.guide.button.operation: {
case OperationEvent.Section.fault.menu.operation: {
//
if (selectType.fault) {
this.faultUnlock(selectType);
} else {
this.$refs.noticeInfo.doShow({}, `该区段[${selectType.name}(${selectType.code})]没有故障`);
}
break;
}
case OperationEvent.Signal.guide.button.operation: {
//
break;
}
// case OperationEvent: {
// //
// break;
// }
}
},
// //
@ -205,20 +210,19 @@ export default {
// });
// },
//
fault() {
faultUnlock(selectType) {
const operate = {
start: true,
code: this.selected.code,
operation: OperationEvent.Section.fault.menu.operation,
param: {
sectionCode: `${this.selected.code}`
}
sectionCode: selectType.code
},
cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.sectionCmdControl.doShow(operate, this.selected);
// this.$refs.sectionCmdControl.doShow(operate, this.selected);
}
});
},
@ -299,19 +303,6 @@ export default {
},
//
setSpeed() {
// let operate = {
// start: true,
// code: this.selected.code,
// type: MapDeviceType.Section.type,
// label: MapDeviceType.Section.label,
// operation: OperationEvent.Section.setLimitSpeed.menu.operation
// };
// this.$store.dispatch('training/next', operate).then(({ valid }) => {
// if (valid) {
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// this.$refs.speedCmdControl.doShow(operate, this.selected);
// }
// });
const operate = {
start: true,
code: this.selected.code,

View File

@ -218,6 +218,13 @@ export default {
}
case OperationEvent.Signal.reopenSignal.button.operation: {
//
if (selectType.greenOpen) {
this.$refs.noticeInfo.doShow({}, `信号机[${selectType.name}(${selectType.code})]已开启,无需重开信号机`);
} else {
//
this.reopenSignalByRoute(selectType);
//
}
break;
}
case OperationEvent.Signal.guide.button.operation: {
@ -335,6 +342,27 @@ export default {
}
});
},
//
reopenSignalByRoute(selectType) {
const operate = {
start: true,
code: this.selected.code,
operation: OperationEvent.Signal.reopenSignal.menu.operation,
param: {
signalCode: selectType.code
},
cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
}
}).catch((error) => {
this.$refs.noticeInfo.doShow(operate, error.message);
});
},
//
reopenSignal() {
const operate = {

View File

@ -306,42 +306,25 @@ export default {
}
});
},
//
fault() {
const operate = {
start: true,
code: this.selected.code,
operation: OperationEvent.Switch.fault.menu.operation,
param: {
switchCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid }) => {
if (valid) {
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.switchCmdControl.doShow(operate, this.selected);
}
});
},
//
cancelSpeed() {
const operate = {
start: true,
send: true,
code: this.selected.code,
operation: OperationEvent.Switch.cancelSpeed.menu.operation,
param: {
switchCode: `${this.selected.code}`
}
};
this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
if (valid) {
const tempData = response.data;
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
this.$refs.speedCmdControl.doShow(operate, this.selected, tempData);
}
});
},
// cancelSpeed() {
// const operate = {
// start: true,
// send: true,
// code: this.selected.code,
// operation: OperationEvent.Switch.cancelSpeed.menu.operation,
// param: {
// switchCode: `${this.selected.code}`
// }
// };
// this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => {
// if (valid) {
// const tempData = response.data;
// this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
// this.$refs.speedCmdControl.doShow(operate, this.selected, tempData);
// }
// });
// },
//
split() {