From b602bfa7181535a43cfb13859ac0c77de7a2833f Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Sat, 19 Apr 2025 10:09:01 +0800
Subject: [PATCH] feat: 改造监听ws消息功能,控制台添加gltf模型

---
 src/components/CurrentTaskDetails/CurrentTaskDetails.vue |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/components/CurrentTaskDetails/CurrentTaskDetails.vue b/src/components/CurrentTaskDetails/CurrentTaskDetails.vue
index be5398b..7cdda60 100644
--- a/src/components/CurrentTaskDetails/CurrentTaskDetails.vue
+++ b/src/components/CurrentTaskDetails/CurrentTaskDetails.vue
@@ -66,13 +66,16 @@
 const isMaxMap = ref(false) //是大地图
 
 const workspace_id = ref('')
-let wsInfo = useDroneWS(workspace_id) //ws信息,是一个ref对象
-watch(wsInfo, () => {
-	// wsInfo 变化触发
-	setCurrentLiveUrl()
-}, { deep: true })
+let { wsInfo,removeWS } = useDroneWS(workspace_id) //ws信息,是一个ref对象
+watch(
+	wsInfo,
+	() => {
+		// wsInfo 变化触发
+		setCurrentLiveUrl()
+	},
+	{ deep: true }
+)
 provide('wsInfo', wsInfo)
-
 
 provide('isAutoControl', isAutoControl)
 provide('lineQuality', lineQuality)
@@ -85,8 +88,6 @@
 provide('trueAltitude', trueAltitude)
 provide('isAiLive', isAiLive)
 provide('video_id', video_id)
-
-
 
 // 获取机巢直播
 const getDeviceLiveUrl = async () => {
@@ -121,7 +122,7 @@
 // 设置当前直播地址
 const setCurrentLiveUrl = async () => {
 	const deviceInfo = deviceOsdInfo.value?.data?.host
-  if (!deviceInfo) return
+	if (!deviceInfo) return
 	const currentIsTakeOff = ![14, 0].includes(deviceInfo?.mode_code)
 	// 如果还是之前的状态,不切换
 	if (isTakeOff.value === currentIsTakeOff) return

--
Gitblit v1.9.3