From 678f5050633c1bc53ba92bdb7aa8b85d055b443f Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Fri, 18 Apr 2025 19:54:47 +0800
Subject: [PATCH] feat: 指南针60%

---
 src/components/CurrentTaskDetails/TaskDetailsHead.vue |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/components/CurrentTaskDetails/TaskDetailsHead.vue b/src/components/CurrentTaskDetails/TaskDetailsHead.vue
index 19f7ca0..d417c4b 100644
--- a/src/components/CurrentTaskDetails/TaskDetailsHead.vue
+++ b/src/components/CurrentTaskDetails/TaskDetailsHead.vue
@@ -1,6 +1,6 @@
 <template>
 	<div class="detailsHead">
-		<div class="droneName" :title="taskDetails.name">{{ taskDetails.name }}</div>
+		<div class="droneName" :title="taskDetails.device_names">{{ taskDetails.device_names }}</div>
 		<div class="infoListBox">
 			<div v-for="item in infoList">
 				<div class="infoValue" :title="item.value">{{ item.value }}{{ item.unit }}</div>
@@ -61,7 +61,7 @@
 	}
 }
 
-function refreshLive(){
+function refreshLive() {
 	EventBus.emit('CurrentTaskDetails-getDroneLiveUrl')
 }
 
@@ -72,6 +72,9 @@
 	})
 }
 
+const trueAltitude = inject('trueAltitude')
+
+// 获取真实高度
 function getRealTimeReallyHigh() {
 	if (!taskDetailsViewer?.value) return
 	const device_osd_host = wsInfo?.value?.device_osd?.data?.host || {}
@@ -79,7 +82,8 @@
 	if (!latitude) return
 	getLnglatAltitude(longitude, latitude, taskDetailsViewer.value).then(res => {
 		const last = height - res?.height
-		infoList.value[0].value = last ? infoList.value[0].value : _.round(height - res?.height, 1)
+		infoList.value[0].value = last ? _.round(height - res?.height, 1) : infoList.value[0].value
+		trueAltitude.value = infoList.value[0].value
 	})
 }
 
@@ -187,7 +191,6 @@
 				color: #ffffff;
 				line-height: 18px;
 				margin-bottom: 10px;
-
 			}
 
 			.infoTitle {

--
Gitblit v1.9.3