diff --git a/src/views/BottomPanel/index.vue b/src/views/BottomPanel/index.vue index cfc79f3..453eea4 100644 --- a/src/views/BottomPanel/index.vue +++ b/src/views/BottomPanel/index.vue @@ -32,13 +32,7 @@ const layerData: any = computed(() => { }); const selectedKeys = computed(() => projectStore.selectedLayerKeys); function handleChangeLayer(item: any) { - if (activeLayers.value.includes(item.id)) { - activeLayers.value = activeLayers.value.filter((id: any) => id !== item.id); - // projectStore.setLayerVisibility(item.id, false); - } else { - activeLayers.value.push(item.id); - // projectStore.setLayerVisibility(item.id, true); - } + window.$bus.$emit("change-layer", item); } diff --git a/src/views/Main/Map/components/LayerTree.vue b/src/views/Main/Map/components/LayerTree.vue index 7a57f2a..07faeb7 100644 --- a/src/views/Main/Map/components/LayerTree.vue +++ b/src/views/Main/Map/components/LayerTree.vue @@ -1,9 +1,5 @@ diff --git a/src/views/Main/ProjectOperation/index.vue b/src/views/Main/ProjectOperation/index.vue index ceafaae..1ab0479 100644 --- a/src/views/Main/ProjectOperation/index.vue +++ b/src/views/Main/ProjectOperation/index.vue @@ -56,7 +56,6 @@ watch( () => props.data, (val) => { if (val) { - debugger; resCode.value = val.code; } },