From 7cdc3c5878f25983dbc7d2e43ab3cc6876fc6dca Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Mon, 13 Jul 2020 18:40:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=B5=E5=B7=9E=E5=AF=BC=E5=85=A5=E7=8F=AD?= =?UTF-8?q?=E7=BA=A7=E6=8A=A5=E9=94=99=E6=8F=90=E7=A4=BA&=E5=93=88?= =?UTF-8?q?=E5=B0=94=E6=BB=A8=E6=8C=87=E4=BB=A4=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../theme/haerbin_01/menus/menuButton.vue | 77 +++++++++++++------ src/scripts/cmdPlugin/CommandEnum.js | 6 +- src/scripts/cmdPlugin/OperationHandler.js | 36 +++++++++ src/views/studentManage/index.vue | 4 +- 4 files changed, 97 insertions(+), 26 deletions(-) diff --git a/src/jmapNew/theme/haerbin_01/menus/menuButton.vue b/src/jmapNew/theme/haerbin_01/menus/menuButton.vue index a666836e8..2d55fa2d4 100644 --- a/src/jmapNew/theme/haerbin_01/menus/menuButton.vue +++ b/src/jmapNew/theme/haerbin_01/menus/menuButton.vue @@ -7,7 +7,7 @@ @@ -96,13 +96,26 @@ export default { commandId() { return OperationEvent.Command.commandHaerbin.confirm.domId; }, + basicParamList() { + return this.$store.state.training.prdType === '01' ? [ + { name: '接收控制', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menu, show:false }, + { name: '交出控制', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menu, show:false }, + { name: '强行站控', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menu, show:false, securityCommand: true }, + { name: '重启另解', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menu, show:false, securityCommand: true }, + { name: '追踪全开', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menu, show:false }, + { name: '追踪全关', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menu, show:false }, + { name: '关区信号', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menu, show:false }, + { name: '自排全开', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menu, show:false }, + { name: '自排全关', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menu, show:false } + ] : []; + }, sectionParamList() { return this.$store.state.training.prdType === '01' ? [ { name: '封锁区段', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menu, show: false }, - { name: '解封区段', cmdType: CMD.Section.CMD_SECTION_UNBLOCK, operate: OperationEvent.Section.unlock.menu, show: false }, - { name: '轨区消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menu, show: false }, - { name: '轨区设限', cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, operate: OperationEvent.Section.setSpeed.menu, show: false }, - { name: '强解区段', cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menu, show: false } + { name: '解封区段', cmdType: CMD.Section.CMD_SECTION_UNBLOCK, operate: OperationEvent.Section.unlock.menu, show: false, securityCommand: true }, + { name: '轨区消限', cmdType: CMD.Section.CMD_SECTION_CANCEL_LIMIT_SPEED, operate: OperationEvent.Section.cancelSpeed.menu, show: false, securityCommand: true }, + { name: '轨区设限', cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, operate: OperationEvent.Section.setSpeed.menu, show: false, securityCommand: true }, + { name: '强解区段', cmdType: CMD.Section.CMD_SECTION_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menu, show: false, securityCommand: true } ] : [ { name: '封锁区段', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Section.lock.menu, show: false } ]; @@ -110,16 +123,16 @@ export default { swicthParamList() { return this.$store.state.training.prdType === '01' ? [ { name: '封锁道岔', cmdType: CMD.Switch.CMD_SWITCH_BLOCK, operate: OperationEvent.Switch.block.menu, show: false }, - { name: '解封道岔', cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK, operate: OperationEvent.Switch.unblock.menu, show: false }, - { name: '取消锁定', cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK, operate: OperationEvent.Switch.unlock.menu, show: false }, + { name: '解封道岔', cmdType: CMD.Switch.CMD_SWITCH_UNBLOCK, operate: OperationEvent.Switch.unblock.menu, show: false, securityCommand: true }, + { name: '取消锁定', cmdType: CMD.Switch.CMD_SWITCH_SINGLE_UNLOCK, operate: OperationEvent.Switch.unlock.menu, show: false, securityCommand: true }, { name: '单锁道岔', cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK, operate: OperationEvent.Switch.lock.menu, show: false }, { name: '转换定位', cmdType: CMD.Switch.CMD_SWITCH_NORMAL_POSITION, operate: OperationEvent.Switch.locate.menu, show: false }, { name: '转换反位', cmdType: CMD.Switch.CMD_SWITCH_REVERSE_POSITION, operate: OperationEvent.Switch.reverse.menu, show: false }, { name: '封锁区段', cmdType: CMD.Switch.CMD_SWITCH_SECTION_BLOCK, operate: OperationEvent.Section.lock.menu, show: false }, - { name: '解封区段', cmdType: CMD.Switch.CMD_SWITCH_SECTION_UNBLOCK, operate: OperationEvent.Section.unlock.menu, show: false }, - { name: '轨区消限', cmdType: CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED, operate: OperationEvent.Switch.cancelSpeed.menu, show: false }, - { name: '轨区设限', cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED, operate: OperationEvent.Switch.setSpeed.menu, show: false }, - { name: '强解区段', cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menu, show: false } + { name: '解封区段', cmdType: CMD.Switch.CMD_SWITCH_SECTION_UNBLOCK, operate: OperationEvent.Section.unlock.menu, show: false, securityCommand: true }, + { name: '轨区消限', cmdType: CMD.Switch.CMD_SWITCH_CANCEL_LIMIT_SPEED, operate: OperationEvent.Switch.cancelSpeed.menu, show: false, securityCommand: true }, + { name: '轨区设限', cmdType: CMD.Switch.CMD_SWITCH_SET_LIMIT_SPEED, operate: OperationEvent.Switch.setSpeed.menu, show: false, securityCommand: true}, + { name: '强解区段', cmdType: CMD.Switch.CMD_SWITCH_FAULT_UNLOCK, operate: OperationEvent.Section.fault.menu, show: false, securityCommand: true } ] : [ { name: '封锁道岔', cmdType: CMD.Switch.CMD_SWITCH_BLOCK, operate: OperationEvent.Switch.block.menu, show: false }, { name: '单锁道岔', cmdType: CMD.Switch.CMD_SWITCH_SINGLE_LOCK, operate: OperationEvent.Switch.lock.menu, show: false }, @@ -136,7 +149,7 @@ export default { { name: '自排单关', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING, operate: OperationEvent.Signal.humanControl.menu, show: false }, { name: '重复开放', cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL, operate: OperationEvent.Signal.reopenSignal.menu, show: false }, { name: '封锁信号', cmdType: CMD.Signal.CMD_SIGNAL_BLOCK, operate: OperationEvent.Signal.lock.menu, show: false }, - { name: '解封信号', cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK, operate: OperationEvent.Signal.unlock.menu, show: false }, + { name: '解封信号', cmdType: CMD.Signal.CMD_SIGNAL_UNBLOCK, operate: OperationEvent.Signal.unlock.menu, show: false, securityCommand: true }, { name: '关单信号', cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_SIGNAL, operate: OperationEvent.Signal.signalClose.menu, show: false } ] : [ { name: '追踪单开', cmdType: CMD.Signal.CMD_SIGNAL_SET_CI_AUTO, operate: OperationEvent.Signal.setAutoInterlock.menu, show: false }, @@ -150,16 +163,16 @@ export default { }, stationParamList() { return this.$store.state.training.prdType === '01' ? [ - { name: '关站信号', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Signal.cancelTrainRoute.menu, show: false } // 流程未处理 + { name: '关站信号', cmdType: CMD.Station.CMD_STATION_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.closeAllSignal.menu, show: false } // 流程未处理 ] : [ - { name: '接收控制', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Signal.cancelTrainRoute.menu, show: false }, // 流程未处理 - { name: '交出控制', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Signal.cancelTrainRoute.menu, show: false }, // 流程未处理 - { name: '追踪全开', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Signal.cancelTrainRoute.menu, show: false }, // 流程未处理 - { name: '追踪全关', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Signal.cancelTrainRoute.menu, show: false }, // 流程未处理 - { name: '关区信号', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Signal.cancelTrainRoute.menu, show: false }, // 流程未处理 - { name: '自排全开', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Signal.cancelTrainRoute.menu, show: false }, // 流程未处理 - { name: '自排全关', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Signal.cancelTrainRoute.menu, show: false }, // 流程未处理 - { name: '关站信号', cmdType: CMD.Section.CMD_SECTION_BLOCK, operate: OperationEvent.Signal.cancelTrainRoute.menu, show: false } // 流程未处理 + { name: '接收控制', cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_STATION_CONTROL, operate: OperationEvent.StationControl.requestStationControl.menu, show: false }, + { name: '交出控制', cmdType: CMD.ControlConvertMenu.CMD_CM_APPLY_FOR_CENTER_CONTROL, operate: OperationEvent.StationControl.requestCentralControl.menu, show: false }, + { name: '追踪全开', cmdType: CMD.Station.CMD_STATION_SET_CI_AUTO_TRIGGER, operate: OperationEvent.Station.setAutoTrigger.menu, show: false }, + { name: '追踪全关', cmdType: CMD.Station.CMD_STATION_CANCEL_CI_AUTO_TRIGGER, operate: OperationEvent.Station.cancelAutoTrigger.menu, show: false }, + { name: '关区信号', cmdType: CMD.Station.CMD_STATION_CIAREA_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.ciAreaCloseAllSignal.menu, show: false }, + { name: '自排全开', cmdType: CMD.Section.CMD_STATION_OPEN_AUTO_SETTING, operate: OperationEvent.Station.atsAutoControlALL.menu, show: false }, + { name: '自排全关', cmdType: CMD.Section.CMD_STATION_CLOSE_AUTO_SETTING, operate: OperationEvent.Station.humanControlALL.menu, show: false }, + { name: '关站信号', cmdType: CMD.Station.CMD_STATION_CLOSE_ALLSIGNAL, operate: OperationEvent.Station.closeAllSignal.menu, show: false } ]; }, routeParamList() { @@ -169,7 +182,7 @@ export default { { name: '取消ATP', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE, operate: OperationEvent.Signal.cancelTrainRoute.menu, show: false }, { name: '联锁进路', cmdType: CMD.Signal.CMD_SIGNAL_SET_ROUTE, operate: OperationEvent.Signal.arrangementRoute.menu, show: false }, { name: '取消联锁', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE, operate: OperationEvent.Signal.cancelTrainRoute.menu, show: false }, - { name: '引导进路', cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE, operate: OperationEvent.Signal.guide.menu, show: false }, + { name: '引导进路', cmdType: CMD.Signal.CMD_SIGNAL_ROUTE_GUIDE, operate: OperationEvent.Signal.guide.menu, show: false, securityCommand: true }, { name: '取消引导', cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE, operate: OperationEvent.Signal.humanTrainRoute.menu, show: false } ]; } else if (this.$store.state.training.prdType === '02' && this.startVirtual) { @@ -191,6 +204,8 @@ export default { { name: '取消联锁', cmdType: CMD.Signal.CMD_SIGNAL_CANCEL_ROUTE, operate: OperationEvent.Signal.cancelTrainRoute.menu, show: false }, { name: '取消引导', cmdType: CMD.Signal.CMD_SIGNAL_HUMAN_RELEASE_ROUTE, operate: OperationEvent.Signal.humanTrainRoute.menu, show: false } ]; + } else { + return []; } } }, @@ -233,9 +248,14 @@ export default { }).catch((error) => { this.$refs.noticeInfo.doShow({}, error.message); }); + } else { + this.handleBasicMenu(); } } }, + mounted() { + this.handleBasicMenu(); + }, methods: { // 高亮设备 deviceHighLight(device, flag) { @@ -377,6 +397,18 @@ export default { speedLimitValue: '5' }; }, + handleBasicMenu() { + this.centralizedStationList = new Array(15).fill({}); + this.basicParamList.forEach((basic, index) => { + this.centralizedStationList[index] = basic; + }); + this.tempData = []; + const station = this.$store.getters['map/getDeviceByCode'](this.$store.state.map.showCentralizedStationCode); + this.tempData.push(station); + this.param = { + stationCode: this.$store.state.map.showCentralizedStationCode + }; + }, handleStationMenu() { this.centralizedStationList = new Array(15).fill({}); this.stationParamList.forEach((swicth, index) => { @@ -409,7 +441,6 @@ export default { const step = { over: true, cmdType: this.cmdType, - // operation: this.operate, operation: OperationEvent.Command.commandHaerbin.confirm.operation, param: this.param }; diff --git a/src/scripts/cmdPlugin/CommandEnum.js b/src/scripts/cmdPlugin/CommandEnum.js index e6eea90a0..6aff16363 100644 --- a/src/scripts/cmdPlugin/CommandEnum.js +++ b/src/scripts/cmdPlugin/CommandEnum.js @@ -220,7 +220,11 @@ export default { /** 执行关键操作测试 */ CMD_STATION_KEY_OPERATION_TEST: {value: 'Station_Key_Operation_Test', label: '执行关键操作测试'}, // 设置折返策略 - CMD_STATION_SET_TURN_BACK_STRATEGY: {value: 'Station_Set_Turn_Back_Strategy', label: '设置折返策略'} + CMD_STATION_SET_TURN_BACK_STRATEGY: {value: 'Station_Set_Turn_Back_Strategy', label: '设置折返策略'}, + /** 关站信号 */ + CMD_STATION_CLOSE_ALLSIGNAL: {value: 'Station_Close_AllSignal', label:'关站信号'}, + /** 关区信号 */ + CMD_STATION_CIAREA_CLOSE_ALLSIGNAL: {value: 'Station_CIArea_Close_AllSignal', label: '关区信号'} }, // 列车 diff --git a/src/scripts/cmdPlugin/OperationHandler.js b/src/scripts/cmdPlugin/OperationHandler.js index bb9951369..09336a3e7 100644 --- a/src/scripts/cmdPlugin/OperationHandler.js +++ b/src/scripts/cmdPlugin/OperationHandler.js @@ -1741,6 +1741,42 @@ export const OperationEvent = { operation: '6102', domId: '_Tips-Station-setBackStrategy-confirm' } + }, + closeAllSignal: { + menu: { + operation: '611', + domId: '_Tips-Station-closeAllSignal-menu' + }, + mbar: { + operation: '6111', + domId: '_Tips-Station-closeAllSignal-Mbar' + }, + choose: { + operation: '6112', + domId: '_Tips-Station-closeAllSignal-Choose' + }, + confirm: { + operation: '6113', + domId: '_Tips-Station-closeAllSignal-confirm' + } + }, + ciAreaCloseAllSignal: { + menu: { + operation: '612', + domId: '_Tips-Station-ciAreaCloseAllSignal-menu' + }, + mbar: { + operation: '6121', + domId: '_Tips-Station-ciAreaCloseAllSignal-Mbar' + }, + choose: { + operation: '6122', + domId: '_Tips-Station-ciAreaCloseAllSignal-Choose' + }, + confirm: { + operation: '6123', + domId: '_Tips-Station-ciAreaCloseAllSignal-Confirm' + } } }, diff --git a/src/views/studentManage/index.vue b/src/views/studentManage/index.vue index 67ae2fad0..5379ce4f1 100644 --- a/src/views/studentManage/index.vue +++ b/src/views/studentManage/index.vue @@ -455,8 +455,8 @@ export default { }); that.$message.success('学生信息导入成功!'); - }).catch(() => { - that.$message.error('学生信息导入失败!'); + }).catch((err) => { + that.$message.error('学生信息导入失败:' + err.message); }); } catch (error) { that.$message.warning(`解析成绩单失败:${error}`);