From a9c4f7775e82d93638e607fa6c5fafe22f5310b4 Mon Sep 17 00:00:00 2001
From: guonan <guonan201020@163.com>
Date: 星期五, 16 五月 2025 15:06:27 +0800
Subject: [PATCH] 完善接口部分

---
 src/components/menu/Location.vue |  718 +++++-----------------------------------------------------
 1 files changed, 71 insertions(+), 647 deletions(-)

diff --git a/src/components/menu/Location.vue b/src/components/menu/Location.vue
index f8b899f..c239e71 100644
--- a/src/components/menu/Location.vue
+++ b/src/components/menu/Location.vue
@@ -23,8 +23,14 @@
         </el-select>
       </div>
 
+      <!-- 婊氬姩鍖哄煙 -->
       <div style="overflow-y: auto; height: 95%">
+        <!-- 鍔犺浇閬僵灞� -->
+        <div v-if="loading" class="loading-overlay">
+          <div class="spinner"></div>
+        </div>
         <div
+          v-else
           v-for="(item, key) in districtList"
           :key="key"
           class="district-item"
@@ -39,8 +45,8 @@
 </template>
 
 <script setup>
-import { ref, onMounted, onBeforeUnmount, reactive } from "vue";
-import { createPoint, removeEntities } from "@/utils/map";
+import { ref, onMounted, watch } from "vue";
+import { createPoint } from "@/utils/map";
 import { useSimStore } from "@/store/simulation";
 
 const simStore = useSimStore();
@@ -71,638 +77,10 @@
 ]);
 
 const districtList = ref([]);
-
-// const districtList = ref([
-//   {
-//     activeStatus: "",
-//     areaCode: "",
-//     areaName: "",
-//     brookLength: 0,
-//     checkId: "",
-//     city: "鍖椾含甯�",
-//     codeProvince: "110116",
-//     county: "鎬�鏌�",
-//     dangerLevel: "",
-//     disasterStatus: "",
-//     drainageArea: "",
-//     elevation: 0,
-//     featureDes: "",
-//     groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�",
-//     hasPlan: "",
-//     id: "110116020058",
-//     latitude: 40.56652778,
-//     length: 0,
-//     district: "鐞夌拑搴欓晣瀛欒儭娌熸潙灏瑰瑗挎矡灏瑰缓鐕曞灞嬪悗",
-//     longitude: 116.5803889,
-//     monitor: "",
-//     monitorAdvice: "",
-//     name: "灏瑰瑗挎矡灏瑰缓鐕曞灞嬪悗宕╁闅愭偅鐐�",
-//     number:
-//       "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612",
-//     preventionDes: "",
-//     preventionLevel: "",
-//     preventionPlan: "瀹氭湡宸℃煡锛岄璀﹁浆绉伙紝绔嬭绀虹墝",
-//     preventionUnit: "涔¢晣",
-//     principal: "",
-//     province: "鍖椾含甯�",
-//     qp: "",
-//     reason: "",
-//     responsibleUnit: "",
-//     riskLevel: "",
-//     scale: "灏忓瀷",
-//     stableLevel: "",
-//     status: "",
-//     thickness: 0,
-//     threatenFamily: 2,
-//     threatenMoney: 0,
-//     threatenPopulation: "3",
-//     threatenType: "",
-//     town: "鐞夌拑搴欓晣",
-//     trigger: "",
-//     type: "宕╁",
-//     village: "瀛欒儭娌熸潙",
-//     volume: "",
-//     volumePotential: "",
-//     width: 0,
-//   },
-//   {
-//     activeStatus: "",
-//     areaCode: "",
-//     areaName: "",
-//     brookLength: 0,
-//     checkId: "",
-//     city: "鍖椾含甯�",
-//     codeProvince: "110116",
-//     county: "鎬�鏌�",
-//     dangerLevel: "",
-//     disasterStatus: "",
-//     drainageArea: "",
-//     elevation: 0,
-//     featureDes: "",
-//     groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�",
-//     hasPlan: "",
-//     id: "110116020078",
-//     latitude: 40.56497222,
-//     length: 0,
-//     district: "鐞夌拑搴欓晣瀛欒儭娌熸潙娌宠タ浜庡嚖鑻卞灞嬪悗",
-//     longitude: 116.5955278,
-//     monitor: "",
-//     monitorAdvice: "",
-//     name: "娌宠タ浜庡嚖鑻卞灞嬪悗宕╁闅愭偅鐐�",
-//     number:
-//       "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612",
-//     preventionDes: "",
-//     preventionLevel: "",
-//     preventionPlan: "瀹氭湡宸℃煡锛岄璀﹁浆绉伙紝绔嬭绀虹墝",
-//     preventionUnit: "涔¢晣",
-//     principal: "",
-//     province: "鍖椾含甯�",
-//     qp: "",
-//     reason: "",
-//     responsibleUnit: "",
-//     riskLevel: "",
-//     scale: "灏忓瀷",
-//     stableLevel: "",
-//     status: "",
-//     thickness: 0,
-//     threatenFamily: 4,
-//     threatenMoney: 0,
-//     threatenPopulation: "6",
-//     threatenType: "",
-//     town: "鐞夌拑搴欓晣",
-//     trigger: "",
-//     type: "宕╁",
-//     village: "瀛欒儭娌熸潙",
-//     volume: "",
-//     volumePotential: "",
-//     width: 0,
-//   },
-//   {
-//     activeStatus: "",
-//     areaCode: "",
-//     areaName: "",
-//     brookLength: 0,
-//     checkId: "",
-//     city: "鍖椾含甯�",
-//     codeProvince: "110116",
-//     county: "鎬�鏌�",
-//     dangerLevel: "",
-//     disasterStatus: "",
-//     drainageArea: "",
-//     elevation: 0,
-//     featureDes: "",
-//     groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�",
-//     hasPlan: "",
-//     id: "110116030041",
-//     latitude: 40.55369444,
-//     length: 0,
-//     district: "鐞夌拑搴欓晣瀛欒儭娌熷叕璺�",
-//     longitude: 116.6002778,
-//     monitor: "",
-//     monitorAdvice: "",
-//     name: "鍗楁灏忎笢娌熸偿鐭虫祦闅愭偅鐐�",
-//     number:
-//       "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612",
-//     preventionDes: "",
-//     preventionLevel: "",
-//     preventionPlan: "瀹氭湡宸℃煡,绔嬭绀虹墝",
-//     preventionUnit: "涔¢晣",
-//     principal: "",
-//     province: "鍖椾含甯�",
-//     qp: "",
-//     reason: "",
-//     responsibleUnit: "",
-//     riskLevel: "",
-//     scale: "灏忓瀷",
-//     stableLevel: "",
-//     status: "",
-//     thickness: 0,
-//     threatenFamily: 0,
-//     threatenMoney: 0,
-//     threatenPopulation: "",
-//     threatenType: "",
-//     town: "鐞夌拑搴欓晣",
-//     trigger: "",
-//     type: "娉ョ煶娴�",
-//     village: "瀛欒儭娌熸潙",
-//     volume: "",
-//     volumePotential: "",
-//     width: 0,
-//   },
-//   {
-//     activeStatus: "",
-//     areaCode: "",
-//     areaName: "",
-//     brookLength: 0,
-//     checkId: "",
-//     city: "鍖椾含甯�",
-//     codeProvince: "110116",
-//     county: "鎬�鏌�",
-//     dangerLevel: "",
-//     disasterStatus: "",
-//     drainageArea: "",
-//     elevation: 0,
-//     featureDes: "",
-//     groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�",
-//     hasPlan: "",
-//     id: "110116030015",
-//     latitude: 40.55277778,
-//     length: 0,
-//     district: "鐞夌拑搴欓晣瀛欒儭娌熸潙鍗楁鏉戝ぇ绐戞矡",
-//     longitude: 116.5994722,
-//     monitor: "",
-//     monitorAdvice: "",
-//     name: "澶х獞娌熸偿鐭虫祦闅愭偅鐐�",
-//     number:
-//       "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612",
-//     preventionDes: "宸茬洃娴嬨�佸凡娌荤悊",
-//     preventionLevel: "",
-//     preventionPlan: "瀹氭湡宸℃煡锛岄璀﹁浆绉伙紝绔嬭绀虹墝",
-//     preventionUnit: "涔¢晣",
-//     principal: "",
-//     province: "鍖椾含甯�",
-//     qp: "",
-//     reason: "",
-//     responsibleUnit: "",
-//     riskLevel: "",
-//     scale: "涓瀷",
-//     stableLevel: "",
-//     status: "",
-//     thickness: 0,
-//     threatenFamily: 5,
-//     threatenMoney: 0,
-//     threatenPopulation: "11",
-//     threatenType: "",
-//     town: "鐞夌拑搴欓晣",
-//     trigger: "",
-//     type: "娉ョ煶娴�",
-//     village: "瀛欒儭娌熸潙",
-//     volume: "",
-//     volumePotential: "",
-//     width: 0,
-//   },
-//   {
-//     activeStatus: "",
-//     areaCode: "",
-//     areaName: "",
-//     brookLength: 0,
-//     checkId: "",
-//     city: "鍖椾含甯�",
-//     codeProvince: "110116",
-//     county: "鎬�鏌�",
-//     dangerLevel: "",
-//     disasterStatus: "",
-//     drainageArea: "",
-//     elevation: 0,
-//     featureDes: "",
-//     groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�",
-//     hasPlan: "",
-//     id: "110116030076",
-//     latitude: 40.55972222,
-//     length: 0,
-//     district: "鐞夌拑搴欓晣瀛欒儭娌熸潙涓滃潕澶т笢娌�",
-//     longitude: 116.5916667,
-//     monitor: "",
-//     monitorAdvice: "",
-//     name: "澶т笢娌熸偿鐭虫祦闅愭偅鐐�",
-//     number:
-//       "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612",
-//     preventionDes: "宸叉不鐞�",
-//     preventionLevel: "",
-//     preventionPlan: "瀹氭湡宸℃煡锛岄璀﹁浆绉�",
-//     preventionUnit: "涔¢晣",
-//     principal: "",
-//     province: "鍖椾含甯�",
-//     qp: "",
-//     reason: "",
-//     responsibleUnit: "",
-//     riskLevel: "",
-//     scale: "灏忓瀷",
-//     stableLevel: "",
-//     status: "",
-//     thickness: 0,
-//     threatenFamily: 1,
-//     threatenMoney: 0,
-//     threatenPopulation: "2",
-//     threatenType: "",
-//     town: "鐞夌拑搴欓晣",
-//     trigger: "",
-//     type: "娉ョ煶娴�",
-//     village: "瀛欒儭娌熸潙",
-//     volume: "",
-//     volumePotential: "",
-//     width: 0,
-//   },
-//   {
-//     activeStatus: "",
-//     areaCode: "",
-//     areaName: "",
-//     brookLength: 0,
-//     checkId: "",
-//     city: "鍖椾含甯�",
-//     codeProvince: "110116",
-//     county: "鎬�鏌�",
-//     dangerLevel: "",
-//     disasterStatus: "",
-//     drainageArea: "",
-//     elevation: 0,
-//     featureDes: "",
-//     groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�",
-//     hasPlan: "",
-//     id: "110116030074",
-//     latitude: 40.56580556,
-//     length: 0,
-//     district: "鐞夌拑搴欓晣瀛欒儭娌熸潙灏瑰瑗挎矡",
-//     longitude: 116.59,
-//     monitor: "",
-//     monitorAdvice: "",
-//     name: "灏瑰瑗挎矡娉ョ煶娴侀殣鎮g偣",
-//     number:
-//       "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612",
-//     preventionDes:
-//       "宸茬洃娴嬶紱鐏惧浣撳彉鍖栵細4澶勫潯绉墿鍨锛屽爢绉嚦鍧¤剼锛屾柟閲忕害20m鲁銆�",
-//     preventionLevel: "",
-//     preventionPlan: "瀹氭湡宸℃煡锛岄璀﹁浆绉�",
-//     preventionUnit: "涔¢晣",
-//     principal: "",
-//     province: "鍖椾含甯�",
-//     qp: "",
-//     reason: "",
-//     responsibleUnit: "",
-//     riskLevel: "",
-//     scale: "涓瀷",
-//     stableLevel: "",
-//     status: "",
-//     thickness: 0,
-//     threatenFamily: 7,
-//     threatenMoney: 0,
-//     threatenPopulation: "12",
-//     threatenType: "",
-//     town: "鐞夌拑搴欓晣",
-//     trigger: "",
-//     type: "娉ョ煶娴�",
-//     village: "瀛欒儭娌熸潙",
-//     volume: "",
-//     volumePotential: "",
-//     width: 0,
-//   },
-//   {
-//     activeStatus: "",
-//     areaCode: "",
-//     areaName: "",
-//     brookLength: 0,
-//     checkId: "",
-//     city: "鍖椾含甯�",
-//     codeProvince: "110116",
-//     county: "鎬�鏌�",
-//     dangerLevel: "",
-//     disasterStatus: "",
-//     drainageArea: "",
-//     elevation: 0,
-//     featureDes: "",
-//     groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�",
-//     hasPlan: "",
-//     id: "110116030053",
-//     latitude: 40.57361111,
-//     length: 0,
-//     district: "鐞夌拑搴欓晣瀛欒儭娌熸潙鍖楀ぇ鍦拌タ娲煎瓙娌�",
-//     longitude: 116.5897222,
-//     monitor: "",
-//     monitorAdvice: "",
-//     name: "鍖楀ぇ鍦拌タ娲煎瓙娌熸偿鐭虫祦闅愭偅鐐�",
-//     number:
-//       "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612",
-//     preventionDes: "娌熷彛姝e鎴垮眿锛岄檷闆ㄦ椂鍑烘按閲忓ぇ锛屽缓璁不鐞嗭紝姹涙湡鍔犲己宸℃煡",
-//     preventionLevel: "",
-//     preventionPlan: "瀹氭湡宸℃煡锛岄璀﹁浆绉伙紝绔嬭绀虹墝",
-//     preventionUnit: "涔¢晣",
-//     principal: "",
-//     province: "鍖椾含甯�",
-//     qp: "",
-//     reason: "",
-//     responsibleUnit: "",
-//     riskLevel: "",
-//     scale: "涓瀷",
-//     stableLevel: "",
-//     status: "",
-//     thickness: 0,
-//     threatenFamily: 6,
-//     threatenMoney: 0,
-//     threatenPopulation: "10",
-//     threatenType: "",
-//     town: "鐞夌拑搴欓晣",
-//     trigger: "",
-//     type: "娉ョ煶娴�",
-//     village: "瀛欒儭娌熸潙",
-//     volume: "",
-//     volumePotential: "",
-//     width: 0,
-//   },
-//   {
-//     activeStatus: "",
-//     areaCode: "",
-//     areaName: "",
-//     brookLength: 0,
-//     checkId: "",
-//     city: "鍖椾含甯�",
-//     codeProvince: "110116",
-//     county: "鎬�鏌�",
-//     dangerLevel: "",
-//     disasterStatus: "",
-//     drainageArea: "",
-//     elevation: 0,
-//     featureDes: "",
-//     groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�",
-//     hasPlan: "",
-//     id: "110116020102",
-//     latitude: 40.55972222,
-//     length: 0,
-//     district: "鐞夌拑搴欓晣瀛欒儭娌熸潙鑼冨搴勭帇绉�鑾插灞嬪悗",
-//     longitude: 116.5922222,
-//     monitor: "",
-//     monitorAdvice: "",
-//     name: "鑼冨搴勭帇绉�鑾插灞嬪悗宕╁闅愭偅鐐�",
-//     number:
-//       "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612",
-//     preventionDes: "杈瑰潯杈冮櫋锛岄『鍚戝博灞傦紝鎴垮眿闈犺繎鍧¤剼锛屽缓璁敖蹇不鐞�",
-//     preventionLevel: "",
-//     preventionPlan: "瀹氭湡宸℃煡锛岄璀﹁浆绉伙紝绔嬭绀虹墝",
-//     preventionUnit: "涔¢晣",
-//     principal: "",
-//     province: "鍖椾含甯�",
-//     qp: "",
-//     reason: "",
-//     responsibleUnit: "",
-//     riskLevel: "",
-//     scale: "灏忓瀷",
-//     stableLevel: "",
-//     status: "",
-//     thickness: 0,
-//     threatenFamily: 1,
-//     threatenMoney: 0,
-//     threatenPopulation: "3",
-//     threatenType: "",
-//     town: "鐞夌拑搴欓晣",
-//     trigger: "",
-//     type: "宕╁",
-//     village: "瀛欒儭娌熸潙",
-//     volume: "",
-//     volumePotential: "",
-//     width: 0,
-//   },
-//   {
-//     activeStatus: "",
-//     areaCode: "",
-//     areaName: "",
-//     brookLength: 0,
-//     checkId: "",
-//     city: "鍖椾含甯�",
-//     codeProvince: "110116",
-//     county: "鎬�鏌�",
-//     dangerLevel: "",
-//     disasterStatus: "",
-//     drainageArea: "",
-//     elevation: 0,
-//     featureDes: "",
-//     groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�",
-//     hasPlan: "",
-//     id: "110116020742",
-//     latitude: 40.57680556,
-//     length: 0,
-//     district: "鐞夌拑搴欓晣瀛欒儭娌熸潙涓変憨鍦拌寖蹇犵敯瀹跺眿鍚�",
-//     longitude: 116.5887222,
-//     monitor: "",
-//     monitorAdvice: "",
-//     name: "涓変憨鍦拌寖蹇犵敯瀹跺眿鍚庡穿濉岄殣鎮g偣",
-//     number:
-//       "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612",
-//     preventionDes: "",
-//     preventionLevel: "",
-//     preventionPlan: "瀹氭湡宸℃煡锛岄璀﹁浆绉伙紝鏇存崲璀︾ず鐗�",
-//     preventionUnit: "涔¢晣",
-//     principal: "",
-//     province: "鍖椾含甯�",
-//     qp: "",
-//     reason: "",
-//     responsibleUnit: "",
-//     riskLevel: "",
-//     scale: "涓瀷",
-//     stableLevel: "",
-//     status: "",
-//     thickness: 0,
-//     threatenFamily: 8,
-//     threatenMoney: 0,
-//     threatenPopulation: "23",
-//     threatenType: "",
-//     town: "鐞夌拑搴欓晣",
-//     trigger: "",
-//     type: "宕╁",
-//     village: "瀛欒儭娌熸潙",
-//     volume: "",
-//     volumePotential: "",
-//     width: 0,
-//   },
-//   {
-//     activeStatus: "",
-//     areaCode: "",
-//     areaName: "",
-//     brookLength: 0,
-//     checkId: "",
-//     city: "鍖椾含甯�",
-//     codeProvince: "110116",
-//     county: "鎬�鏌�",
-//     dangerLevel: "",
-//     disasterStatus: "",
-//     drainageArea: "",
-//     elevation: 0,
-//     featureDes: "",
-//     groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�",
-//     hasPlan: "",
-//     id: "110116030040",
-//     latitude: 40.56344444,
-//     length: 0,
-//     district: "鐞夌拑搴欓晣瀛欒儭娌熸潙娌宠タ浜庡瑗挎矡",
-//     longitude: 116.5953889,
-//     monitor: "",
-//     monitorAdvice: "",
-//     name: "浜庡瑗挎矡娉ョ煶娴侀殣鎮g偣",
-//     number:
-//       "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612",
-//     preventionDes:
-//       "宸茬洃娴嬶紝2018鏉戝凡娌荤悊锛涙矡鍙e爢绉墖鏄庢樉锛屾瀵规埧灞嬶紝寤鸿姹涙湡鍔犲己宸℃煡",
-//     preventionLevel: "",
-//     preventionPlan: "瀹氭湡宸℃煡锛岄璀﹁浆绉�",
-//     preventionUnit: "涔¢晣",
-//     principal: "",
-//     province: "鍖椾含甯�",
-//     qp: "",
-//     reason: "",
-//     responsibleUnit: "",
-//     riskLevel: "",
-//     scale: "涓瀷",
-//     stableLevel: "",
-//     status: "",
-//     thickness: 0,
-//     threatenFamily: 18,
-//     threatenMoney: 0,
-//     threatenPopulation: "59",
-//     threatenType: "",
-//     town: "鐞夌拑搴欓晣",
-//     trigger: "",
-//     type: "娉ョ煶娴�",
-//     village: "瀛欒儭娌熸潙",
-//     volume: "",
-//     volumePotential: "",
-//     width: 0,
-//   },
-//   {
-//     activeStatus: "",
-//     areaCode: "",
-//     areaName: "",
-//     brookLength: 0,
-//     checkId: "",
-//     city: "鍖椾含甯�",
-//     codeProvince: "110116",
-//     county: "鎬�鏌�",
-//     dangerLevel: "",
-//     disasterStatus: "",
-//     drainageArea: "",
-//     elevation: 0,
-//     featureDes: "",
-//     groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�",
-//     hasPlan: "",
-//     id: "110116030055",
-//     latitude: 40.55283333,
-//     length: 0,
-//     district: "鐞夌拑搴欓晣瀛欒儭娌熸潙妞存爲搴曚笅涓滄矡",
-//     longitude: 116.5999444,
-//     monitor: "",
-//     monitorAdvice: "",
-//     name: "妞存爲搴曚笅涓滄矡娉ョ煶娴侀殣鎮g偣",
-//     number:
-//       "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612",
-//     preventionDes: "宸叉不鐞嗭細濞佽儊瀵硅薄閲嶅锛氫笌110116030015閲嶅5鎴�11浜�",
-//     preventionLevel: "",
-//     preventionPlan: "瀹氭湡宸℃煡锛岄璀﹁浆绉伙紝绔嬭绀虹墝",
-//     preventionUnit: "涔¢晣",
-//     principal: "",
-//     province: "鍖椾含甯�",
-//     qp: "",
-//     reason: "",
-//     responsibleUnit: "",
-//     riskLevel: "",
-//     scale: "涓瀷",
-//     stableLevel: "",
-//     status: "",
-//     thickness: 0,
-//     threatenFamily: 5,
-//     threatenMoney: 0,
-//     threatenPopulation: "11",
-//     threatenType: "",
-//     town: "鐞夌拑搴欓晣",
-//     trigger: "",
-//     type: "娉ョ煶娴�",
-//     village: "瀛欒儭娌熸潙",
-//     volume: "",
-//     volumePotential: "",
-//     width: 0,
-//   },
-//   {
-//     activeStatus: "",
-//     areaCode: "",
-//     areaName: "",
-//     brookLength: 0,
-//     checkId: "",
-//     city: "鍖椾含甯�",
-//     codeProvince: "110116",
-//     county: "鎬�鏌�",
-//     dangerLevel: "",
-//     disasterStatus: "",
-//     drainageArea: "",
-//     elevation: 0,
-//     featureDes: "",
-//     groupMonitor: "鏉庢姊�,瀛欐鍜�,鑼冩弧鐢�,绉﹀缓鏉�,瀛欐姹�,瀛欐浼�",
-//     hasPlan: "",
-//     id: "110116030054",
-//     latitude: 40.56166667,
-//     length: 0,
-//     district: "鐞夌拑搴欓晣瀛欒儭娌熸潙涓婂彴瀛愭渤涓滃崡娌�",
-//     longitude: 116.5997222,
-//     monitor: "",
-//     monitorAdvice: "",
-//     name: "娌充笢鍗楁矡娉ョ煶娴侀殣鎮g偣",
-//     number:
-//       "13716108909,13716029391,13716291714,13716191943,13716427398,13124792612",
-//     preventionDes: "宸茬洃娴�",
-//     preventionLevel: "",
-//     preventionPlan: "瀹氭湡宸℃煡,绔嬭绀虹墝",
-//     preventionUnit: "涔¢晣",
-//     principal: "",
-//     province: "鍖椾含甯�",
-//     qp: "",
-//     reason: "",
-//     responsibleUnit: "",
-//     riskLevel: "",
-//     scale: "灏忓瀷",
-//     stableLevel: "",
-//     status: "",
-//     thickness: 0,
-//     threatenFamily: 0,
-//     threatenMoney: 0,
-//     threatenPopulation: "",
-//     threatenType: "",
-//     town: "鐞夌拑搴欓晣",
-//     trigger: "",
-//     type: "娉ョ煶娴�",
-//     village: "瀛欒儭娌熸潙",
-//     volume: "",
-//     volumePotential: "",
-//     width: 0,
-//   },
-// ]);
+const loading = ref(true); // 鎺у埗鍔犺浇鐘舵��
 
 function handleClick(district) {
-  const entity = viewer.entities.getById(district.unifiedCode);
+  const entity = viewer.entities.getById(district.hdId);
   if (entity) {
     viewer.flyTo(entity, {
       offset: {
@@ -712,22 +90,16 @@
       },
     });
   }
-  // if (entity) {
-  // 	viewer.flyTo(entity)
-  // }
 }
-
-// 闅愭偅鐐瑰垪琛�
-const originalData = simStore.DangerPoint; // 瀛樺偍鍘熷鏁版嵁锛堜粎鍔犺浇涓�娆★級
 
 // 鏍规嵁鍖哄煙鍚嶇О杩囨护鏁版嵁
 const filterDataByArea = (areaName) => {
-  if (!areaName) {
+  if (!areaName || !simStore.DangerPoint || simStore.DangerPoint.length === 0) {
     districtList.value = [];
     return;
   }
 
-  districtList.value = originalData.filter((item) =>
+  districtList.value = simStore.DangerPoint.filter((item) =>
     item.position?.includes(areaName)
   );
 };
@@ -743,16 +115,60 @@
   filterDataByArea(areaName);
 };
 
-// 缁勪欢鎸傝浇鏃跺姞杞藉師濮嬫暟鎹紝骞堕粯璁よ繃婊や负 "瀛欒儭娌�"
-onMounted(async () => {
-  // await loadAllData();
-  filterDataByArea("瀛欒儭娌�"); // 榛樿鏄剧ず瀛欒儭娌熺殑鏁版嵁
-});
-onBeforeUnmount(() => {
-  // removeEntities()
+// 鐩戝惉 simStore.DangerPoint 鍙樺寲
+watch(
+  () => simStore.DangerPoint,
+  (newVal) => {
+    if (newVal && newVal.length > 0) {
+      filterDataByArea(selectValue.value);
+      loading.value = false; // 鏁版嵁鍔犺浇瀹屾垚
+    } else {
+      districtList.value = [];
+      loading.value = true; // 鏁版嵁鏈噯澶囧氨缁�
+    }
+  },
+  { immediate: true }
+);
+
+onMounted(() => {
+  // 榛樿鍏堟鏌ヤ竴閬嶆暟鎹�
+  if (simStore.DangerPoint && simStore.DangerPoint.length > 0) {
+    filterDataByArea("瀛欒儭娌�");
+    loading.value = false;
+  } else {
+    loading.value = true;
+  }
 });
 </script>
+
 <style lang="less" scoped>
+.loading-overlay {
+  position: absolute;
+  top: 120px;
+  left: 0px;
+  right: 0px;
+  bottom: 10px;
+  background-color: rgba(236, 233, 233, 0.5); /* 鍗婇�忔槑閬僵 */
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  z-index: 999;
+}
+
+.spinner {
+  width: 40px;
+  height: 40px;
+  border: 4px solid #fff;
+  border-top: 4px solid transparent;
+  border-radius: 50%;
+  animation: spin 1s linear infinite;
+}
+
+@keyframes spin {
+  to {
+    transform: rotate(360deg);
+  }
+}
 .district {
   position: absolute;
   width: 345px;
@@ -786,6 +202,14 @@
   overflow: hidden;
   text-overflow: ellipsis;
 }
+
+.loading-text {
+  color: white;
+  font-size: 14px;
+  text-align: center;
+  margin-top: 20px;
+}
+
 /deep/ .el-select__placeholder {
   color: white;
 }

--
Gitblit v1.9.3