From 5858bb1eb329e4b4a02e777d6302e2899483deae Mon Sep 17 00:00:00 2001 From: lVAL Date: Tue, 26 Jan 2021 15:02:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/nanjing_02/menus/menuButton.vue | 229 ++++++++---------- 1 file changed, 97 insertions(+), 132 deletions(-) diff --git a/src/jmapNew/theme/nanjing_02/menus/menuButton.vue b/src/jmapNew/theme/nanjing_02/menus/menuButton.vue index 2642c8825..058699c40 100644 --- a/src/jmapNew/theme/nanjing_02/menus/menuButton.vue +++ b/src/jmapNew/theme/nanjing_02/menus/menuButton.vue @@ -328,7 +328,7 @@ export default { return OperationEvent.Command.commandHaerbin.confrimCr2.domId; }, stationContorl() { - return this.getStationControl(this.selected || {}) || this.getStationControl({_type: 'Station', code: this.$store.state.map.showCentralizedStationCode}) || {}; + return this.getStationControl(this.selectedObj || {}) || this.getStationControl({_type: 'Station', code: this.$store.state.map.showCentralizedStationCode}) || {}; }, isLocal() { return this.$store.state.training.prdType == '01'; @@ -350,7 +350,7 @@ export default { if (!val) { this.doClose(); } - }, + }, 'selected': function (val) { this.initMenus();// 初始化菜单数据 this.pushTempData([]); // 清空执行栏 @@ -391,9 +391,7 @@ export default { } }, '$store.state.map.mapStationStateUpdateCount': function() { - if (!this.selected || !this.selected.code) { - this.handleBasicMenu(); - } + this.initCentralizedStationList([...this.centralizedStationList]) } }, mounted() { @@ -401,6 +399,16 @@ export default { this.handleBasicMenu(); }, methods: { + initCentralizedStationList(list, selectedObj=this.selectedObj) { + const stationContorl = this.getStationControl(selectedObj || {}) || this.getStationControl({_type: 'Station', code: this.$store.state.map.showCentralizedStationCode}) || {}; + this.centralizedStationList = new Array(15).fill({}); + list.forEach((el, index) => { + if (el.disabledCb && stationContorl) { + el.disabled = el.disabledCb(stationContorl); + } + this.centralizedStationList[index] = el; + }); + }, checkBelongCentralizedStationByInputStr(inputStr, station) { const child= this.stationList.find(el => el.depot ? false : el.jp == inputStr ); if (child && station) { @@ -462,7 +470,10 @@ export default { this.deviceHighLight(this.oldDevice, false); this.deviceHighLight(this.selectedObj, true); this.oldDevice = this.selectedObj; - break; + break; + default: + this.handleBasicMenu(); + break; } }, handleIbpShow() { @@ -525,13 +536,7 @@ export default { }); this.oldDevice = section; - this.centralizedStationList = new Array(15).fill({}); - this.switchParamList.forEach((swicth, index) => { - this.centralizedStationList[index] = swicth; - if (swicth.disabledCb && this.selectedObj) { - swicth.disabled = swicth.disabledCb(this.selectedObj); - } - }); + this.initCentralizedStationList(this.switchParamList); this.pushTempData([this.selectedObj]); this.param = { switchCode: this.selectedObj.code, @@ -546,16 +551,8 @@ export default { this.deviceHighLight(this.oldClickObj, false); } - this.oldClickObj = deepAssign({}, this.selectedObj); - this.centralizedStationList = new Array(15).fill({}); - this.signalParamList.forEach((singal, index) => { - if (singal.disabledCb && this.selectedObj) { - singal.disabled = singal.disabledCb(this.selectedObj); - } - - this.centralizedStationList[index] = singal; - }); - + this.oldClickObj = deepAssign({}, this.selectedObj); + this.initCentralizedStationList(this.signalParamList); this.pushTempData([this.selectedObj]); this.param = { signalCode: this.selectedObj.code @@ -564,16 +561,9 @@ export default { handleSectionMenu() { this.deviceHighLight(this.oldDevice, false); this.deviceHighLight(this.selectedObj, true); - this.oldDevice = this.selectedObj; - - this.centralizedStationList = new Array(15).fill({}); - this.sectionParamList.forEach((section, index) => { - this.centralizedStationList[index] = section; - if (section.disabledCb && this.selectedObj) { - section.disabled = section.disabledCb(this.selectedObj); - } - }); + this.oldClickObj = deepAssign({}, this.selectedObj); + this.initCentralizedStationList(this.sectionParamList); this.pushTempData([this.selectedObj]); this.param = { sectionCode: this.selectedObj.code @@ -584,17 +574,10 @@ export default { this.deviceHighLight(this.oldDevice, false); if (this.oldClickObj) { this.deviceHighLight(this.oldClickObj, false); - } - this.oldClickObj = null; // 清空上次点击信号机 - - this.centralizedStationList = new Array(15).fill({}); - this.basicParamList.forEach((basic, index) => { - this.centralizedStationList[index] = basic; - if (basic.disabledCb && station) { - basic.disabled = basic.disabledCb(station); - } - }); + } + this.oldClickObj = null; // 清空上次点击信号机 + this.initCentralizedStationList(this.basicParamList, station); this.pushTempData(station ? [station] : []); this.param = { @@ -603,14 +586,7 @@ export default { }; }, handleStationMenu() { - this.centralizedStationList = new Array(15).fill({}); - this.stationParamList.forEach((station, index) => { - this.centralizedStationList[index] = station; - if (station.disabledCb && this.selectedObj) { - station.disabled = station.disabledCb(this.selectedObj); - } - }); - + this.initCentralizedStationList(this.stationParamList); this.pushTempData([this.selectedObj]); this.param = { stationCode: this.selectedObj.code }; }, @@ -619,15 +595,9 @@ export default { this.deviceHighLight(this.oldDevice, false); this.deviceHighLight(this.selectedObj, true); this.oldDevice = this.selectedObj; - } - this.centralizedStationList = new Array(15).fill({}); - this.standParamList.forEach((stand, index) => { - this.centralizedStationList[index] = stand; - if (stand.disabledCb && this.selectedObj) { - stand.disabled = stand.disabledCb(this.selectedObj); - } - }); + } + this.initCentralizedStationList(this.standParamList); const data = Object.assign(this.selectedObj); const station = this.$store.getters['map/getDeviceByCode'](this.selectedObj.stationCode); data.name = `${station.name} ${data.right ? '上行' : '下行'}`; @@ -636,14 +606,8 @@ export default { standCode: this.selectedObj.code }; }, - handleRouteMenu() { // 进路命令覆盖 - this.centralizedStationList = new Array(15).fill({}); - this.routeParamList.forEach((swicth, index) => { - this.centralizedStationList[index] = swicth; - if (swicth.disabledCb && this.selectedObj) { - swicth.disabled = swicth.disabledCb(this.selectedObj); - } - }); + handleRouteMenu() { // 进路命令覆盖 + this.initCentralizedStationList(this.routeParamList); if (this.selectedObj._event === MouseEvent.Right) { this.rightClickDialogVisible = true; } @@ -816,13 +780,15 @@ export default { this.$store.dispatch('training/nextNew', step).then(({ valid }) => { if (valid) { this.pushTempData([{ name: `${this.cmdType.label}成功` }]); - this.doClose(); + this.doClose(); + this.handleDeviceMenu(); this.handleClose(); } }).catch((error) => { console.error(error); this.pushTempData([{ name: `${this.cmdType.label}失败` }]); - this.doClose(); + this.doClose(); + this.handleDeviceMenu(); this.handleClose(); this.$refs.noticeInfo.doShow(); }); @@ -842,9 +808,8 @@ export default { this.operate = ''; // 清空指令 this.cmdType = ''; this.securityCommand = ''; - // this.speedLimitValue = 15; this.speedLimitValue = ''; - this.secondConfirm = false; + this.secondConfirm = false; this.cr1Confrim = false; if (this.oldClickObj) { this.deviceHighLight(this.oldClickObj, false); @@ -985,14 +950,14 @@ export default { { name: '' }, { name: '' }, { name: '' }, - { name: '强行站控', cmdType: CMD.ControlConvertMenu.CMD_CM_FORCE_STATION_CONTROL, operate: OperationEvent.StationControl.forcedStationControl.menu, securityCommand: true, disabledCb: (selectedObj) => ['Local'].includes(selectedObj.controlMode) }, - { name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, disabledCb: (selectedObj) => ['Local'].includes(selectedObj.controlMode) }, - { name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, disabledCb: (selectedObj) => ['Center'].includes(selectedObj.controlMode) }, + { name: '强行站控', cmdType: CMD.ControlConvertMenu.CMD_CM_FORCE_STATION_CONTROL, operate: OperationEvent.StationControl.forcedStationControl.menu, securityCommand: true, disabledCb: (stationControl) => ['Local'].includes(stationControl.controlMode) }, + { name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, disabledCb: (stationControl) => ['Local'].includes(stationControl.controlMode) }, + { name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, disabledCb: (stationControl) => ['Center'].includes(stationControl.controlMode) }, { name: '' }, { name: '' }, { name: '' }, { name: '' }, - { name: '关闭索引', cmdType: '', operate: OperationEvent.StationControl.requestCentralControl.menu, disabledCb: (selectedObj) => ['None'].includes(selectedObj.controlMode) } + { name: '关闭索引', cmdType: '', operate: OperationEvent.StationControl.requestCentralControl.menu, disabledCb: (stationControl) => ['None'].includes(stationControl.controlMode) } ] : [ { name: '' }, { name: '' }, @@ -1011,79 +976,79 @@ export default { { name: '' } ]; this.sectionParamList = this.selected && this.selected.type == '05' ? [ - { name: '岔芯设限', cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, operate: OperationEvent.Section.setSpeed.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '岔芯消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '强行消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '预复位', cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '封锁岔心', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menuButton, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '解封岔心', cmdType: CMD.Section.CMD_SECTION_UNBLOCK, operate: OperationEvent.Section.unlock.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '强解岔心', cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch } + { name: '岔芯设限', cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, operate: OperationEvent.Section.setSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }, + { name: '岔芯消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }, + { name: '强行消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }, + { name: '预复位', cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }, + { name: '封锁岔心', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menuButton, disabledCb: (stationControl) => !this.modeMatch }, + { name: '解封岔心', cmdType: CMD.Section.CMD_SECTION_UNBLOCK, operate: OperationEvent.Section.unlock.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }, + { name: '强解岔心', cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch } ] : [ - { name: '轨区设限', cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, operate: OperationEvent.Section.setSpeed.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '轨区消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '强行消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '强解区段', cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '预复位', cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '封锁区段', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menuButton, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '解封区段', cmdType: CMD.Section.CMD_SECTION_UNBLOCK, operate: OperationEvent.Section.unlock.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch } + { name: '轨区设限', cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, operate: OperationEvent.Section.setSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }, + { name: '轨区消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }, + { name: '强行消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }, + { name: '强解区段', cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }, + { name: '预复位', cmdType: CMD.Section.CMD_SECTION_AXIS_PRE_RESET, operate: OperationEvent.Section.cancelSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }, + { name: '封锁区段', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menuButton, disabledCb: (stationControl) => !this.modeMatch }, + { name: '解封区段', cmdType: CMD.Section.CMD_SECTION_UNBLOCK, operate: OperationEvent.Section.unlock.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch } ]; this.switchParamList = [ - { name: '岔区设限', cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED, operate: OperationEvent.Switch.setSpeed.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch}, - { name: '岔区消限', cmdType: CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED, operate: OperationEvent.Switch.cancelSpeed.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '转换道岔', cmdType: CMD.Switch.CMD_SWITCH_TURN, operate: OperationEvent.Switch.locate.menuButton, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '强行转岔', cmdType: CMD.Switch.CMD_SWITCH_FORCE_TURN, operate: OperationEvent.Switch.locate.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '强解道岔', cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '挤岔恢复', cmdType: CMD.Switch.CMD_SWITCH_SQUEEZE_RECOVERY, operate: OperationEvent.Section.fault.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch || selectedObj.fault !== 'SQUEEZE' }, - { name: '单独锁定', cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK, operate: OperationEvent.Switch.lock.menuButton, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '取消锁定', cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK, operate: OperationEvent.Switch.unlock.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '预复位', cmdType: CMD.Switch.CMD_SWITCH_AXLE_PRE_RESET, operate: OperationEvent.Switch.axlePreReset.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '封锁道岔', cmdType: CMD.Switch.CMD_SWITCH_BLOCK, operate: OperationEvent.Switch.block.menuButton, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '解封道岔', cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK, operate: OperationEvent.Switch.unblock.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '强行消限', cmdType: CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED, operate: OperationEvent.Switch.cancelSpeed.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch } + { name: '岔区设限', cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED, operate: OperationEvent.Switch.setSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch}, + { name: '岔区消限', cmdType: CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED, operate: OperationEvent.Switch.cancelSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }, + { name: '转换道岔', cmdType: CMD.Switch.CMD_SWITCH_TURN, operate: OperationEvent.Switch.locate.menuButton, disabledCb: (stationControl) => !this.modeMatch }, + { name: '强行转岔', cmdType: CMD.Switch.CMD_SWITCH_FORCE_TURN, operate: OperationEvent.Switch.locate.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }, + { name: '强解道岔', cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }, + { name: '挤岔恢复', cmdType: CMD.Switch.CMD_SWITCH_SQUEEZE_RECOVERY, operate: OperationEvent.Section.fault.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }, + { name: '单独锁定', cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK, operate: OperationEvent.Switch.lock.menuButton, disabledCb: (stationControl) => !this.modeMatch }, + { name: '取消锁定', cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK, operate: OperationEvent.Switch.unlock.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }, + { name: '预复位', cmdType: CMD.Switch.CMD_SWITCH_AXLE_PRE_RESET, operate: OperationEvent.Switch.axlePreReset.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }, + { name: '封锁道岔', cmdType: CMD.Switch.CMD_SWITCH_BLOCK, operate: OperationEvent.Switch.block.menuButton, disabledCb: (stationControl) => !this.modeMatch }, + { name: '解封道岔', cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK, operate: OperationEvent.Switch.unblock.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }, + { name: '强行消限', cmdType: CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED, operate: OperationEvent.Switch.cancelSpeed.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch } ]; this.signalParamList = this.$store.state.training.prdType === '01' ? [ - { name: '关闭信号', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL, operate: OperationEvent.Signal.signalClose.menuButton, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '封锁信号', cmdType: CMD.Signal.CMD_SIGNAL_BLOCK, operate: OperationEvent.Signal.lock.menuButton, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '开放信号', cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '解封信号', cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK, operate: OperationEvent.Signal.unlock.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch }, + { name: '关闭信号', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL, operate: OperationEvent.Signal.signalClose.menuButton, disabledCb: (stationControl) => !this.modeMatch }, + { name: '封锁信号', cmdType: CMD.Signal.CMD_SIGNAL_BLOCK, operate: OperationEvent.Signal.lock.menuButton, disabledCb: (stationControl) => !this.modeMatch }, + { name: '开放信号', cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch }, + { name: '解封信号', cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK, operate: OperationEvent.Signal.unlock.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }, - { name: '自排单开', cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING, operate: OperationEvent.Signal.atsAutoControl.menuButton, disabledCb: (selectedObj) => selectedObj.atsControl || !this.modeMatch }, - { name: '自排单关', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING, operate: OperationEvent.Signal.humanControl.menuButton, disabledCb: (selectedObj) => !selectedObj.atsControl || !this.modeMatch }, - { name: '追踪单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Signal.setAutoTrigger.menuButton, disabledCb: (selectedObj) => selectedObj.atsControl || !this.modeMatch }, - { name: '追踪单关', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER, operate: OperationEvent.Signal.cancelAutoTrigger.menuButton, disabledCb: (selectedObj) => !selectedObj.atsControl || !this.modeMatch }, + { name: '自排单开', cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING, operate: OperationEvent.Signal.atsAutoControl.menuButton, disabledCb: (stationControl) => !this.modeMatch }, + { name: '自排单关', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING, operate: OperationEvent.Signal.humanControl.menuButton, disabledCb: (stationControl) => !this.modeMatch }, + { name: '追踪单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Signal.setAutoTrigger.menuButton, disabledCb: (stationControl) => !this.modeMatch }, + { name: '追踪单关', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER, operate: OperationEvent.Signal.cancelAutoTrigger.menuButton, disabledCb: (stationControl) => !this.modeMatch }, - { name: '开放引导', cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE, operate: OperationEvent.Signal.reopenSignal.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '车队单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '车队单关', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '设置保护', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '未评限区', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch } + { name: '开放引导', cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE, operate: OperationEvent.Signal.reopenSignal.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }, + { name: '车队单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch }, + { name: '车队单关', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch }, + { name: '设置保护', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch }, + { name: '未评限区', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch } ] : [ - { name: '关闭信号', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL, operate: OperationEvent.Signal.signalClose.menuButton, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '封锁信号', cmdType: CMD.Signal.CMD_SIGNAL_BLOCK, operate: OperationEvent.Signal.lock.menuButton, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '开放信号', cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '解封信号', cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK, operate: OperationEvent.Signal.unlock.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch }, + { name: '关闭信号', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL, operate: OperationEvent.Signal.signalClose.menuButton, disabledCb: (stationControl) => !this.modeMatch }, + { name: '封锁信号', cmdType: CMD.Signal.CMD_SIGNAL_BLOCK, operate: OperationEvent.Signal.lock.menuButton, disabledCb: (stationControl) => !this.modeMatch }, + { name: '开放信号', cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch }, + { name: '解封信号', cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK, operate: OperationEvent.Signal.unlock.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }, - { name: '自排单开', cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING, operate: OperationEvent.Signal.atsAutoControl.menuButton, disabledCb: (selectedObj) => selectedObj.atsControl || !this.modeMatch }, - { name: '自排单关', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING, operate: OperationEvent.Signal.humanControl.menuButton, disabledCb: (selectedObj) => !selectedObj.atsControl || !this.modeMatch }, - { name: '追踪单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Signal.setAutoTrigger.menuButton, disabledCb: (selectedObj) => selectedObj.ciControl || !this.modeMatch }, - { name: '追踪单关', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER, operate: OperationEvent.Signal.cancelAutoTrigger.menuButton, disabledCb: (selectedObj) => !selectedObj.ciControl || !this.modeMatch }, + { name: '自排单开', cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING, operate: OperationEvent.Signal.atsAutoControl.menuButton, disabledCb: (stationControl) => !this.modeMatch || stationControl.atsControl }, + { name: '自排单关', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING, operate: OperationEvent.Signal.humanControl.menuButton, disabledCb: (stationControl) => !this.modeMatch || !stationControl.atsControl }, + { name: '追踪单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Signal.setAutoTrigger.menuButton, disabledCb: (stationControl) => !this.modeMatch || stationControl.ciControl }, + { name: '追踪单关', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO_TRIGGER, operate: OperationEvent.Signal.cancelAutoTrigger.menuButton, disabledCb: (stationControl) => !this.modeMatch || !stationControl.ciControl }, - { name: '开放引导', cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE, operate: OperationEvent.Signal.reopenSignal.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '车队单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '车队单关', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '设置保护', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '未评限区', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, securityCommand: true, disabledCb: (selectedObj) => !this.modeMatch } + { name: '开放引导', cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE, operate: OperationEvent.Signal.reopenSignal.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch }, + { name: '车队单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch }, + { name: '车队单关', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_CI_AUTO, operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch }, + { name: '设置保护', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, disabledCb: (stationControl) => !this.modeMatch }, + { name: '未评限区', cmdType: '', operate: OperationEvent.Signal.reopenSignal.menuButton, securityCommand: true, disabledCb: (stationControl) => !this.modeMatch } ]; this.stationParamList = this.$store.state.training.prdType === '01' ? [ - { name: '关站信号', cmdType: CMD.Station.CMD_STATION_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.closeAllSignal.menu, disabledCb: (selectedObj) => !['Local'].includes(selectedObj.controlMode) || !this.modeMatch } + { name: '关站信号', cmdType: CMD.Station.CMD_STATION_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.closeAllSignal.menu, disabledCb: (stationControl) => !this.modeMatch || !['Local'].includes(stationControl.controlMode) } ] : [ - { name: '关站信号', cmdType: CMD.Station.CMD_STATION_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.closeAllSignal.menu, disabledCb: (selectedObj) => !['Local'].includes(selectedObj.controlMode) || !this.modeMatch }, - { name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, disabledCb: (selectedObj) => ['Center'].includes(selectedObj.controlMode) }, - { name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, disabledCb: (selectedObj) => ['Local', 'None'].includes(selectedObj.controlMode) } + { name: '关站信号', cmdType: CMD.Station.CMD_STATION_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.closeAllSignal.menu, disabledCb: (stationControl) => !this.modeMatch || !['Local'].includes(stationControl.controlMode) }, + { name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_RECEIVE_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, disabledCb: (stationControl) => ['Center'].includes(stationControl.controlMode) }, + { name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_SURRENDER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, disabledCb: (stationControl) => ['Local', 'None'].includes(stationControl.controlMode) } ]; this.routeParamList = [ - { name: '排列进路', cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE, operate: OperationEvent.Signal.arrangementRoute.menuButton, disabledCb: (selectedObj) => !this.modeMatch }, - { name: '取消进路', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE, operate: OperationEvent.Signal.cancelTrainRoute.menuButton, disabledCb: (selectedObj) => !this.modeMatch } + { name: '排列进路', cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE, operate: OperationEvent.Signal.arrangementRoute.menuButton, disabledCb: (stationControl) => !this.modeMatch }, + { name: '取消进路', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE, operate: OperationEvent.Signal.cancelTrainRoute.menuButton, disabledCb: (stationControl) => !this.modeMatch } ]; } }