guoshilong
2023-10-13 a4ae9d38ae3898661806fd9596b257aeeb674515
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,