| | |
| | | </el-button> |
| | | </div> |
| | | |
| | | <base-map v-show="showBaseMap" @close="closeBox"></base-map> |
| | | |
| | | <base-map v-show="currentComponent == 'map'" @close="closeBox"></base-map> |
| | | <layers-control v-show="currentComponent == 'layers'" @close="closeBox"></layers-control> |
| | | <tool-list :moreToolShow="moreToolShow" @close="closeBox"></tool-list> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import baseMap from './scomponents/baseMap.vue' |
| | | import layersControl from './scomponents/layersControl.vue' |
| | | import toolList from './scomponents/toolList.vue' |
| | | |
| | | let showBaseMap = ref(false) |
| | | const currentComponent = ref('') |
| | | let moreToolShow = ref(false) |
| | | |
| | | const btnGroup = [ |
| | |
| | | { |
| | | name: '图层', |
| | | icon: 'fa fa-tasks', |
| | | key: 'task' |
| | | key: 'layers', |
| | | }, |
| | | { |
| | | name: '工具', |
| | | icon: 'fa fa-cubes', |
| | | key: 'tool' |
| | | key: 'tool', |
| | | }, |
| | | ] |
| | | |
| | | const btnClick = (item) => { |
| | | |
| | | if (item.key == 'map') { |
| | | showBaseMap.value = !showBaseMap.value |
| | | |
| | | } |
| | | |
| | | if (item.key == 'tool') { |
| | | moreToolShow.value = !moreToolShow.value |
| | | } else { |
| | | currentComponent.value = item.key |
| | | } |
| | | } |
| | | |
| | | const closeBox = (type) => { |
| | | if (type == 'map') showBaseMap.value = false |
| | | |
| | | if (type == 'tool') moreToolShow.value = false |
| | | if (type == 'tool') { |
| | | moreToolShow.value = false |
| | | } else { |
| | | currentComponent.value = '' |
| | | } |
| | | } |
| | | </script> |
| | | |