@@ -21,10 +18,10 @@ const projectStore = useProjectStore();
defineOptions({
name: "bottom-panel",
});
-const activeLayers = ref([]);
+const activeLayers = ref
([]);
const listName = ref(["水库点", "堤防", "水闸"]);
const layerData: any = computed(() => {
- const list = [];
+ const list: any[] = [];
listName.value.forEach((item, index) => {
const layer = projectStore.getLayerByName(item);
if (layer) {
@@ -37,10 +34,10 @@ 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);
+ // projectStore.setLayerVisibility(item.id, false);
} else {
activeLayers.value.push(item.id);
- projectStore.setLayerVisibility(item.id, true);
+ // projectStore.setLayerVisibility(item.id, true);
}
}
diff --git a/src/views/Main/Map/components/LayerTree.vue b/src/views/Main/Map/components/LayerTree.vue
index 1845e93..4fefd5a 100644
--- a/src/views/Main/Map/components/LayerTree.vue
+++ b/src/views/Main/Map/components/LayerTree.vue
@@ -1,5 +1,9 @@
-
+
-
-
+
+
@@ -37,7 +49,14 @@