| | |
| | | |
| | | 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 }, |
| | |
| | | } |
| | | } |
| | | }, |
| | | 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 |