From 60bb69f4cfc33cd0224e856afc2b00f6bc80e4d4 Mon Sep 17 00:00:00 2001
From: husq <931347610@qq.com>
Date: Mon, 25 Sep 2023 14:24:51 +0800
Subject: [PATCH] 无人机控制区分
---
src/components/GMap.vue | 31 ++++++++++++++++++++++++++-----
1 files changed, 26 insertions(+), 5 deletions(-)
diff --git a/src/components/GMap.vue b/src/components/GMap.vue
index d494607..33ca752 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>
@@ -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 :disabled="deviceInfo.device?.mode_code == 14 || !deviceInfo.device?true:false" :class="[openDroneControl?'active-color':'unactive-color']" class="width-100" type="primary" size="small"
+ @click="openDeviceSetting">
+ 操作
</a-button>
</a-col>
</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)
@@ -966,6 +974,16 @@
// const videoId = deviceInfo.dock.basic_osd?.sub_device?.device_sn + '/' + aircraSelected.value + '/' + 'normal-0'
aircraftList.value = []
aircraSelected.value = ''
+ }
+ // 打开机场操作
+ const openFlySetting = () => {
+ openDroneControl.value = false
+ setDockControlPanelVisible(true)
+ }
+ // 打开无人机操作
+ const openDeviceSetting = () => {
+ setDockControlPanelVisible(false)
+ openDroneControl.value = false
}
watch(() => store.state.deviceStatusEvent,
data => {
@@ -1294,7 +1312,10 @@
aircraSelected,
selectChange,
closeOperate,
- closeOsdWindow
+ closeOsdWindow,
+ openDroneControl,
+ openFlySetting,
+ openDeviceSetting
}
}
})
--
Gitblit v1.9.3