西安二号线 开放自动进路/关闭自动进路 操作添加

This commit is contained in:
joylink_cuiweidong 2021-01-21 16:38:29 +08:00
parent 45fd2d348b
commit 21f4b004c9

View File

@ -54,13 +54,13 @@ export default {
}, },
{ {
label: '开放自动进路', label: '开放自动进路',
handler: this.atsAutoControl, handler: this.setAutoInterlock,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
}, },
{ {
label: '关闭自动进路', label: '关闭自动进路',
handler: this.humanControl, handler: this.cancelAutoInterlock,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
}, },
{ {
label: '终端信号封锁', label: '终端信号封锁',
@ -117,13 +117,13 @@ export default {
}, },
{ {
label: '开放自动进路', label: '开放自动进路',
handler: this.atsAutoControl, handler: this.setAutoInterlock,
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO
}, },
{ {
label: '关闭自动进路', label: '关闭自动进路',
handler: this.humanControl, handler: this.cancelAutoInterlock,
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO
}, },
{ {
label: '终端信号封锁', label: '终端信号封锁',
@ -451,20 +451,13 @@ export default {
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();
}); });
}, },
// //
humanControl() { cancelAutoInterlock() {
const routeCodeList = [];
this.routeList.forEach(item => {
if (item.startSignalCode === this.selected.code) {
routeCodeList.push(item.code);
}
});
const step = { const step = {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.Signal.humanControl.menu.operation, operation: OperationEvent.Signal.cancelAutoInterlock.menu.operation,
param: { param: {
signalCode: this.selected.code, signalCode: this.selected.code
routeCodeList: routeCodeList
} }
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
@ -473,7 +466,7 @@ export default {
this.$store.dispatch('menuOperation/pushRequestList', { this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected, device: this.selected,
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '关闭自动进路'}, operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '关闭自动进路'},
cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING, cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO,
param: step.param param: step.param
}); });
} else { } else {
@ -483,20 +476,13 @@ export default {
this.$refs.noticeInfo.doShow(); this.$refs.noticeInfo.doShow();
}); });
}, },
// //
atsAutoControl() { setAutoInterlock() {
const routeCodeList = [];
this.routeList.forEach(item => {
if (item.startSignalCode === this.selected.code) {
routeCodeList.push(item.code);
}
});
const step = { const step = {
code: `${this.selected.code}`, code: `${this.selected.code}`,
operation: OperationEvent.Signal.atsAutoControl.menu.operation, operation: OperationEvent.Signal.setAutoInterlock.menu.operation,
param: { param: {
signalCode: this.selected.code, signalCode: this.selected.code
routeCodeList: routeCodeList
} }
}; };
this.$store.dispatch('training/nextNew', step).then(({ valid }) => { this.$store.dispatch('training/nextNew', step).then(({ valid }) => {
@ -505,7 +491,7 @@ export default {
this.$store.dispatch('menuOperation/pushRequestList', { this.$store.dispatch('menuOperation/pushRequestList', {
device: this.selected, device: this.selected,
operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '开放自动进路'}, operation: { code: OperationEvent.Command.commandXian.confirm.operation, name: '开放自动进路'},
cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING, cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO,
param: step.param param: step.param
}); });
} else { } else {