From 7a3a3db7b462b2abdf3440bb7242e8da07184c22 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Mon, 12 Dec 2022 13:17:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../chengdu_03/menus/dispatchWorkMenuBar.vue | 7 +++++++ src/jmapNew/theme/foshan_01/menus/menuSection.vue | 13 +++++++++---- src/jmapNew/theme/foshan_01/menus/menuSignal.vue | 15 ++++++++++----- .../theme/foshan_01/menus/menuStationStand.vue | 3 ++- 4 files changed, 28 insertions(+), 10 deletions(-) diff --git a/src/jmapNew/theme/chengdu_03/menus/dispatchWorkMenuBar.vue b/src/jmapNew/theme/chengdu_03/menus/dispatchWorkMenuBar.vue index 78d163a2c..74c576be1 100644 --- a/src/jmapNew/theme/chengdu_03/menus/dispatchWorkMenuBar.vue +++ b/src/jmapNew/theme/chengdu_03/menus/dispatchWorkMenuBar.vue @@ -10,6 +10,7 @@ import MenuBar from '@/jmapNew/theme/components/menus/menuBarNew'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; import HelpAbout from './menuDialog/helpAbout'; import SetLimitSpeed from './menuDialog/setLimitSpeed'; +import { mapGetters } from 'vuex'; export default { name: 'DispatchWorkMenuBar', @@ -291,9 +292,15 @@ export default { ] }; }, + computed:{ + ...mapGetters('map', [ + 'stationList' + ]) + }, mounted() { this.initMenu(); }, + methods:{ initMenu() { if (this.menuNormal[3]) { diff --git a/src/jmapNew/theme/foshan_01/menus/menuSection.vue b/src/jmapNew/theme/foshan_01/menus/menuSection.vue index f2594c469..abf1a02cd 100644 --- a/src/jmapNew/theme/foshan_01/menus/menuSection.vue +++ b/src/jmapNew/theme/foshan_01/menus/menuSection.vue @@ -64,26 +64,30 @@ export default { label: '区段激活', handler: this.active, cmdType: CMD.Section.CMD_SECTION_ACTIVE, - isDisabled: sectionDevice => sectionDevice.cutOff !== 1 + isDisabled: sectionDevice => sectionDevice.cutOff !== 1, + isShow: (signal, work) => true }, { label: '区段切除', handler: this.split, cmdType: CMD.Section.CMD_SECTION_CUT_OFF, - isDisabled: sectionDevice => sectionDevice.cutOff === 1 + isDisabled: sectionDevice => sectionDevice.cutOff === 1, + isShow: (signal, work) => true }, { label: '设置临时限速', handler: this.setSpeed, cmdType: CMD.Section.CMD_SECTION_SET_LIMIT_SPEED, - isDisabled: (sectionDevice, work) => false + isDisabled: (sectionDevice, work) => false, + isShow: (signal, work) => true }, { label: '全线取消限速', handler: this.cancelSpeed, cmdType:CMD.LimitControl.CMD_CANCEL_ALL_LIMIT_SPEED, - isDisabled: (sectionDevice, work) => false + isDisabled: (sectionDevice, work) => false, + isShow: (signal, work) => true }, { @@ -156,6 +160,7 @@ export default { label: '新建计划车', handler: this.addPlanTrain, cmdType: CMD.Section.CMD_Train_Init_Plan, + isDisabled: (sectionDevice, work) => false, isShow: (sectionDevice, work) => work === 'dispatchWork' }); } diff --git a/src/jmapNew/theme/foshan_01/menus/menuSignal.vue b/src/jmapNew/theme/foshan_01/menus/menuSignal.vue index 757506fb0..aa43b9cc0 100644 --- a/src/jmapNew/theme/foshan_01/menus/menuSignal.vue +++ b/src/jmapNew/theme/foshan_01/menus/menuSignal.vue @@ -67,7 +67,8 @@ export default { label: '进路选排', handler: this.arrangementRoute, cmdType:CMD.Signal.CMD_SIGNAL_SET_ROUTE, - isDisabled: (signal, work) => false + isDisabled: (signal, work) => false, + isShow: (signal, work) => true }, { label: '进路取消', @@ -80,7 +81,8 @@ export default { label: '信号重开', handler: this.reopenSignal, isDisabled: (signal, work) => false, - cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL + cmdType: CMD.Signal.CMD_SIGNAL_REOPEN_SIGNAL, + isShow: (signal, work) => true }, { label: '进路引导', @@ -93,13 +95,15 @@ export default { label: '进路交人工控', handler: this.humanControl, cmdType: CMD.Signal.CMD_SIGNAL_CLOSE_AUTO_SETTING, - isDisabled: (signal, work) => false + isDisabled: (signal, work) => false, + isShow: (signal, work) => true }, { label: '进路交自动控', handler: this.atsAutoControl, cmdType: CMD.Signal.CMD_SIGNAL_OPEN_AUTO_SETTING, - isDisabled: (signal, work) => false + isDisabled: (signal, work) => false, + isShow: (signal, work) => true }, { label: '设置联锁自动进路', @@ -133,7 +137,8 @@ export default { label: '查询进路状态', handler: this.detail, cmdType: CMD.Signal.CMD_SIGNAL_DETAIL, - isDisabled: (signal, work) => false + isDisabled: (signal, work) => false, + isShow: (signal, work) => true } // Local: [ // // { diff --git a/src/jmapNew/theme/foshan_01/menus/menuStationStand.vue b/src/jmapNew/theme/foshan_01/menus/menuStationStand.vue index f3472519b..f9b2eed12 100644 --- a/src/jmapNew/theme/foshan_01/menus/menuStationStand.vue +++ b/src/jmapNew/theme/foshan_01/menus/menuStationStand.vue @@ -96,7 +96,8 @@ export default { cmdType:CMD.Stand.CMD_STAND_WHOLE_LINE_CANCEL_HOLD_TRAIN, isDisabled: (stand, work) => { return false; - } + }, + isShow: (stand, work) => { return true; } }, { label: '强制取消扣车',