From 7df04e699ff6538da079478962d1873c8e8e87ae Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Sat, 14 Jun 2025 15:18:52 +0800
Subject: [PATCH] Merge branch 'master' into test

---
 src/hooks/useRouteLine/useRouteLine.js        |   16 +++++++++++++---
 src/views/tickets/orderLog.vue                |    7 ++++---
 src/components/map-container/mapContainer.vue |    2 +-
 3 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/src/components/map-container/mapContainer.vue b/src/components/map-container/mapContainer.vue
index ac4e60b..839228b 100644
--- a/src/components/map-container/mapContainer.vue
+++ b/src/components/map-container/mapContainer.vue
@@ -113,7 +113,7 @@
  * @param data 数据  数据格式 [[lng, lat], [lng, lat], [lng, lat]]
  */
 async function addPolyline (data) {
-    await renderPreviewLine(data.url, data.type, data.cb)
+    await renderPreviewLine(data.url, data.type, data.cb, data.infos)
 }
 
 onMounted(() => {
diff --git a/src/hooks/useRouteLine/useRouteLine.js b/src/hooks/useRouteLine/useRouteLine.js
index 3397ee7..01d0b57 100644
--- a/src/hooks/useRouteLine/useRouteLine.js
+++ b/src/hooks/useRouteLine/useRouteLine.js
@@ -33,6 +33,7 @@
 		execute_height_mode: '',
 		auto_flight_speed: '',
 		wayline_type: '',
+		infos: {}
 	})
 
 	const routeLineListClick = async data => {
@@ -42,7 +43,9 @@
 		await renderRouteLine(data.data)
 	}
 
-	async function renderPreviewLine (kmzUrl, wayline_type, cb = () => { }) {
+	async function renderPreviewLine (kmzUrl, wayline_type, cb = () => { }, infos = {}) {
+
+
 		resetCurRouteLineData()
 
 		const { pointPlacemark, polygonList, templateType, startPoint, execute_height_mode, auto_flight_speed } =
@@ -55,6 +58,7 @@
 			execute_height_mode,
 			auto_flight_speed,
 			wayline_type,
+			infos: infos
 		}
 
 		cb(curRouteLineData.value.polygonList.map(item => [Number(item[0]), Number(item[1])]))
@@ -130,8 +134,6 @@
 			})
 		}
 
-
-
 		let pointList = handlePointListForKmz({
 			placemark: data,
 			startPoint: curRouteLineData.value.startPoint,
@@ -141,6 +143,14 @@
 
 		pointList.shift()
 
+		if (JSON.stringify(curRouteLineData.value.infos) != '{}') {
+			pointList.unshift({
+				longitude: curRouteLineData.value.infos[0].longitude,
+				latitude: curRouteLineData.value.infos[0].latitude,
+				height: curRouteLineData.value.infos[0].height || 0,
+			})
+		}
+
 		const routePositions = pointList.map(i => Cesium.Cartesian3.fromDegrees(Number(i.longitude), Number(i.latitude), Number(i.height)))
 
 		previewDataSource.entities.add({
diff --git a/src/views/tickets/orderLog.vue b/src/views/tickets/orderLog.vue
index 66ea5ae..a5adc5c 100644
--- a/src/views/tickets/orderLog.vue
+++ b/src/views/tickets/orderLog.vue
@@ -1056,7 +1056,7 @@
       this.initMapLine()
     },
 
-    initMapLine (cb = () => { }) {
+    initMapLine (infos = {}, cb = () => { }) {
       let currentLine = this.wayLineList.find(item => item.wayline_id == this.form.file_id)
 
       if (!currentLine) return
@@ -1066,7 +1066,8 @@
           this.$refs.MapContainer.initAddEntity('polyline', {
             url: `${import.meta.env.VITE_APP_AIRLINE_URL + currentLine.object_key}?_t=${new Date().getTime()}`,
             type: currentLine.wayline_type,
-            cb
+            cb,
+            infos
           })
         }
       })
@@ -1078,7 +1079,7 @@
 
       that.device_sns = []
 
-      this.initMapLine(async (polygon) => {
+      this.initMapLine({}, async (polygon) => {
         const currentLine = that.wayLineList.find(item => item.wayline_id === waylineId)
 
         //按照航线来

--
Gitblit v1.9.3