From a5419f1bb57b1e2b6a7de993cc30eb9dde9b3005 Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Wed, 12 Nov 2025 17:51:17 +0800
Subject: [PATCH] feat:提交返航高度

---
 src/hooks/useRouteLine/useRouteLine.js |    7 ++++---
 src/views/tickets/orderLog.vue         |   10 +++++++---
 src/store/modules/common.js            |   10 +++++++---
 3 files changed, 18 insertions(+), 9 deletions(-)

diff --git a/src/hooks/useRouteLine/useRouteLine.js b/src/hooks/useRouteLine/useRouteLine.js
index 6e4f50e..3762e9d 100644
--- a/src/hooks/useRouteLine/useRouteLine.js
+++ b/src/hooks/useRouteLine/useRouteLine.js
@@ -194,9 +194,10 @@
 				height: 50,
 			},
 		})
-		// 获取最后一点高度
-		console.log(pointList, '查看数组最后一点高度')
-		store.commit('setLastHeight', Number(pointList[pointList.length - 1].height))
+		// 获取航线拆分所有点
+		store.commit('setPositionsArr', pointList)
+		// 获取安全起飞高度
+		store.commit('setSafeHeight', curRouteLineData.value.take_off_security_height)
 		flyVisual({
 			positionsData:pointList.map(i => [Number(i.longitude), Number(i.latitude), Number(i.height)]),
 			viewer,
diff --git a/src/store/modules/common.js b/src/store/modules/common.js
index c12ef73..ce4a88f 100644
--- a/src/store/modules/common.js
+++ b/src/store/modules/common.js
@@ -21,11 +21,15 @@
       htsjzx: 100, //数据中心
       htlsrwxq: 100, //历史任务详情
     },
-    lastHeight: 0, // 获取最后一点高度
+    safeHeight: 0, // 获取选择航线高度
+    positionsArr: [], // 获取选择航线点数据
   },
   mutations: {
-    setLastHeight(state, data) {
-      state.lastHeight = data
+    setSafeHeight (state, data) {
+      state.safeHeight = data
+    },
+    setPositionsArr(state, data) {
+      state.positionsArr = data
     },
     setDownloadProgress(state, data) {
       state.downloadProgress = data
diff --git a/src/views/tickets/orderLog.vue b/src/views/tickets/orderLog.vue
index 1ed72d7..f399d3c 100644
--- a/src/views/tickets/orderLog.vue
+++ b/src/views/tickets/orderLog.vue
@@ -810,9 +810,13 @@
       return CircleClose
     },
     ...mapGetters(['userInfo', 'permission']),
-    lastHeight () {
-      const height = this.$store.state.common.lastHeight
-      return Number(height) || 0 // 确保是数字类型
+    safeHeight () {
+      const safeHeight = this.$store.state.common.safeHeight
+      return Number(safeHeight) || 0 // 确保是数字类型
+    },
+    positionsArr () {
+      const positionsArr = this.$store.state.common.positionsArr
+      return Number(positionsArr) || 0 // 确保是数字类型
     },
     filteredTabs () {
       // rejection_and_draft 权限控制“已驳回”和“草稿”tab

--
Gitblit v1.9.3