From 9edb17f44cf158f9722a04af18540813641bf8fa Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Mon, 16 Jan 2023 15:50:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=A6=E8=BE=86=E6=AE=B5=E8=B0=83=E5=BA=A6?= =?UTF-8?q?=E5=8F=96=E6=B6=88=E5=8F=B3=E9=94=AE=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/theme/fuzhou_01/menus/menuSection.vue | 7 +++++-- src/jmapNew/theme/fuzhou_01/menus/menuSignal.vue | 4 ++-- src/jmapNew/theme/fuzhou_01/menus/menuStation.vue | 7 +++++-- src/jmapNew/theme/fuzhou_01/menus/menuStationStand.vue | 7 +++++-- src/jmapNew/theme/fuzhou_01/menus/menuSwitch.vue | 7 +++++-- 5 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuSection.vue b/src/jmapNew/theme/fuzhou_01/menus/menuSection.vue index 92f27a3f8..2d7b90a10 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/menuSection.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/menuSection.vue @@ -147,11 +147,14 @@ export default { ]), ...mapGetters('menuOperation', [ 'buttonOperation' - ]) + ]), + roles() { + return this.$store.state.training.roles; + } }, watch: { '$store.state.menuOperation.menuCount': function (val) { - if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && !this.buttonOperation) { + if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Section) && !this.buttonOperation && !(this.work == 'localWork' && this.roles == 'DEPOT_DISPATCHER')) { this.doShow(this.$store.state.menuOperation.menuPosition); } else { this.doClose(); diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuSignal.vue b/src/jmapNew/theme/fuzhou_01/menus/menuSignal.vue index 5bbb68c86..19c2f66e1 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/menuSignal.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/menuSignal.vue @@ -200,7 +200,7 @@ export default { }, watch: { '$store.state.menuOperation.menuCount': function (val) { - if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation) { + if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Signal) && !this.buttonOperation && !(this.work == 'localWork' && this.roles == 'DEPOT_DISPATCHER')) { this.doShow(this.$store.state.menuOperation.menuPosition); } else { this.doClose(); @@ -282,7 +282,7 @@ export default { initMenu() { this.menu = []; this.menuNormal.forEach(menuItem => { - menuItem.disabled = (!judgeStationControl(this.selected.belongStationCode, this.selected.stationCode, this.work) && this.roles !== 'DEPOT_DISPATCHER') || menuItem.isDisabled(this.selected, this.work); + menuItem.disabled = !judgeStationControl(this.selected.belongStationCode, this.selected.stationCode, this.work) || menuItem.isDisabled(this.selected, this.work); menuItem.show = menuItem.isShow(this.selected, this.work); this.menu.push(menuItem); }); diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue b/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue index 03ac492d1..4294b3d24 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/menuStation.vue @@ -117,11 +117,14 @@ export default { ]), ...mapGetters('menuOperation', [ 'buttonOperation' - ]) + ]), + roles() { + return this.$store.state.training.roles; + } }, watch: { '$store.state.menuOperation.menuCount': function (val) { - if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Station) && !this.buttonOperation) { + if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Station) && !this.buttonOperation && !(this.work == 'localWork' && this.roles == 'DEPOT_DISPATCHER')) { this.doShow(this.$store.state.menuOperation.menuPosition); } else { this.doClose(); diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuStationStand.vue b/src/jmapNew/theme/fuzhou_01/menus/menuStationStand.vue index e0054c41a..a4ff1dd83 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/menuStationStand.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/menuStationStand.vue @@ -183,11 +183,14 @@ export default { ]), ...mapGetters('menuOperation', [ 'buttonOperation' - ]) + ]), + roles() { + return this.$store.state.training.roles; + } }, watch: { '$store.state.menuOperation.menuCount': function (val) { - if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationStand) && !this.buttonOperation) { + if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.StationStand) && !this.buttonOperation && !(this.work == 'localWork' && this.roles == 'DEPOT_DISPATCHER')) { this.doShow(this.$store.state.menuOperation.menuPosition); } else { this.doClose(); diff --git a/src/jmapNew/theme/fuzhou_01/menus/menuSwitch.vue b/src/jmapNew/theme/fuzhou_01/menus/menuSwitch.vue index 2bf468422..d40d2f0a8 100644 --- a/src/jmapNew/theme/fuzhou_01/menus/menuSwitch.vue +++ b/src/jmapNew/theme/fuzhou_01/menus/menuSwitch.vue @@ -151,11 +151,14 @@ export default { }, computed: { ...mapGetters('training', ['mode', 'operatemode']), - ...mapGetters('menuOperation', ['buttonOperation']) + ...mapGetters('menuOperation', ['buttonOperation']), + roles() { + return this.$store.state.training.roles; + } }, watch: { '$store.state.menuOperation.menuCount': function (val) { - if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation) { + if (this.$store.getters['menuOperation/checkDialogIsOpen'](DeviceMenu.Switch) && !this.buttonOperation && !(this.work == 'localWork' && this.roles == 'DEPOT_DISPATCHER')) { this.doShow(this.$store.state.menuOperation.menuPosition); } else { this.doClose();