From 1f5d891c55a2b28420affb35be6389badfdea61a Mon Sep 17 00:00:00 2001 From: dong <58670809@qq.com> Date: Mon, 17 Apr 2023 14:40:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=8B=8F=E7=94=B5=E9=99=A2?= =?UTF-8?q?=E4=BA=A4=E6=8E=A7=E7=BA=BF=E8=B7=AF=E9=A1=B6=E9=83=A8=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=E5=B1=95=E5=BC=80=E5=90=8E=E6=B2=A1=E6=B3=95=E6=94=B6?= =?UTF-8?q?=E5=9B=9E=E5=8E=BB=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/jmapNew/theme/chengdu_03/menus/dispatchWorkMenu.vue | 9 +++++++++ .../theme/chengdu_03/menus/dispatchWorkMenuBar.vue | 3 +++ src/jmapNew/theme/chengdu_03/menus/localWorkMenu.vue | 9 +++++++++ src/jmapNew/theme/chengdu_03/menus/localWorkMenuBar.vue | 3 +++ 4 files changed, 24 insertions(+) diff --git a/src/jmapNew/theme/chengdu_03/menus/dispatchWorkMenu.vue b/src/jmapNew/theme/chengdu_03/menus/dispatchWorkMenu.vue index e3fda315d..ed43be196 100644 --- a/src/jmapNew/theme/chengdu_03/menus/dispatchWorkMenu.vue +++ b/src/jmapNew/theme/chengdu_03/menus/dispatchWorkMenu.vue @@ -58,7 +58,16 @@ export default { mounted() { this.$nextTick(() => { this.$store.dispatch('config/updateMenuBar'); + const _that = this; + window.onclick = function (e) { + if (!_that.$store.state.training.trainingStart) { + _that.$refs.menuBar && _that.$refs.menuBar.blankClickClose(); + } + }; }); + }, + beforeDestroy() { + window.onclick = function (e) {}; } }; diff --git a/src/jmapNew/theme/chengdu_03/menus/dispatchWorkMenuBar.vue b/src/jmapNew/theme/chengdu_03/menus/dispatchWorkMenuBar.vue index 74c576be1..93aff0a39 100644 --- a/src/jmapNew/theme/chengdu_03/menus/dispatchWorkMenuBar.vue +++ b/src/jmapNew/theme/chengdu_03/menus/dispatchWorkMenuBar.vue @@ -372,6 +372,9 @@ export default { this.$refs.helpAbout.doShow(operate); } }); + }, + blankClickClose() { + this.$refs.menuBar.doClose(); } } }; diff --git a/src/jmapNew/theme/chengdu_03/menus/localWorkMenu.vue b/src/jmapNew/theme/chengdu_03/menus/localWorkMenu.vue index b3cb3a4df..f20200129 100644 --- a/src/jmapNew/theme/chengdu_03/menus/localWorkMenu.vue +++ b/src/jmapNew/theme/chengdu_03/menus/localWorkMenu.vue @@ -33,7 +33,16 @@ export default { mounted() { this.$nextTick(() => { this.$store.dispatch('config/updateMenuBar'); + const _that = this; + window.onclick = function (e) { + if (!_that.$store.state.training.trainingStart) { + _that.$refs.menuBar && _that.$refs.menuBar.blankClickClose(); + } + }; }); + }, + beforeDestroy() { + window.onclick = function (e) {}; } }; diff --git a/src/jmapNew/theme/chengdu_03/menus/localWorkMenuBar.vue b/src/jmapNew/theme/chengdu_03/menus/localWorkMenuBar.vue index f6ecdebcf..34190d805 100644 --- a/src/jmapNew/theme/chengdu_03/menus/localWorkMenuBar.vue +++ b/src/jmapNew/theme/chengdu_03/menus/localWorkMenuBar.vue @@ -328,6 +328,9 @@ export default { this.$refs.helpAbout.doShow(operate); } }); + }, + blankClickClose() { + this.$refs.menuBar.doClose(); } } };