From ed1cc73df2dbea906d177ea5149eb67f041219dc Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Tue, 26 Sep 2023 17:37:30 +0800
Subject: [PATCH] 文件地址修改
---
src/components/GMap.vue | 58 ++++++++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 46 insertions(+), 12 deletions(-)
diff --git a/src/components/GMap.vue b/src/components/GMap.vue
index d494607..8c8a784 100644
--- a/src/components/GMap.vue
+++ b/src/components/GMap.vue
@@ -360,7 +360,7 @@
</a-col>
<a-col span="11">
<a-button :class="[showOption?'active-color':'unactive-color']" class="width-100" type="primary" :disabled="dockControlPanelVisible" size="small"
- @click="setDockControlPanelVisible(true)">
+ @click="openFlySetting">
操作
</a-button>
</a-col>
@@ -373,7 +373,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>
<!-- 飞机-->
@@ -399,10 +399,16 @@
<a-row align="middle" justify="center">
<a-col span="24"> <div v-if="deviceInfo.device?.mode_code == 14 || !deviceInfo.device" style="color:#494949;" class="flex-display flex-justify-center mt5 mb5">当前设备已关机,无法进行直播</div> </a-col>
</a-row>
- <a-row align="middle" justify="center">
- <a-col span="24">
+ <a-row class="p5" align="middle" justify="space-between">
+ <a-col span="11">
<a-button :disabled="deviceInfo.device?.mode_code == 14 || !deviceInfo.device?true:false" :class="[showAircraft?'active-color':'unactive-color']" class="width-100" type="primary" size="small" @click="openAircra">
飞行控制
+ </a-button>
+ </a-col>
+ <a-col span="11">
+ <a-button :class="[openDroneControl?'active-color':'unactive-color']" class="width-100" type="primary" size="small"
+ @click="openDeviceSetting">
+ 操作
</a-button>
</a-col>
</a-row>
@@ -411,7 +417,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>
<!-- 飞机图标信息 -->
@@ -621,7 +627,7 @@
</div>
</div>
<!-- 飞行指令 -->
- <DroneControlPanel :sn="osdVisible.gateway_sn" :deviceInfo="deviceInfo" :payloads="osdVisible.payloads">
+ <DroneControlPanel v-model="openDroneControl" :sn="osdVisible.gateway_sn" :deviceInfo="deviceInfo" :payloads="osdVisible.payloads">
</DroneControlPanel>
</div>
</div>
@@ -703,6 +709,8 @@
label: string,
more?: any
}
+ // 打开飞行控制
+ const openDroneControl = ref(false)
const root = getRoot()
// 监控显示
const showMonitor = ref(false)
@@ -897,8 +905,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
@@ -967,6 +991,16 @@
aircraftList.value = []
aircraSelected.value = ''
}
+ // 打开机场操作
+ const openFlySetting = () => {
+ openDroneControl.value = false
+ setDockControlPanelVisible(true)
+ }
+ // 打开无人机操作
+ const openDeviceSetting = () => {
+ setDockControlPanelVisible(false)
+ openDroneControl.value = !openDroneControl.value
+ }
watch(() => store.state.deviceStatusEvent,
data => {
if (Object.keys(data.deviceOnline).length !== 0) {
@@ -974,11 +1008,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 = {}
}
},
@@ -1294,7 +1323,12 @@
aircraSelected,
selectChange,
closeOperate,
- closeOsdWindow
+ closeOsdWindow,
+ openDroneControl,
+ openFlySetting,
+ openDeviceSetting,
+ airTimeout,
+ flyTimeout
}
}
})
--
Gitblit v1.9.3