From a4ae9d38ae3898661806fd9596b257aeeb674515 Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Fri, 13 Oct 2023 10:25:47 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/demo' into demo

---
 src/components/GMap.vue |   24 +++++++++++++++++++-----
 1 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/src/components/GMap.vue b/src/components/GMap.vue
index 693bfce..aeb70e9 100644
--- a/src/components/GMap.vue
+++ b/src/components/GMap.vue
@@ -870,6 +870,13 @@
     // 关闭窗口
     const closeOsdWindow = () => {
       store.commit('SET_OSD_VISIBLE_INFO', false)
+      showAircraft.value = false
+      aircrafIndex.value = -1
+      aircraftUrl.value = ''
+      showMonitor.value = false
+      airPortUrl.value = ''
+      airPortOption.value = false
+      showMonitor.value = false
     }
 
     // 打开监控权限
@@ -878,7 +885,8 @@
       if (showMonitor.value) {
         loadVideo()
       } else {
-        onClose()
+        airPortUrl.value = ''
+        // onClose()
       }
     }
     // 打开飞机监控
@@ -894,7 +902,8 @@
       if (showAircraft.value) {
         loadDroneVideo(type)
       } else {
-        closeFly()
+        aircraftUrl.value = ''
+        // closeFly()
       }
     }
     // 加载该设备的视频信息
@@ -942,6 +951,8 @@
           }
         })
         .catch(error => {
+          showMonitor.value = false
+          airPortUrl.value = ''
           message.error(error)
         })
     }
@@ -979,6 +990,8 @@
           }
         })
         .catch(error => {
+          showAircraft.value = false
+          aircrafIndex.value = -1
           message.error(error)
         })
     }
@@ -987,14 +1000,16 @@
       try {
         onStart()
       } catch (e) {
-        onClose()
+        airPortUrl.value = ''
+        // onClose()
       }
     }
     const flyTimeout = () => {
       try {
         flyOnStart()
       } catch (e) {
-        closeFly()
+        aircraftUrl.value = ''
+        // closeFly()
       }
     }
     // 设备开始播放
@@ -1039,7 +1054,6 @@
       const videoId = deviceInfo.dock.basic_osd?.sub_device?.device_sn + '/' + aircraSelected.value + '/' + 'normal-0'
       const streamId = deviceInfo.dock.basic_osd?.sub_device?.device_sn + '-' + aircraSelected.value + '-' + 'normal-0'
       const liveURL = config.rtmpURL + streamId
-      console.log('飞机设备播放事件触发')
       await startLivestream({
         url: liveURL,
         video_id: videoId,

--
Gitblit v1.9.3