From 2ea2c297a33d3a63c476844a1ee46fa4cb353688 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Thu, 12 Mar 2020 17:15:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=97=E4=BA=AC=E4=B8=80=E5=8F=B7=E7=BA=BF?= =?UTF-8?q?=20=E7=8E=B0=E5=9C=B0=20=E4=BF=A1=E5=8F=B7=E9=87=8D=E5=BC=80(?= =?UTF-8?q?=E8=BF=9B=E8=B7=AF=E9=94=81=E9=97=AD=E6=83=85=E5=86=B5)=20?= =?UTF-8?q?=E5=8C=BA=E6=95=85=E8=A7=A3=20=E6=93=8D=E4=BD=9C=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/beijing_01/menus/menuSection.vue | 89 +++++++++---------- .../theme/beijing_01/menus/menuSignal.vue | 28 ++++++ .../theme/beijing_01/menus/menuSwitch.vue | 53 ++++------- 3 files changed, 86 insertions(+), 84 deletions(-) diff --git a/src/jmapNew/theme/beijing_01/menus/menuSection.vue b/src/jmapNew/theme/beijing_01/menus/menuSection.vue index 77fdccda0..a341ad35a 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuSection.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuSection.vue @@ -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, diff --git a/src/jmapNew/theme/beijing_01/menus/menuSignal.vue b/src/jmapNew/theme/beijing_01/menus/menuSignal.vue index f0affb54e..a64facb7a 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuSignal.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuSignal.vue @@ -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 = { diff --git a/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue b/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue index 70354ce37..9267f9e71 100644 --- a/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/beijing_01/menus/menuSwitch.vue @@ -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() {