From 0d6be6e129203065dc9547a276f058351c01252c Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 22 Apr 2022 15:23:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=94=B9=E6=96=B9=E6=8C=87?= =?UTF-8?q?=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/datie_02/menus/menuButton.vue | 56 ++++++++++++++----- src/scripts/cmdPlugin/CommandEnum.js | 9 +-- src/scripts/cmdPlugin/OperationHandler.js | 44 ++++++++------- 3 files changed, 71 insertions(+), 38 deletions(-) diff --git a/src/jmapNew/theme/datie_02/menus/menuButton.vue b/src/jmapNew/theme/datie_02/menus/menuButton.vue index 08b016802..924ccbcce 100644 --- a/src/jmapNew/theme/datie_02/menus/menuButton.vue +++ b/src/jmapNew/theme/datie_02/menus/menuButton.vue @@ -71,16 +71,16 @@
道岔解封
- - + + - + @@ -194,6 +194,9 @@ export default { Signal() { return OperationEvent.Signal; }, + CTCCommand() { + return OperationEvent.CTCCommand; + }, MixinCommand() { return OperationEvent.MixinCommand; }, @@ -604,6 +607,7 @@ export default { this.sendCommand(operate); } }, + // CHANGE_DIRECTION selectedChange() { // 按钮按下时 const model = this.selected; // 选择设备 @@ -641,6 +645,9 @@ export default { } else if (model._type === 'SignalButton' && !this.checkSignalBlock(model.signalCode) || (model._type === 'Signal' && !model.blockade)) { this.deviceList.push(model); this.arrangementRouteOperation(this.deviceList); + } else if (model._type === 'SignalButton' && model.type === 'CHANGE_DIRECTION') { + // 改方操作 + this.changeDirection(model); } else { this.clearOperate(); } @@ -658,6 +665,25 @@ export default { this.deviceList = []; Handler.clear(); // 清空操作组 this.$store.dispatch('menuOperation/setButtonOperation', null); + }, + changeDirection(model) { + const operate = { + over: true, + code: model.code, + operation: this.CTCCommand.assistPressDownTurnDirection.menu.operation, + cmdType: CMD.CTC.CTC_ASSIST_PRESS_DOWN_TURN_DIRECTION, + param: { + labelEnum:model.labelEnum, + stationCode:model.stationCode + } + }; + this.$store.dispatch('training/nextNew', operate).then(({ valid, response }) => { + // this.clearOperate(); + }).catch((error) => { + // this.clearOperate(); + console.error(error); + this.$refs.noticeInfo.doShow(); + }); } } }; diff --git a/src/scripts/cmdPlugin/CommandEnum.js b/src/scripts/cmdPlugin/CommandEnum.js index 61f5114d9..bb08a6ac2 100644 --- a/src/scripts/cmdPlugin/CommandEnum.js +++ b/src/scripts/cmdPlugin/CommandEnum.js @@ -367,8 +367,9 @@ export default { DirectionRod: { CMD_DIRECTION_CHANGE: {value: 'Direction_Change', label: '切换方向'} }, - CTC: { - CTC_RECEIVING_NOTICE: {value: 'CTC_RECEIVING_NOTICE', label: '接预'}, - CTC_DEPARTURE_NOTICE: {value: 'CTC_DEPARTURE_NOTICE', label: '发预'} - } + CTC: { + CTC_RECEIVING_NOTICE: {value: 'CTC_RECEIVING_NOTICE', label: '接预'}, + CTC_DEPARTURE_NOTICE: {value: 'CTC_DEPARTURE_NOTICE', label: '发预'}, + CTC_ASSIST_PRESS_DOWN_TURN_DIRECTION:{value:'ASSIST_PRESS_DOWN_TURN_DIRECTION', label:'改方'} + } }; diff --git a/src/scripts/cmdPlugin/OperationHandler.js b/src/scripts/cmdPlugin/OperationHandler.js index 3e15e8cf4..402f59db9 100644 --- a/src/scripts/cmdPlugin/OperationHandler.js +++ b/src/scripts/cmdPlugin/OperationHandler.js @@ -1748,20 +1748,20 @@ export const OperationEvent = { domId: '_Tips-Signal-conflictRoute-Menu{TOP}' } }, - // 点灯 (大铁) - signalLight: { + // 点灯 (大铁) + signalLight: { menuButton: { operation: '3231', - domId: '_Tips-Signal-signalLight-MenuButton{BOTTOM}' - } - }, - // 灭灯 (大铁) - signalDestroy: { + domId: '_Tips-Signal-signalLight-MenuButton{BOTTOM}' + } + }, + // 灭灯 (大铁) + signalDestroy: { menuButton: { operation: '3232', - domId: '_Tips-Signal-signalDestroy-MenuButton{BOTTOM}' - } - } + domId: '_Tips-Signal-signalDestroy-MenuButton{BOTTOM}' + } + } }, // 物理区段操作 @@ -3537,20 +3537,26 @@ export const OperationEvent = { } } }, - CTCCommand: { + CTCCommand: { receivingNotice: { menu: { operation: '1100', - domId: '_Tips-CTC-ReceivingNotice-Menu{TOP}' - } - }, - departureNotice: { + domId: '_Tips-CTC-ReceivingNotice-Menu{TOP}' + } + }, + departureNotice: { menu: { operation: '1101', - domId: '_Tips-CTC-DepartureNotice-Menu{TOP}' - } - } - } + domId: '_Tips-CTC-DepartureNotice-Menu{TOP}' + } + }, + assistPressDownTurnDirection:{ + menu:{ + operation:'1102', + domId: '_Tips-CTC-AssistPressDownTurnDirection-Menu{TOP}' + } + } + } };