From 87e98d5b5efeb7a9cf6330ae03e6dd53699b7ef1 Mon Sep 17 00:00:00 2001
From: surprise <15810472099@163.com>
Date: 星期一, 15 一月 2024 17:10:25 +0800
Subject: [PATCH] 代码更新

---
 src/assets/js/Layer/mapViewer.js |   80 ++++++++++++++++++++++++++++++----------
 1 files changed, 60 insertions(+), 20 deletions(-)

diff --git a/src/assets/js/Layer/mapViewer.js b/src/assets/js/Layer/mapViewer.js
index 85b57f6..dba4e3e 100644
--- a/src/assets/js/Layer/mapViewer.js
+++ b/src/assets/js/Layer/mapViewer.js
@@ -13,43 +13,83 @@
         this.leftClick.setInputAction(function (event) {
             let nPickFeature = Viewer.scene.pick(event.position);
             let cartesian = window.Viewer.camera.pickEllipsoid(event.position);
-        
+
             let cartographic = Cesium.Cartographic.fromCartesian(cartesian);
             let lng = Cesium.Math.toDegrees(cartographic.longitude); // 缁忓害
             let lat = Cesium.Math.toDegrees(cartographic.latitude); // 绾害
             let alt = cartographic.height; // 楂樺害锛屾き鐞冮潰height姘歌繙绛変簬
             let coordinate = {
-                longitude: Number(lng.toFixed(6)),
-                latitude: Number(lat.toFixed(6)),
+                longitude: Number(lng),
+                latitude: Number(lat),
                 altitude: Number(alt.toFixed(2)),
                 heading: 0,
                 pitch: 0,
                 roll: 0,
                 scale: 1,
             };
+    
             store.state.coordinate = coordinate;
-            if (store.state.addModelFlag) {
-                model.setModelCoord(coordinate);
+            if(store.state.isBatchGridArr){
 
-            }
-            if(store.state.isMeasureFlag){
+            }else  if (store.state.addModelFlag) {
+                model.setModelCoord(coordinate);
+            
+            }else  if (store.state.isMeasureFlag) {
                 store.state.measureCoordObj = coordinate;
-                store.state.isShowMeasureCoord= true;
-            }
-            if (Cesium.defined(nPickFeature)) {
-             
-                if(nPickFeature.id && nPickFeature.id.properties){
-                    console.log(nPickFeature)
+                store.state.isShowMeasureCoord = true;
+           
+            }else if (store.state.isQueryFalag) {
+
+                store.state.isQyeryCoord = coordinate;
+
+            }else if (Cesium.defined(nPickFeature)) {
+                mapInfo.setRestLayer();
+                if (nPickFeature.id && nPickFeature.id.id == 'Rectangle')
+                    return
+
+                if (nPickFeature.id && nPickFeature.id.properties) {
                     mapInfo.setGeoJsonInfo(nPickFeature.id.properties)
-                }else if(nPickFeature && nPickFeature.getProperty("name") == "DLJQT0007"){
-                    store.state.isShowVideo= true;
+
+                } else if (nPickFeature && nPickFeature.getProperty("name")) {
+                    var name = nPickFeature.getProperty("name");
+                    if (name == "DLJQT0007") {
+                        store.state.isShowVideo = true;
+                    } else if (name == "sensor001") {
+
+                    } else if (name == "DLLMJ0001") {
+                        store.state.isireamUrl = "/Data/html/hd3dmap.html?id=3493&type=8";
+                        store.state.isShowMenuCount = true;
+                    } else if (name == "DLBZP0023") {
+                        store.state.isireamUrl = "/Data/html/hd3dmap.html?id=3494&type=5";
+                        store.state.isShowMenuCount = true;
+                    } else if (name == "DLBZP0024") {
+                        store.state.isireamUrl = "/Data/html/hd3dmap.html?id=3491&type=8";
+                        store.state.isShowMenuCount = true;
+                    }else if(name === "DLBZP0026"){
+                        store.state.isireamUrl = "/Data/html/hd3dmap.html?id=3505&type=8";
+                        store.state.isShowMenuCount = true;
+                    }else if(name === "DLBZP0029"){
+                        store.state.isireamUrl = "/Data/html/hd3dmap.html?id=3646&type=5";
+                        store.state.isShowMenuCount = true;
+                    }else if(name === "DLBZP0027"){
+                        store.state.isireamUrl = "/Data/html/hd3dmap.html?id=3685&type=99";
+                        store.state.isShowMenuCount = true;
+                    }  else if(name === "DLBZP0027"){
+                        store.state.isireamUrl = "/Data/html/hd3dmap.html?id=3685&type=99";
+                        store.state.isShowMenuCount = true;
+                    }else if(name === "DLBZP0072"){
+                        store.state.isireamUrl = "/Data/html/hd3dmap.html?id=3719&type=5";
+                        store.state.isShowMenuCount = true;
+                    }else{
+                        mapInfo.setTileSetInfo(nPickFeature)
+                    }
+                    
+                    
+                }else{
+                 
                 }
             }
-            if(store.state.isQueryFalag){
-              
-                store.state.isQyeryCoord = coordinate;
-            }
-
+          
         }, Cesium.ScreenSpaceEventType.LEFT_CLICK)
     },
     addRightClick() {

--
Gitblit v1.9.3