From 0eb2de2d7631496fb6d9db215852c43b49793f6a Mon Sep 17 00:00:00 2001
From: wangqi <magical1908@outlook.com>
Date: 星期一, 12 四月 2021 15:08:45 +0800
Subject: [PATCH] Merge branch 'develop' of http://xearth.cn:6600/r/wuyushui/SewerAndRainNetwork into develop

---
 src/components/LayerController/LayerController.vue |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/src/components/LayerController/LayerController.vue b/src/components/LayerController/LayerController.vue
index fe80364..ef07406 100644
--- a/src/components/LayerController/LayerController.vue
+++ b/src/components/LayerController/LayerController.vue
@@ -21,7 +21,7 @@
 
 import iconSetting from '@/assets/images/map-pages/icon/setting.png'
 import LcServiceLayer from './modules/LcServiceLayer'
-
+import bus from '@/eventBus'
 export default {
   name: 'LayerController',
   components: { LcServiceLayer },
@@ -55,9 +55,22 @@
       }
     }
   },
+  mounted () {
+    const that = this
+    bus.$on('changeState', function (state) {
+      if (state.num !== 3 && state.type) {
+        that.layerControllerVisible = false
+      }
+    })
+  },
   methods: {
     showPanel () {
       this.layerControllerVisible = !this.layerControllerVisible
+      const state = {
+        type: this.layerControllerVisible,
+        num: 3
+      }
+      bus.$emit('changeState', state)
     },
     switchPanel () {
       this.panelSwitch.main = !this.panelSwitch.main

--
Gitblit v1.8.0