From 0f85a9c9f964e433aa0f2078819cdbda062ebbbf Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Sat, 19 Apr 2025 17:34:42 +0800
Subject: [PATCH] Merge branch 'master' of http://139.196.74.78:10010/r/drone/command-center-dashboard

---
 src/components/CurrentTaskDetails/CurrentTaskDetails.vue |   48 +++++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 41 insertions(+), 7 deletions(-)

diff --git a/src/components/CurrentTaskDetails/CurrentTaskDetails.vue b/src/components/CurrentTaskDetails/CurrentTaskDetails.vue
index 97bfea0..66c13cd 100644
--- a/src/components/CurrentTaskDetails/CurrentTaskDetails.vue
+++ b/src/components/CurrentTaskDetails/CurrentTaskDetails.vue
@@ -2,11 +2,11 @@
  * @Author: shuishen 1109946754@qq.com
  * @Date: 2025-04-19 13:13:15
  * @LastEditors: shuishen 1109946754@qq.com
- * @LastEditTime: 2025-04-19 15:04:15
+ * @LastEditTime: 2025-04-19 15:07:04
  * @FilePath: \command-center-dashboard\src\components\CurrentTaskDetails\CurrentTaskDetails.vue
- * @Description: 
- * 
- * Copyright (c) 2025 by shuishen, All Rights Reserved. 
+ * @Description:
+ *
+ * Copyright (c) 2025 by shuishen, All Rights Reserved.
 -->
 <!--当前任务详情-->
 <template>
@@ -20,7 +20,7 @@
 	>
 		<div class="content-container" v-if="isShow">
 			<!-- 视频直播 -->
-			<div :class="`${isMaxMap ? 'minBox' : 'maxBox'}`">
+			<div :class="`${isMaxMap ? 'minBox' : 'maxBox'} centerPoint`">
 				<LiveVideo :videoUrl="currentLiveUrl" :controls="false" />
 			</div>
 			<!-- 展示地图 -->
@@ -52,7 +52,7 @@
 import { ElMessage } from 'element-plus'
 import EventBus from '@/event-bus'
 import { updateDroneQualityApi } from '@/api/drc'
-import { getLiveAiLinkApi } from '@/api/payload'
+import { getLiveAiLinkApi, getLiveCapacityApi } from '@/api/payload'
 import { CURRENT_CONFIG } from '@/utils/http/config'
 import { useDroneWS } from '@/hooks/useDroneWS'
 import { useTaskDetails } from '@/hooks/useTaskDetails/useTaskDetails'
@@ -71,6 +71,7 @@
 const currentLiveUrl = ref('') // 当前直播地址
 const isTakeOff = ref(false) // 是在飞行中
 const isMaxMap = ref(false) //是大地图
+const client_id = ref('') //是大地图
 
 // 获取机巢直播
 const getDeviceLiveUrl = async () => {
@@ -78,10 +79,20 @@
 	currentLiveUrl.value = res.data.data.rtcs_url
 }
 
-let { taskDetails, workspace_id, getTaskDetails } = useTaskDetails(getDeviceLiveUrl)
+//获取相机能力
+async function getLiveCapacity() {
+	const res = await getLiveCapacityApi(workspace_id.value,{ sn: dockSn.value})
+}
+const useTaskDetailsCallBack = () => {
+	console.log(workspace_id.value,66666666)
+	getDeviceLiveUrl()
+}
+
+let { taskDetails, workspace_id, getTaskDetails } = useTaskDetails(useTaskDetailsCallBack)
 let { wsInfo, removeWS } = useDroneWS(workspace_id) //ws信息,是一个ref对象
 
 provide('wsInfo', wsInfo)
+provide('workspace_id', workspace_id)
 provide('deviceOsdInfo', deviceOsdInfo)
 provide('dockOsdInfo', wsInfo?.value?.dock_osd)
 provide('dockSn', dockSn)
@@ -94,6 +105,14 @@
 provide('isAiLive', isAiLive)
 provide('video_id', video_id)
 provide('client_id', client_id)
+
+let once = true
+watch(deviceOsdInfo,()=>{
+	if (once){
+		// getLiveCapacity()
+		once =false
+	}
+})
 
 watch(
 	wsInfo,
@@ -200,6 +219,21 @@
 	border-radius: 4rem;
 	overflow: hidden;
 
+	.centerPoint {
+		&:before {
+			content: '+';
+			font-size: 30px;
+			color: white;
+			position: absolute;
+			left: 50%;
+			top: 50%;
+			transform: translate(-50%, -50%);
+			pointer-events: none;
+			font-weight: bold;
+			text-shadow: -1px -1px 0 black, 1px -1px 0 black, -1px 1px 0 black, 1px 1px 0 black; /* 四方向描边 */
+		}
+	}
+
 	.maxBox {
 		width: 100%;
 		height: 100%;

--
Gitblit v1.9.3