From 853fcbb7f34daa481e8141df8adb72cfaba6f144 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Fri, 18 Apr 2025 15:49:12 +0800
Subject: [PATCH] feat: 控制台ai直播功能

---
 src/api/payload.js                                       |    9 +--------
 src/components/CurrentTaskDetails/TaskDetailsHead.vue    |   14 +++++++++-----
 src/components/CurrentTaskDetails/CurrentTaskDetails.vue |    2 +-
 3 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/src/api/payload.js b/src/api/payload.js
index 15be774..66da1a8 100644
--- a/src/api/payload.js
+++ b/src/api/payload.js
@@ -83,18 +83,11 @@
 // 无人机开启ai
 export const getLiveAiLinkApi = (data) => {
   return request({
-    url:`${API_PREFIX}/live/streams/start/ai`,
+    url:`/drone-device-core/manage/api/v1/live/streams/start/ai`,
     method: 'post',
     data,
   });
 };
-
-// original_stream_url
-//   :
-//   "rtmp://139.196.74.78/live/1581F6Q8D247200GGSWB-81-0-0-normal-0"
-// video_id
-//   :
-//   "1581F6Q8D247200GGSWB/81-0-0/normal-0"
 
 
 
diff --git a/src/components/CurrentTaskDetails/CurrentTaskDetails.vue b/src/components/CurrentTaskDetails/CurrentTaskDetails.vue
index 181f8d5..cc4fe6f 100644
--- a/src/components/CurrentTaskDetails/CurrentTaskDetails.vue
+++ b/src/components/CurrentTaskDetails/CurrentTaskDetails.vue
@@ -87,7 +87,7 @@
 }
 
 const getAiLiveUrl = ()=>{
-	const res = getLiveAiLinkApi({ original_stream_url: `${CURRENT_CONFIG.rtmpURL}${video_id}`, video_id })
+	const res = getLiveAiLinkApi({ original_stream_url: `${CURRENT_CONFIG.rtmpURL}${video_id.value}`, video_id:video_id.value })
 	currentLiveUrl.value = res.data.data.rtcs_url
 	isAiLive.value = true
 }
diff --git a/src/components/CurrentTaskDetails/TaskDetailsHead.vue b/src/components/CurrentTaskDetails/TaskDetailsHead.vue
index c6164b2..19f7ca0 100644
--- a/src/components/CurrentTaskDetails/TaskDetailsHead.vue
+++ b/src/components/CurrentTaskDetails/TaskDetailsHead.vue
@@ -3,7 +3,7 @@
 		<div class="droneName" :title="taskDetails.name">{{ taskDetails.name }}</div>
 		<div class="infoListBox">
 			<div v-for="item in infoList">
-				<div class="infoValue">{{ item.value }}{{ item.unit }}</div>
+				<div class="infoValue" :title="item.value">{{ item.value }}{{ item.unit }}</div>
 				<div class="infoTitle">{{ item.title }}</div>
 			</div>
 		</div>
@@ -62,7 +62,7 @@
 }
 
 function refreshLive(){
-	EventBus.emit('CurrentTaskDetails-getAiLiveUrl')
+	EventBus.emit('CurrentTaskDetails-getDroneLiveUrl')
 }
 
 function getFlightStatisticsFun() {
@@ -105,8 +105,8 @@
 	infoList.value[4].value = _.round(longitude || 0, 2)
 	infoList.value[5].value = _.round(latitude || 0, 2)
 	infoList.value[6].value = _.round(wind_speed || 0, 0)
-	if (newFourG !== undefined) infoList.value[7].value = newFourG
-	if (newSdr !== undefined) infoList.value[8].value = newSdr
+	if (newFourG !== undefined) infoList.value[7].value = fourGQuality[newFourG]
+	if (newSdr !== undefined) infoList.value[8].value = SDRQuality[newSdr]
 	if (newGPSNum !== undefined) infoList.value[9].value = newGPSNum
 	if (newRTKNum !== undefined) infoList.value[10].value = newRTKNum
 	infoList.value[11].value = dist
@@ -180,10 +180,14 @@
 			width: 90px;
 
 			.infoValue {
+				white-space: nowrap;
+				overflow: hidden;
+				text-overflow: ellipsis;
 				font-size: 20px;
 				color: #ffffff;
-				line-height: 15px;
+				line-height: 18px;
 				margin-bottom: 10px;
+
 			}
 
 			.infoTitle {

--
Gitblit v1.9.3