From 76eb78c9874ddb6b4153341dce021bc5195426ba Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Sat, 19 Apr 2025 09:55:16 +0800
Subject: [PATCH] Merge branch 'master' of http://139.196.74.78:10010/r/drone/command-center-dashboard

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

diff --git a/src/components/CurrentTaskDetails/TaskDetailsHead.vue b/src/components/CurrentTaskDetails/TaskDetailsHead.vue
index 19f7ca0..c65b6e9 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
 	})
 }
 
@@ -88,7 +92,6 @@
 	const dock_osd_host = wsInfo?.value?.dock_osd?.data?.host || {}
 	const { longitude, latitude, height, horizontal_speed, vertical_speed, wind_speed, battery } = device_osd_host
 	const { longitude: dockLon, latitude: dockLat, wireless_link } = dock_osd_host
-
 	let dist = infoList.value[11].value
 	if (longitude && latitude && dockLon && dockLat) {
 		dist = _.round(getLnglatDist(longitude, latitude, dockLon, dockLat), 0)
@@ -187,7 +190,6 @@
 				color: #ffffff;
 				line-height: 18px;
 				margin-bottom: 10px;
-
 			}
 
 			.infoTitle {

--
Gitblit v1.9.3