From b040d81c856a77f280b38037e78a8b6a8bdb31ab Mon Sep 17 00:00:00 2001 From: guonan <guonan201020@163.com> Date: 星期二, 08 七月 2025 15:51:15 +0800 Subject: [PATCH] 泥位计 --- src/utils/map.js | 22 ++++++++++++++++++---- 1 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/utils/map.js b/src/utils/map.js index 75dc1d0..25a7ef8 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,8 +199,19 @@ if (Cesium.defined(picked) && id) { const entity = picked?.id; - console.log(entity.attrs, 'attrsattrsattrs') - if (entity && entity.className) { + const simStore = useSimStore() + + if (entity && !simStore.openDia) { + 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