From 8e5167a6b2fb0ac1852b1302875bab0cc5f5a639 Mon Sep 17 00:00:00 2001 From: chenyabin <Chenab123!> Date: 星期二, 13 四月 2021 16:41:22 +0800 Subject: [PATCH] 添加管道变更搜索,管道信息搜索 --- 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