From f373e0c0797e1800bf066fdfbb748bb9242230f6 Mon Sep 17 00:00:00 2001
From: wangjuncheng <1>
Date: 星期二, 08 七月 2025 17:46:02 +0800
Subject: [PATCH] 泥位计

---
 src/utils/map.js |   20 +++++++++++++++++---
 1 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/src/utils/map.js b/src/utils/map.js
index b6e37ca..b7939e0 100644
--- a/src/utils/map.js
+++ b/src/utils/map.js
@@ -1,5 +1,8 @@
 import { showDeviceDetail, deviceDetail, className, dialogPositon } from "@/store";
-import { componentToSlot } from "element-plus/es/components/table-v2/src/utils.mjs";
+
+import { useSimStore } from '@/store/simulation'
+
+
 export function addTerrain(url) {
   // console.log("鍔犺浇鍦板舰");
   var terrainProvider = new Cesium.CesiumTerrainProvider({
@@ -84,7 +87,7 @@
   // 濡傛灉宸茬粡瀛樺湪璇� id 鐨� entity锛屽垯璺宠繃鍒涘缓
   if (pointEntityMap.has(id)) {
     clearAllPoints()
-    console.log(`鐐� ${id} 宸插瓨鍦紝璺宠繃鍒涘缓`);
+    console.log(`鐐� ${id} 宸插瓨鍦紝宸叉竻闄ら噸寤篳);
   }
 
   let position = Cesium.Cartesian3.fromDegrees(longitude, latitude, height || 50);
@@ -196,7 +199,18 @@
 
     if (Cesium.defined(picked) && id) {
       const entity = picked?.id;
-      if (entity && entity.className) {
+      const simStore = useSimStore()
+      if (entity && !simStore.openDia && entity.attrs.type == '娉ヤ綅璁�') {
+        let obj = {
+          deviceName: entity.attrs.deviceName,
+          latitude: entity.attrs.latitude,
+          longitude: entity.attrs.longitude
+        }
+        simStore.selectNWJ = obj
+        showDeviceDetail.value = false;
+        console.log(simStore.selectNWJ, 'map.js鐐瑰嚮娉ヤ綅璁�')
+      }
+      if (entity && entity.className && simStore.openDia) {
         showDeviceDetail.value = true;
         deviceDetail.value = entity.attrs;
         className.value = entity.className;

--
Gitblit v1.9.3