husq
2023-09-27 2c2bc8614c8ea0ce386369eb4924da1e6aa052d1
src/components/GMap.vue
@@ -169,7 +169,8 @@
      </div>
    </div>
    <!-- 机场OSD -->
    <div class="osd-panel fz12" v-if="osdVisible.visible && osdVisible.is_dock">
    <!--  && osdVisible.is_dock -->
    <div class="osd-panel fz12" v-if="osdVisible.visible">
      <div class="fz16 pl5 pr5 flex-align-center flex-row flex-justify-between"
        style="border-bottom: 1px solid #515151; height: 10%;">
        <span>{{ osdVisible.gateway_callsign }}</span>
@@ -373,7 +374,7 @@
      </div>
      <a-row class="p5" v-if="showMonitor" justify="center" align="middle">
        <!-- <a-spin :spinning="spinning"> -->
          <Jessibuca v-if="airPortUrl" :videoUrl="airPortUrl" width="100%" height="300px" />
          <Jessibuca v-if="airPortUrl" @timeout="airTimeout" :videoUrl="airPortUrl" width="100%" height="300px" />
        <!-- </a-spin> -->
      </a-row>
      <!--  飞机-->
@@ -406,7 +407,7 @@
              </a-button>
            </a-col>
            <a-col span="11">
              <a-button :disabled="deviceInfo.device?.mode_code == 14 || !deviceInfo.device?true:false" :class="[openDroneControl?'active-color':'unactive-color']" class="width-100" type="primary"  size="small"
              <a-button :class="[openDroneControl?'active-color':'unactive-color']" class="width-100" type="primary"  size="small"
                @click="openDeviceSetting">
                操作
              </a-button>
@@ -417,7 +418,7 @@
      <!-- 飞机直播 -->
      <a-row class="p5" v-if="showAircraft">
        <!-- <a-spin :spinning="spinning"> -->
          <Jessibuca v-if="aircraftUrl" :videoUrl="aircraftUrl" width="100%" height="300px" />
          <Jessibuca v-if="aircraftUrl" @timeout="flyTimeout" :videoUrl="aircraftUrl" width="100%" height="300px" />
        <!-- </a-spin> -->
      </a-row>
      <!-- 飞机图标信息 -->
@@ -905,8 +906,24 @@
          message.error(error)
        })
    }
    // 机场视频超时说明可能直播被关闭需要重新开启直播
    const airTimeout = () => {
      try {
        onStart()
      } catch (e) {
        onClose()
      }
    }
    const flyTimeout = () => {
      try {
        flyOnStart()
      } catch (e) {
        closeFly()
      }
    }
    // 设备开始播放
    const onStart = async () => {
      airPortUrl.value = ''
      const videoId = droneList.value[droneIndex.value].value + '/' + cameraList.value[cameraIndex.value].value + '/' + videoList.value[videoIndex.value].value
      const streamId = droneList.value[droneIndex.value].value + '-' + cameraList.value[cameraIndex.value].value + '-' + videoList.value[videoIndex.value].value
      const liveURL = config.rtmpURL + streamId
@@ -983,7 +1000,7 @@
    // 打开无人机操作
    const openDeviceSetting = () => {
      setDockControlPanelVisible(false)
      openDroneControl.value = false
      openDroneControl.value = !openDroneControl.value
    }
    watch(() => store.state.deviceStatusEvent,
      data => {
@@ -992,11 +1009,6 @@
          store.state.deviceStatusEvent.deviceOnline = {} as DeviceStatus
        }
        if (Object.keys(data.deviceOffline).length !== 0) {
          // deviceTsaUpdateHook.removeMarker(data.deviceOffline.sn)
          if ((data.deviceOffline.sn === osdVisible.value.sn) || (osdVisible.value.is_dock && data.deviceOffline.sn === osdVisible.value.gateway_sn)) {
            osdVisible.value.visible = false
            store.commit('SET_OSD_VISIBLE_INFO', osdVisible)
          }
          store.state.deviceStatusEvent.deviceOffline = {}
        }
      },
@@ -1315,7 +1327,9 @@
      closeOsdWindow,
      openDroneControl,
      openFlySetting,
      openDeviceSetting
      openDeviceSetting,
      airTimeout,
      flyTimeout
    }
  }
})