From 5b1362f94bbbb1549592a539e0fd6b97be4b2aaa Mon Sep 17 00:00:00 2001 From: joylink_fanyuhong <18706759286@163.com> Date: Thu, 26 Sep 2024 16:10:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=90=E9=83=BD=E4=B8=89=E5=8F=B7=E7=BA=BF?= =?UTF-8?q?=E7=8E=B0=E5=9C=B0=E4=BB=BF=E7=9C=9F=E6=93=8D=E4=BD=9C=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E6=9D=83=E5=88=A4=E6=96=AD=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/chengdu_03/menus/menuButton.vue | 45 ++++++++++++------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/src/jmapNew/theme/chengdu_03/menus/menuButton.vue b/src/jmapNew/theme/chengdu_03/menus/menuButton.vue index a7741da66..731df0fc2 100644 --- a/src/jmapNew/theme/chengdu_03/menus/menuButton.vue +++ b/src/jmapNew/theme/chengdu_03/menus/menuButton.vue @@ -396,19 +396,28 @@ export default { operation: this.$store.state.menuOperation.buttonOperation, param: {} }; - if (model._type === 'StationStand' && subType === 'StopJumpLamp') { + let controlMode = ''; + const station = this.$store.getters['map/getDeviceByCode'](model.stationCode); + if (station) { + controlMode = station.controlMode; + // if (station.controlMode == 'Local' || station.controlMode == 'Emergency') { + // controlFlag = true;Interlock + // } + } + const list2 = ['Local', 'Emergency']; + if (model._type === 'StationStand' && subType === 'StopJumpLamp' && list2.includes(controlMode)) { operate.cmdType = CMD.Stand.CMD_STAND_SET_JUMP_STOP; operate.param = {standCode: model.code, trainGroupNumber: ''}; operate.code = model.code; - } else if (model._type === 'StationStand' && subType === 'CancelStopJumpLamp') { + } else if (model._type === 'StationStand' && subType === 'CancelStopJumpLamp' && list2.includes(controlMode)) { operate.cmdType = CMD.Stand.CMD_STAND_CANCEL_JUMP_STOP; operate.param = {standCode: model.code, trainGroupNumber: ''}; operate.code = model.code; - } else if (model._type === 'AutoTurnBack' ) { + } else if (model._type === 'AutoTurnBack' && controlMode === 'Interlock') { operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_AUTO_TURN_BACK; operate.param = {cycleCode: model.cycleCode}; operate.code = model.code; - } else if (model._type === 'AutomaticRoute') { + } else if (model._type === 'AutomaticRoute' && controlMode === 'Interlock') { const route = this.routeData[model.automaticRouteCode]; operate.cmdType = CMD.Signal.CMD_SIGNAL_SET_CI_AUTO; operate.param = {signalCode: route.startSignalCode}; @@ -443,6 +452,9 @@ export default { operate.code = model.code; break; } + } else { + this.$message.info('请检查操作设备或控制权'); + return; } this.$store.dispatch('trainingNew/next', operate).then(({ valid, response }) => { // 判断是否需要 弹窗密码框 @@ -705,38 +717,37 @@ export default { this.handelFunctionButton(model, subType); } else { const station = this.$store.getters['map/getDeviceByCode'](model.stationCode); + const list1 = ['Local', 'Emergency', 'Interlock']; + const list2 = ['Local', 'Emergency']; if (station) { - if (station.controlMode == 'Local' || station.controlMode == 'Emergency') { if (buttonOperation && this.commandTypeList.includes(model._type)) { this.deviceList.push(model); - if (buttonOperation === this.Signal.arrangementRoute.button.operation) { + if (buttonOperation === this.Signal.arrangementRoute.button.operation && list1.includes(station.controlMode)) { this.arrangementRouteOperation(this.deviceList); } else if (buttonOperation === this.MixinCommand.totalCancel.button.operation) { this.handelTotalCancel(model, subType); - } else if (buttonOperation === this.Signal.humanTrainRoute.button.operation) { + } else if (buttonOperation === this.Signal.humanTrainRoute.button.operation && list1.includes(station.controlMode)) { this.handleTotalHumanSolution(model); - } else if (buttonOperation === this.Signal.guide.button.operation) { + } else if (buttonOperation === this.Signal.guide.button.operation && list1.includes(station.controlMode)) { this.handleGuideRoute(this.deviceList); - } else if (buttonOperation === this.Signal.atsAutoControl.button.operation || buttonOperation === this.Signal.humanControl.button.operation) { + } else if ((buttonOperation === this.Signal.atsAutoControl.button.operation || buttonOperation === this.Signal.humanControl.button.operation) && list2.includes(station.controlMode)) { this.handelControlRoute(model); - } else if (switchOperation.includes(buttonOperation)) { + } else if (switchOperation.includes(buttonOperation) && list1.includes(station.controlMode)) { this.handelSwitchOperate(model); - } else if (buttonOperation === this.MixinCommand.block.button.operation || buttonOperation === this.MixinCommand.unblock.button.operation) { + } else if ((buttonOperation === this.MixinCommand.block.button.operation || buttonOperation === this.MixinCommand.unblock.button.operation) && list1.includes(station.controlMode)) { this.handelBlockOrUnblock(model); - } else if (buttonOperation === this.Station.guideLock.button.operation) { + } else if (buttonOperation === this.Station.guideLock.button.operation && station.controlMode === 'Interlock') { this.handelGuideLock(model); - } else if (buttonOperation === this.Section.fault.button.operation) { + } else if (buttonOperation === this.Section.fault.button.operation && list1.includes(station.controlMode)) { this.handelFaultSection(model); } else { this.clearOperate(); + this.operatemode != OperateMode.FAULT && this.$message.info('请检查操作设备或控制权'); } } else { this.clearOperate(); + this.operatemode != OperateMode.FAULT && this.$message.info('请检查操作设备或控制权'); } - } else { - this.clearOperate(); - this.operatemode != OperateMode.FAULT && this.$message.info('请先切换到站控或紧急站控'); - } } } },