From a609467768fe6430815c93f27be829539d40c095 Mon Sep 17 00:00:00 2001
From: jihongshun <1151753686@qq.com>
Date: 星期一, 01 九月 2025 09:35:50 +0800
Subject: [PATCH] 生成航线支持下载

---
 src/views/system/shootPoint/components/shootPointDialog.vue |   37 +++++++++++++++++++++++++++++++------
 1 files changed, 31 insertions(+), 6 deletions(-)

diff --git a/src/views/system/shootPoint/components/shootPointDialog.vue b/src/views/system/shootPoint/components/shootPointDialog.vue
index eed0225..0434ff1 100644
--- a/src/views/system/shootPoint/components/shootPointDialog.vue
+++ b/src/views/system/shootPoint/components/shootPointDialog.vue
@@ -62,11 +62,11 @@
                                       class="action-icon"
                                       @click.stop="clickItem(action)">
                   
-                                  <img src="@/assets/images/xuanting.svg" alt="svg鍥剧墖" v-if="action.type==='鎮仠'" />
-                                  <img src="@/assets/images/photo.svg" alt="svg鍥剧墖" v-if="action.type==='鎷嶇収'" />
-                                  <img src="@/assets/images/startVideo.svg" alt="svg鍥剧墖" v-if="action.type==='寮�濮嬪綍鍍�'" />
-                                  <img src="@/assets/images/stopVideo.svg" alt="svg鍥剧墖" v-if="action.type==='缁撴潫褰曞儚'" />
-                                  <img src="@/assets/images/zoom.svg" alt="svg鍥剧墖" v-if="action.type==='鍙樼劍'" />
+                                  <img src="@/assets/images/xuanting.svg" alt="svg鍥剧墖" v-if="action.type==='鎮仠'" title="鎮仠"/>
+                                  <img src="@/assets/images/photo.svg" alt="svg鍥剧墖" v-if="action.type==='鎷嶇収'" title="鎷嶇収"/>
+                                  <img src="@/assets/images/startVideo.svg" alt="svg鍥剧墖" v-if="action.type==='寮�濮嬪綍鍍�'" title="寮�濮嬪綍鍍�"/>
+                                  <img src="@/assets/images/stopVideo.svg" alt="svg鍥剧墖" v-if="action.type==='缁撴潫褰曞儚'" title="缁撴潫褰曞儚"/>
+                                  <img src="@/assets/images/zoom.svg" alt="svg鍥剧墖" v-if="action.type==='鍙樼劍'" title="鍙樼劍"/>
                                   <!-- <i v-if="action.type==='鎷嶇収'" class="el-icon-video-camera"></i> -->
                                 </span>
                               </div>
@@ -159,6 +159,7 @@
           console.log(res.data)
           this.getRowData(res.data)
           let drawArr = this.convertToTree(res.data.ardListWayPointsLS)
+          console.log(drawArr)
           setTimeout(() => {
             //娓叉煋鏃堕棿闂 鍔犱釜寤舵椂鍣�
             this.drawLines(drawArr)
@@ -340,14 +341,16 @@
       // 2. 姣忎釜绌轰腑鐐逛笌鍦伴潰鐐圭敤钃濊壊铏氱嚎杩炴帴
       treeData.forEach(point => {
         const airPos = Cesium.Cartesian3.fromDegrees(point.longitude, point.latitude, point.height);
+        this.addLabel(point)
         point.children.forEach(child => {
           const groundPos = Cesium.Cartesian3.fromDegrees(child.longitude, child.latitude, child.height);
+          this.addLabel(child)
           viewer.entities.add({
             polyline: {
               positions: [airPos, groundPos],
               width: 1,
               material: new Cesium.PolylineDashMaterialProperty({
-                color: Cesium.Color.BLUE,
+                color: Cesium.Color.RED,
                 dashLength: 8
               })
             }
@@ -355,6 +358,28 @@
         });
       });
     },
+    addLabel(point) {
+      const position = Cesium.Cartesian3.fromDegrees(
+        point.longitude,
+        point.latitude,
+        point.height
+      );
+      let viewer = window.viewerM
+      // Create a label entity
+      viewer.entities.add({
+        position: position,
+        label: {
+          text: point.label,
+          font: "14px sans-serif",
+          fillColor: Cesium.Color.WHITE,
+          backgroundColor: Cesium.Color.BLACK,
+          style: Cesium.LabelStyle.FILL_AND_OUTLINE,
+          outlineWidth: 2,
+          horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
+          verticalOrigin: Cesium.VerticalOrigin.BOTTOM
+        }
+      });
+    },
     addPoint(viewer, position, color, label) {
       viewer.entities.add({
         name: label,

--
Gitblit v1.9.3