From ddf60f1de7a1632e5673806838aa1ef74fd3886b Mon Sep 17 00:00:00 2001
From: guonan <guonan201020@163.com>
Date: 星期二, 06 五月 2025 14:20:33 +0800
Subject: [PATCH] 修改选中区域flyTo以及标红;避险场所面片未清除;存储方案模拟区域

---
 src/views/left/KGSim.vue                            |   15 +
 vue.config.js                                       |    4 
 src/store/simAPI.js                                 |    2 
 src/views/left/KGSimOption/PredictiveSimulation.vue |    6 
 src/views/left/KGSimOption/HistorySimulation.vue    |    4 
 src/views/mnfz.vue                                  |  205 +++++++++++++++++++++++++
 src/views/left/CitySim.vue                          |   17 +
 src/views/GisView.vue                               |  126 +++++++++++++++
 src/api/requestTR.js                                |    1 
 src/utils/area.js                                   |   34 ++-
 public/js/config.js                                 |    3 
 src/views/left/KGSimOption/RealTimeSimulation.vue   |    4 
 src/views/left/Simulation.vue                       |    4 
 13 files changed, 389 insertions(+), 36 deletions(-)

diff --git a/public/js/config.js b/public/js/config.js
index de820cd..2229bb5 100644
--- a/public/js/config.js
+++ b/public/js/config.js
@@ -1,2 +1 @@
-const BASE_URL = "http://192.168.56.107:8077"
-console.log('config.js 琚姞杞�', new Date().toISOString());
\ No newline at end of file
+const BASE_URL = "http://192.168.56.107:8088"
\ No newline at end of file
diff --git a/src/api/requestTR.js b/src/api/requestTR.js
index 01feb22..9f6d7d0 100644
--- a/src/api/requestTR.js
+++ b/src/api/requestTR.js
@@ -20,7 +20,6 @@
   },
 });
 
-console.log('褰撳墠 BaseUrl:', API_URL);
 // 璇锋眰鎷︽埅鍣�
 // instance.interceptors.request.use(
 //   (config) => {
diff --git a/src/store/simAPI.js b/src/store/simAPI.js
index 2cf0b7c..35f8c4d 100644
--- a/src/store/simAPI.js
+++ b/src/store/simAPI.js
@@ -80,7 +80,7 @@
                 })
             }
             console.log(params)
-            const res = await createSimData(params)
+            // const res = await createSimData(params)
             ElMessage.success('鏂规淇濆瓨鎴愬姛')
             // return res
         } catch (error) {
diff --git a/src/utils/area.js b/src/utils/area.js
index 891aa95..eb44444 100644
--- a/src/utils/area.js
+++ b/src/utils/area.js
@@ -140,17 +140,29 @@
 }
 
 export function clearAreaPolygon() {
-	if (Array.isArray(areaPrimitives)) {
-		areaPrimitives.forEach(item => {
-			viewer.scene.primitives.remove(item)
-		})
-		areaPrimitives = []
-	}
-	if (Array.isArray(areaDataSource)) {
-		areaDataSource.forEach(dataSource => {
-			dataSource.show = false
-		})
-	}
+    // 1. 娓呴櫎閫氳繃 viewer.entities 娣诲姞鐨勫疄浣�
+    if (Array.isArray(areaDataSource)) {
+        areaDataSource.forEach(dataSource => {
+            // 绉婚櫎鏁版嵁婧愪腑鐨勬墍鏈夊疄浣�
+            dataSource.entities.values.forEach(entity => {
+                viewer.entities.remove(entity);
+            });
+            // 绉婚櫎鏁版嵁婧愭湰韬�
+            viewer.dataSources.remove(dataSource);
+        });
+        areaDataSource = [];
+    }
+
+    // 2. 娓呴櫎閫氳繃 viewer.scene.primitives 娣诲姞鐨勫浘鍏�
+    if (Array.isArray(areaPrimitives)) {
+        areaPrimitives.forEach(primitive => {
+            viewer.scene.primitives.remove(primitive);
+        });
+        areaPrimitives = [];
+    }
+
+    // 3. 寮哄埗鍦烘櫙閲嶇粯
+    viewer.scene.requestRender();
 }
 
 export function initAreaLine() {
diff --git a/src/views/GisView.vue b/src/views/GisView.vue
index 0efd30b..0e069fc 100644
--- a/src/views/GisView.vue
+++ b/src/views/GisView.vue
@@ -16,6 +16,8 @@
 import { isVisibleDistance } from "@/utils/customEntity";
 import { getDistrictCount, getDistrictCountByCity } from "@/api/index";
 import { useRoute } from "vue-router";
+import { EventBus } from "@/eventBus"; // 寮曞叆浜嬩欢鎬荤嚎
+
 const route = useRoute();
 let handler = null;
 function initMap() {
@@ -37,7 +39,6 @@
   // 3. 璁剧疆褰撳墠鏃堕棿骞堕攣瀹�
   earthCtrl.viewer.clock.currentTime = julianDate;
 
-
   //鏄剧ずfps
   earthCtrl.showFPS = true;
   earthCtrl.factory.createImageryLayer({
@@ -54,6 +55,124 @@
   // viewer.scene.globe.depthTestAgainstTerrain = false;
 }
 
+const MULTIPOLYGON_COORDS = ref([]);
+let previousEntities = []; // 鐢ㄤ簬瀛樺偍涔嬪墠鍒涘缓鐨勫疄浣�
+const flyToHeight = ref(null);
+
+// 鐩戝惉鏂板缓鏂规閫夋嫨鐨勫尯鍩熻寖鍥�
+EventBus.on("select-geom", ({ geom, flyHeight }) => {
+  flyToHeight.value = flyHeight;
+  const coordsStr = geom
+    .replace("MULTIPOLYGON(((", "") // 鍘绘帀寮�澶�
+    .replace(")))", ""); // 鍘绘帀缁撳熬
+
+  // 鍒嗗壊鎴� ["lon lat", "lon lat", ...]
+  const coordPairs = coordsStr.split(",");
+
+  // 杞崲涓� [[[lon, lat], [lon, lat], ...]] 鏍煎紡
+  MULTIPOLYGON_COORDS.value = [
+    coordPairs.map((pair) => {
+      const [lon, lat] = pair.trim().split(" ").map(Number);
+      return [lon, lat];
+    }),
+  ];
+
+  // 妫�鏌ユ槸鍚︽槸绌哄杈瑰舰,濡傛灉鏄┖锛屽垯鍘绘帀闈㈢墖棰滆壊锛屽苟椋炲洖鍒濆浣嶇疆
+  if (geom === "MULTIPOLYGON EMPTY") {
+    clearPreviousEntities();
+    flyToHomeView();
+    return; // 涓嶆墽琛屽悗缁搷浣�
+  }
+
+  // 娓呴櫎涔嬪墠鐨勬墍鏈夊疄浣�
+  clearPreviousEntities();
+  // 閫変腑鍖哄煙鏍囪壊
+  addCustomPolygon();
+});
+
+// 娓呴櫎涔嬪墠鐨勬墍鏈夊疄浣�
+function clearPreviousEntities() {
+  previousEntities.forEach((entity) => {
+    viewer.entities.remove(entity);
+  });
+  previousEntities = [];
+}
+
+// 璁$畻閫変腑鍖哄煙涓績鐐�
+function calculateCenter(coordinates) {
+  const lons = coordinates.flat().map((coord) => coord[0]);
+  const lats = coordinates.flat().map((coord) => coord[1]);
+  return {
+    lon: (Math.min(...lons) + Math.max(...lons)) / 2,
+    lat: (Math.min(...lats) + Math.max(...lats)) / 2,
+  };
+}
+
+function convertToGeoJson(coords) {
+  return {
+    type: "Feature",
+    id: 0,
+    bbox: calculateCenter(MULTIPOLYGON_COORDS.value), // 鍙��
+    properties: {
+      center: calculateCenter(MULTIPOLYGON_COORDS.value), // 绗竴涓偣浣滀负 center
+      centroid: MULTIPOLYGON_COORDS.value[0][0], // 鍙��
+      level: "district",
+      code: 123456,
+      districtCount: 0,
+    },
+    geometry: {
+      type: "MultiPolygon",
+      coordinates: [coords], // 鍖呰鎴� MultiPolygon
+    },
+  };
+}
+
+function addCustomPolygon() {
+  // 灏� MULTIPOLYGON_COORDS.value 杞崲涓� GeoJSON 鏍煎紡
+  const geoJson = convertToGeoJson(MULTIPOLYGON_COORDS.value);
+  const center = geoJson.properties.center;
+
+  // 鍒涘缓澶氳竟褰㈠疄浣�
+  const polygonEntity = viewer.entities.add({
+    // name: "鑷畾涔夊尯鍩�",
+    polygon: {
+      hierarchy: Cesium.Cartesian3.fromDegreesArray(
+        geoJson.geometry.coordinates[0][0].flat()
+      ),
+      material: Cesium.Color.RED.withAlpha(0.3), // 鍗婇�忔槑绾㈣壊濉厖
+      outline: true,
+      outlineColor: Cesium.Color.RED, // 绾㈣壊杈规
+      outlineWidth: 5,
+      clampToGround: true, // 璐村湴鏄剧ず
+    },
+  });
+  previousEntities.push(polygonEntity);
+
+  // 椋炲悜涓績鐐�
+  viewer.camera.flyTo({
+    destination: Cesium.Cartesian3.fromDegrees(
+      center.lon,
+      center.lat,
+      flyToHeight.value
+    ), // 鎻愰珮鍒� 100000绫抽珮搴�
+    orientation: {
+      heading: Cesium.Math.toRadians(0), // 姝e寳鏂瑰悜
+      pitch: Cesium.Math.toRadians(-90), // 鍚戜笅鍊炬枩90搴︼紙鍨傜洿淇锛�
+      roll: 0.0,
+    },
+  });
+
+  console.log(
+    flyToHeight.value,
+    "flyToHeight.value flyToHeight.value flyToHeight.value "
+  );
+}
+
+EventBus.on("close-selectArea", () => {
+  clearPreviousEntities();
+  flyToHomeView();
+});
+
 function addCityPolygon() {
   const url = `/json/110000.geo.json`;
   let wallLayer = earthCtrl.factory.createTrailWallLayer({
@@ -67,8 +186,8 @@
   });
   return dataSourcePromise.then(function (dataSource) {
     viewer.dataSources.add(dataSource);
+    // 鎵�鏈夌殑鏁版嵁
     const polygonEntity = dataSource.entities.values;
-    // console.log("polygonEntity", polygonEntity)
     const distanceDisplayCondition = new Cesium.DistanceDisplayCondition(
       1000,
       50000000
@@ -327,6 +446,7 @@
 
 onMounted(() => {
   initMap();
+  // 鍦ㄤ綘鐨勫垵濮嬪寲浠g爜涓皟鐢ㄨ繖涓嚱鏁�
   addCityPolygon();
   initHandler();
   // initView()
@@ -340,6 +460,8 @@
 });
 onUnmounted(() => {
   removeCameraChange();
+  EventBus.off("select-geom");
+  EventBus.off("close-selectArea");
 });
 </script>
 
diff --git a/src/views/left/CitySim.vue b/src/views/left/CitySim.vue
index cdc19e3..f4d08b5 100644
--- a/src/views/left/CitySim.vue
+++ b/src/views/left/CitySim.vue
@@ -59,6 +59,7 @@
           v-if="simStore.selectTab == '閲嶇偣鍖哄煙浠跨湡'"
         >
           <el-select
+            @change="changeGeom"
             v-model="forms.geom"
             placeholder="Select"
             style="max-width: 600px"
@@ -141,6 +142,7 @@
 import { getRegionData } from "@/api/trApi";
 import { storeToRefs } from "pinia";
 import dayjs from "dayjs";
+import { EventBus } from "@/eventBus"; // 寮曞叆浜嬩欢鎬荤嚎
 
 const simStore = SimAPIStore();
 const { selectTab } = storeToRefs(simStore);
@@ -197,9 +199,17 @@
   hours: null,
 });
 
+const flyHeight = ref(100000);
+
+// 灏嗛�変腑鍖哄煙浼犻�掔粰gisView鏂囦欢锛屽仛鏍囩孩flyTo鏄剧ず
 const changeGeom = (val) => {
-  console.log(val,'aaaaaaaaaaaaaaa')
-}
+  if (selectTab.value == "琛屾斂鍖哄垝浠跨湡") {
+    flyHeight.value = 100000;
+  } else {
+    flyHeight.value = 5000;
+  }
+  EventBus.emit("select-geom", { geom: val.value, flyHeight: flyHeight.value });
+};
 
 const { calculateHoursDifference } = inject("calculateHours");
 
@@ -209,12 +219,13 @@
 
 const addSimCheme = async () => {
   await simStore.addSimCheme(forms);
+  resetForm();
+  EventBus.emit("close-selectArea");
 };
 
 // 閲嶇疆琛ㄥ崟
 const resetForm = () => {
   forms.geom = "";
-  forms.eares = "瀛欒儭娌�";
   forms.rainfall = null;
   forms.duration = null;
   forms.intensity = null;
diff --git a/src/views/left/KGSim.vue b/src/views/left/KGSim.vue
index a9680ce..8a3618b 100644
--- a/src/views/left/KGSim.vue
+++ b/src/views/left/KGSim.vue
@@ -16,7 +16,7 @@
           v-for="item in filteredOptions"
           :key="item.value"
           :label="item.label"
-          :value="item.value"
+          :value="item"
         />
       </el-select>
     </div>
@@ -54,6 +54,7 @@
 import PredictiveSimulation from "./KGSimOption/PredictiveSimulation.vue";
 import RealTimeSimulation from "./KGSimOption/RealTimeSimulation.vue";
 import { getRegionData } from "@/api/trApi";
+import { EventBus } from "@/eventBus"; // 寮曞叆浜嬩欢鎬荤嚎
 
 const selectedSimulation = ref("鍘嗗彶妯℃嫙");
 const selectedArea = ref(); // 閫変腑鐨勫尯鍩�
@@ -67,9 +68,9 @@
       0,
       importGOptions.length,
       ...res.data.map((item) => ({
-        id:item.id,
+        id: item.id,
         value: item.geom,
-        label: item.name
+        label: item.name,
       }))
     );
   });
@@ -90,8 +91,12 @@
 
 // 澶勭悊閫夐」閫夋嫨浜嬩欢
 const handleSelectChange = (value) => {
+  EventBus.emit("select-geom", { geom: value.value, flyHeight: 8000 });
   console.log("閫変腑鐨勫�硷細", value); // 鎵撳嵃閫変腑鐨勫��
-  console.log("褰撳墠閫変腑鐨勫畬鏁存暟鎹細", importGOptions.find((item) => item.value === value)); // 鎵撳嵃瀹屾暣鐨勯�変腑鏁版嵁
+  console.log(
+    "褰撳墠閫変腑鐨勫畬鏁存暟鎹細",
+    importGOptions.find((item) => item.value === value)
+  ); // 鎵撳嵃瀹屾暣鐨勯�変腑鏁版嵁
 };
 
 const handleStart = () => {
@@ -144,4 +149,4 @@
 :deep(.el-input__inner) {
   color: #fff; /* 璁╂枃瀛楅鑹茶窡闅忕埗绾� */
 }
-</style>
\ No newline at end of file
+</style>
diff --git a/src/views/left/KGSimOption/HistorySimulation.vue b/src/views/left/KGSimOption/HistorySimulation.vue
index 1afbde8..0b05ed8 100644
--- a/src/views/left/KGSimOption/HistorySimulation.vue
+++ b/src/views/left/KGSimOption/HistorySimulation.vue
@@ -120,6 +120,7 @@
 import { useSimStore } from "@/store/simulation.js"; // 寮曞叆 Store
 import { getRainfallData } from "@/api/hpApi.js";
 import { SimAPIStore } from "@/store/simAPI";
+import { EventBus } from "@/eventBus"; // 寮曞叆浜嬩欢鎬荤嚎
 
 // 鑾峰彇 Store 瀹炰緥
 const simStore = SimAPIStore();
@@ -138,7 +139,7 @@
 // 瀹氫箟 Props
 const props = defineProps({
   selectedArea: {
-    type: String,
+    type: Object,
     required: true,
   },
 });
@@ -193,6 +194,7 @@
     history: rainfallHistory.value,
   };
   await simStore.addSimCheme(forms);
+  EventBus.emit("close-selectArea");
 };
 
 // 鍏抽棴淇濆瓨鏂规瀵硅瘽妗�
diff --git a/src/views/left/KGSimOption/PredictiveSimulation.vue b/src/views/left/KGSimOption/PredictiveSimulation.vue
index 21349d8..3592e33 100644
--- a/src/views/left/KGSimOption/PredictiveSimulation.vue
+++ b/src/views/left/KGSimOption/PredictiveSimulation.vue
@@ -112,6 +112,8 @@
 import { useSimStore } from "@/store/simulation.js"; // 寮曞叆 Store
 import { SimAPIStore } from "@/store/simAPI";
 import { getRainfallData } from "@/api/hpApi";
+import { EventBus } from "@/eventBus"; // 寮曞叆浜嬩欢鎬荤嚎
+
 
 onMounted(() => {
   getRain();
@@ -133,7 +135,7 @@
 // 瀹氫箟 Props
 const props = defineProps({
   selectedArea: {
-    type: String,
+    type: Object,
     required: true,
   },
 });
@@ -203,6 +205,8 @@
     prediction: forms.prediction,
   };
   await simStore.addSimCheme(params);
+  EventBus.emit("close-selectArea");
+
 };
 
 // 鎵撳紑鏂规
diff --git a/src/views/left/KGSimOption/RealTimeSimulation.vue b/src/views/left/KGSimOption/RealTimeSimulation.vue
index 5c5825c..443be5c 100644
--- a/src/views/left/KGSimOption/RealTimeSimulation.vue
+++ b/src/views/left/KGSimOption/RealTimeSimulation.vue
@@ -85,6 +85,7 @@
 import { ElMessage } from "element-plus";
 import { initeWaterPrimitiveView } from "@/utils/water";
 import { SimAPIStore } from "@/store/simAPI";
+import { EventBus } from "@/eventBus"; // 寮曞叆浜嬩欢鎬荤嚎
 
 // 鑾峰彇 Store 瀹炰緥
 const simStore = SimAPIStore();
@@ -123,7 +124,7 @@
 // 鎺ユ敹鐖剁粍浠朵紶閫掔殑 props
 const props = defineProps({
   selectedArea: {
-    type: String,
+    type: Object,
     required: true,
   },
 });
@@ -249,6 +250,7 @@
     ],
   };
   await simStore.addSimCheme(forms);
+  EventBus.emit("close-selectArea");
 };
 
 // 鍏抽棴淇濆瓨鏂规瀵硅瘽妗�
diff --git a/src/views/left/Simulation.vue b/src/views/left/Simulation.vue
index a528dae..e477d5d 100644
--- a/src/views/left/Simulation.vue
+++ b/src/views/left/Simulation.vue
@@ -28,7 +28,8 @@
 import { ref, defineEmits, provide } from "vue";
 import citySim from "./CitySim.vue";
 import kgSim from "./KGSim.vue";
-import dayjs from 'dayjs';
+import dayjs from "dayjs";
+import { EventBus } from "@/eventBus"; // 寮曞叆浜嬩欢鎬荤嚎
 
 import { SimAPIStore } from "@/store/simAPI";
 
@@ -51,6 +52,7 @@
 // 杩斿洖涓婁竴绾�
 const goBack = () => {
   emits("back", clickValue.value);
+  EventBus.emit("close-selectArea");
 };
 
 // 璁$畻绱鏃堕暱
diff --git a/src/views/mnfz.vue b/src/views/mnfz.vue
index 9b9c042..103a195 100644
--- a/src/views/mnfz.vue
+++ b/src/views/mnfz.vue
@@ -33,6 +33,8 @@
 import { createPoint, geomToGeoJSON } from "@/utils/map.js";
 import { loadAreaPolygon, clearAreaPolygon } from "@/utils/area";
 
+import colors from "@/assets/img/left/colors3.png";
+
 import danger from "@/assets/img/left/danger.png";
 import { checkedKeys } from "@/store/index";
 
@@ -191,6 +193,8 @@
         // 濡傛灉鏈� clear 鏂规硶锛岃皟鐢� clear
         entity.clear();
       } else if (entity && earthCtrl && earthCtrl.coreMap) {
+        // 娓呴櫎閬块櫓鐐圭豢鑹查潰鐗�
+        clearAreaPolygon();
         // 濡傛灉鏄� Cesium 瀹炰綋锛屼娇鐢� coreMap.entities.remove 绉婚櫎
         earthCtrl.coreMap.entities.remove(entity);
       }
@@ -199,14 +203,14 @@
   }
 }
 
-// 閬块櫓璺嚎
+///////////////////////////// 娴佸厜绾块伩闄╄矾绾�/////////////////////////////
 let pathLayer = null; // 瀛樺偍鍒涘缓鐨勫浘灞�
 function showLine() {
   // 鍒涘缓鏂板浘灞�
   pathLayer = earthCtrl.factory.createPathLayer({
     url: "/json/line.json",
-    color: "#0033FF",
-    width: 15.0,
+    color: "#008500",
+    width: 12.0,
     pointColor: "#FFFFFF",
     speed: 2,
     far: 50000,
@@ -226,10 +230,201 @@
   //   earthCtrl.coreMap.entities.remove(item);
   // }
   // });
-  // pathLayer = [];
+  pathLayer = null;
 }
+///////////////////////////// 娴佸厜绾块伩闄╄矾绾�/////////////////////////////
+///////////////////////////// 绠ご鐗堥伩闄╄矾绾�/////////////////////////////
+// let TrailLine = [];
+// async function showLine() {
+//   const position1 = [
+//     {
+//       x: -2172867.1941179745,
+//       y: 4339567.67446477,
+//       z: 4125575.4386990573,
+//     },
+//     {
+//       x: -2172867.1941179745,
+//       y: 4339567.67446477,
+//       z: 4125575.4386990573,
+//     },
+//     {
+//       x: -2172700.396781143,
+//       y: 4339454.037139385,
+//       z: 4125736.906847591,
+//     },
+//     {
+//       x: -2172744.4001612393,
+//       y: 4339361.421455601,
+//       z: 4125804.324253885,
+//     },
+//     {
+//       x: -2172824.3311673277,
+//       y: 4339274.56533081,
+//       z: 4125844.432999503,
+//     },
+//     {
+//       x: -2172822.298957661,
+//       y: 4339226.700024104,
+//       z: 4125896.451233209,
+//     },
+//     {
+//       x: -2172776.0573917977,
+//       y: 4339194.843872361,
+//       z: 4125947.9581145854,
+//     },
+//     {
+//       x: -2172755.2828807314,
+//       y: 4339149.410126468,
+//       z: 4125995.9286539108,
+//     },
+//     {
+//       x: -2172660.9533022284,
+//       y: 4339085.401362197,
+//       z: 4126101.3750262205,
+//     },
+//     {
+//       x: -2172613.460204307,
+//       y: 4339073.342332504,
+//       z: 4126134.479399525,
+//     },
+//     {
+//       x: -2172583.664140033,
+//       y: 4339085.533980615,
+//       z: 4126140.3272964833,
+//     },
+//     {
+//       x: -2172348.977405535,
+//       y: 4338967.122025027,
+//       z: 4126358.7532469626,
+//     },
+//     {
+//       x: -2172276.019363938,
+//       y: 4338943.999121099,
+//       z: 4126416.339696519,
+//     },
+//     {
+//       x: -2172178.064812976,
+//       y: 4338928.9482959965,
+//       z: 4126475.798078439,
+//     },
+//     {
+//       x: -2172171.5451145098,
+//       y: 4338941.186930828,
+//       z: 4126466.425301899,
+//     },
+//     {
+//       x: -2172177.9565195283,
+//       y: 4338940.424956708,
+//       z: 4126463.8688932694,
+//     },
+//   ];
+//   const position2 = [
+//     {
+//       x: -2171569.1995107993,
+//       y: 4338474.198855222,
+//       z: 4127198.938949332,
+//     },
+//     {
+//       x: -2171596.1458028457,
+//       y: 4338508.014766663,
+//       z: 4127160.0148374927,
+//     },
+//     {
+//       x: -2171663.8877153755,
+//       y: 4338521.115613981,
+//       z: 4127111.758040112,
+//     },
+//     {
+//       x: -2171815.8899659193,
+//       y: 4338612.264105235,
+//       z: 4126950.0428421027,
+//     },
+//     {
+//       x: -2171839.2819730053,
+//       y: 4338700.186548507,
+//       z: 4126845.712987762,
+//     },
+//     {
+//       x: -2171792.4015423204,
+//       y: 4338769.135301243,
+//       z: 4126802.7938519563,
+//     },
+//     {
+//       x: -2171943.7495626938,
+//       y: 4338851.9854133595,
+//       z: 4126649.5658632508,
+//     },
+//     {
+//       x: -2172026.1490882114,
+//       y: 4338896.137127666,
+//       z: 4126571.6284971433,
+//     },
+//     {
+//       x: -2172182.2854437083,
+//       y: 4338931.410179759,
+//       z: 4126471.0308961133,
+//     },
+//     {
+//       x: -2172175.3377184337,
+//       y: 4338941.338674108,
+//       z: 4126464.288707359,
+//     },
+//     {
+//       x: -2172175.3377184337,
+//       y: 4338941.338674108,
+//       z: 4126464.288707359,
+//     },
+//   ];
+//   // 瀹氫箟涓�涓嚱鏁版潵鍒涘缓杞ㄨ抗绾�
+//   function createTrailLine(positions, color = "#ffffff") {
+//     let LineInterpolation = earthCtrl.core.LineInterpolation(
+//       earthCtrl.coreMap,
+//       {
+//         positions: positions,
+//         num: 50,
+//         getHeight: true,
+//       }
+//     );
+
+//     let min = LineInterpolation.height;
+//     let max = min.map((item) => item + 35);
+
+//     console.log(min, max);
+
+//     let _TrailLine = earthCtrl.factory.createTrailLineWall(
+//       LineInterpolation.positions,
+//       {
+//         maximumHeights: max,
+//         minimumHeights: min,
+//         color: color, // 绾块鑹�
+//         url: colors, // 濡傛灉娌℃湁璁剧疆 colors锛岃鐢ㄧ函鑹叉垨鍒犻櫎姝よ
+//       }
+//     );
+//     TrailLine.push(_TrailLine);
+//   }
+
+//   // 鍒嗗埆鍒涘缓涓ゆ潯杞ㄨ抗绾�
+//   createTrailLine(position1, "#ff0000"); // 绾㈣壊杞ㄨ抗
+//   createTrailLine(position2, "#0000ff"); // 钃濊壊杞ㄨ抗
+// }
+// // 娓呴櫎杞ㄨ抗绾垮璞�
+// function clearTrailLine() {
+//   TrailLine.forEach((item, index) => {
+//     if (item && typeof item.deleteObject === "function") {
+//       item.deleteObject();
+//     } else if (item && typeof item.clear === "function") {
+//       item.clear();
+//     } else if (item && earthCtrl && earthCtrl.coreMap) {
+//       earthCtrl.coreMap.entities.remove(item);
+//     }
+//   });
+//   TrailLine = [];
+// }
+///////////////////////////// 绠ご鐗堥伩闄╄矾绾�/////////////////////////////
+
 function timeUpdate(percentage) {
-  if (percentage > 99) {
+  console.log(percentage, "ppppppppppp");
+  if (percentage > 99.9) {
     if (showDebuffDetail.value) {
       return;
     }
diff --git a/vue.config.js b/vue.config.js
index 54216e7..4a72e7e 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -21,8 +21,8 @@
     hot: true,
     proxy: {
       '/api': {
-        // target: 'http://192.168.56.107:8077',
-        target: 'http://192.168.1.104:8078',
+        target: 'http://192.168.56.107:8088',
+        // target: 'http://192.168.1.104:8078',
         changeOrigin: true,
         // pathRewrite: {
         //   '^/api': ''

--
Gitblit v1.9.3