From c110295e9d7e87ec5012e37ad5ba2b38f745ccd3 Mon Sep 17 00:00:00 2001
From: jihongshun <1151753686@qq.com>
Date: 星期五, 15 八月 2025 15:40:08 +0800
Subject: [PATCH] 优化线的逻辑

---
 src/views/system/shootPoint/components/shootPointDialog.vue |    4 ++--
 src/utils/components/init-map.vue                           |   25 ++++++++++++++++++++++++-
 2 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/src/utils/components/init-map.vue b/src/utils/components/init-map.vue
index 9c67e89..09fcf3b 100644
--- a/src/utils/components/init-map.vue
+++ b/src/utils/components/init-map.vue
@@ -180,6 +180,7 @@
         cameraT:0.0,
         pointGround: { lon: 0, lat: 0, height: 0 },
         pointFly: { lon: 0, lat: 0, height: 0 },
+        rowData:null
     }
   },
   mounted(){
@@ -322,6 +323,7 @@
     creatPin(id, position, font, color, viewer) {
       let pinBuilder = new Cesium.PinBuilder();
       let addPin = viewer.entities.getById(id);
+      console.log(addPin)
       if (addPin == undefined) {
         viewer.entities.add({
           id: id,
@@ -617,6 +619,13 @@
             const gure = Cesium.Cartesian3.distance(point1, point2)
             this.betweenDistance  = gure
         }
+        if(this.rowData) {
+          this.pointGround = {
+            lon:this.rowData.longitude,
+            lat:this.rowData.latitude,
+            height:this.rowData.height
+          }
+        }
         this.pointFly = { 
           lon: lon, 
           lat: lat, 
@@ -820,7 +829,9 @@
               label: `绌轰腑鐐�${idx}`,
               longitude: Cesium.Math.toDegrees(aerialPos.longitude),
               latitude: Cesium.Math.toDegrees(aerialPos.latitude),
-              height: aerialPos.height
+              height: aerialPos.height,
+              heading:Cesium.Math.toDegrees(viewerC.camera.heading),
+              pitch:Cesium.Math.toDegrees(viewerC.camera.pitch)
             }
           ]
         };
@@ -1139,6 +1150,18 @@
       return Math.asin(directionLocal.z); // z杞村悜涓�
     },
     DealVisualCone(data,node){
+      this.rowData = data
+      console.log(data)
+      this.pointGround = {
+        lon:data.children[0].longitude,
+        lat:data.children[0].latitude,
+        height:data.children[0].height
+      }
+      this.pointFly = {
+        lon:data.longitude,
+        lat:data.latitude,
+        height:data.height
+      }
       if(data.children && data.children?.length > 0) {
         preVideoScopePrimitiveArrTie.map((item)=>{
           if(item.name != data.children[0].label){
diff --git a/src/views/system/shootPoint/components/shootPointDialog.vue b/src/views/system/shootPoint/components/shootPointDialog.vue
index ebf11cc..f4fb7ff 100644
--- a/src/views/system/shootPoint/components/shootPointDialog.vue
+++ b/src/views/system/shootPoint/components/shootPointDialog.vue
@@ -228,12 +228,12 @@
         //鐐瑰嚮鐖剁骇
         const from = [data.children[0].longitude,data.children[0].latitude, data.children[0].height];
         const to = [data.longitude,data.latitude, data.height];      
-        this.flyToAndLookAt(from, to);
+        // this.flyToAndLookAt(from, to);
       } else  {
         //鐐瑰嚮瀛愮骇
         const from = [data.longitude,data.latitude, data.height]; 
         const to = [node.parent?.data?.longitude,node.parent?.data?.latitude, node.parent?.data?.height]; 
-        this.flyToAndLookAt(from, to);
+        // this.flyToAndLookAt(from, to);
       }
       this.$refs.initMap.DealVisualCone(data,node)
     },

--
Gitblit v1.9.3