From 2280e8be717608bb36c3cf921f129db24349396d Mon Sep 17 00:00:00 2001
From: guonan <guonan201020@163.com>
Date: 星期二, 10 六月 2025 17:55:29 +0800
Subject: [PATCH] 大改图层树

---
 src/components/menu/Location.vue |   50 ++++++++++++++++----------------------------------
 1 files changed, 16 insertions(+), 34 deletions(-)

diff --git a/src/components/menu/Location.vue b/src/components/menu/Location.vue
index d37b435..53c3d4a 100644
--- a/src/components/menu/Location.vue
+++ b/src/components/menu/Location.vue
@@ -71,30 +71,12 @@
 import { initeWaterPrimitiveView } from "@/utils/water"; //鐩告満flyTo鍑芥暟锛屽悗缁璷ptions鍒楄〃涓湁瀵瑰簲缁忕含搴﹀悗寮冪敤
 import { useRoute, onBeforeRouteUpdate } from "vue-router";
 import { Loading } from "@element-plus/icons-vue";
-// import { fetchAndLoadDangerPoints } from "@/api/hpApi.js";
 
 const districtList = ref([]);
 
-// const displayData = ref([]);
-
-// const loadCallback = async (newData) => {
-//   districtList.value = [...newData];
-//   console.log(districtList.value, "aaaaaaaaaaaaaaaaaaaaaaaaa");
-
-//   await initializeDevicePoints();
-// };
-
-// onMounted(() => {
-//   fetchAndLoadDangerPoints(loadCallback);
-// });
 
 const simStore = useSimStore();
-// onBeforeRouteUpdate((to, from, next) => {
-//   if (to.path !== "/yhgl") {
-//     clearAllPoints();
-//   }
-//   next();
-// });
+
 const route = useRoute();
 
 onBeforeUnmount(() => {
@@ -194,22 +176,22 @@
 };
 let isInitialized = false;
 
-watch(
-  () => simStore.DangerShowSwitch,
-  async (newValue, oldValue) => {
-    console.log("褰撳墠鐘舵�侊細", newValue);
+// watch(
+//   () => simStore.DangerShowSwitch,
+//   async (newValue, oldValue) => {
+//     console.log("褰撳墠鐘舵�侊細", newValue);
 
-    if (newValue) {
-      if (!isInitialized) {
-        await initializeDevicePoints();
-        isInitialized = true;
-      }
-    } else {
-      clearAllPoints();
-      isInitialized = false;
-    }
-  }
-);
+//     if (newValue) {
+//       if (!isInitialized) {
+//         await initializeDevicePoints();
+//         isInitialized = true;
+//       }
+//     } else {
+//       clearAllPoints();
+//       isInitialized = false;
+//     }
+//   }
+// );
 // 鐩戝惉 simStore.DangerPoint 鍙樺寲
 watch(
   () => simStore.DangerPoint,

--
Gitblit v1.9.3