| | |
| | | <template> |
| | | <div class="drone-control-wrapper"> |
| | | <div class="drone-control-header">无人机飞行控制</div> |
| | | <div class="drone-control-wrapper" v-if="modelValue"> |
| | | <div class="drone-control-header width-100 flex-display flex-align-center flex-justify-between"> |
| | | <span>无人机飞行控制</span> |
| | | <span @click="closeDrone"> |
| | | <CloseOutlined /> |
| | | </span> |
| | | </div> |
| | | <div class="drone-control-box"> |
| | | <div class="box"> |
| | | <div class="row"> |
| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { defineProps, reactive, ref, watch, computed, onMounted, watchEffect } from 'vue' |
| | | import { defineProps, reactive, ref, watch, computed, onMounted, watchEffect, defineEmits } from 'vue' |
| | | import { Select, message, Button } from 'ant-design-vue' |
| | | import { PayloadInfo, DeviceInfoType, ControlSource, DeviceOsdCamera, DrcStateEnum } from '/@/types/device' |
| | | import { useMyStore } from '/@/store' |
| | | import { postDrcEnter, postDrcExit } from '/@/api/drc' |
| | | import { useMqtt, DeviceTopicInfo } from './use-mqtt' |
| | | import { DownOutlined, UpOutlined, LeftOutlined, RightOutlined, PauseCircleOutlined, UndoOutlined, RedoOutlined, ArrowUpOutlined, ArrowDownOutlined } from '@ant-design/icons-vue' |
| | | import { DownOutlined, UpOutlined, LeftOutlined, RightOutlined, PauseCircleOutlined, UndoOutlined, RedoOutlined, ArrowUpOutlined, ArrowDownOutlined, CloseOutlined } from '@ant-design/icons-vue' |
| | | import { useManualControl, KeyCode } from './use-manual-control' |
| | | import { usePayloadControl } from './use-payload-control' |
| | | import { CameraMode, CameraType, CameraTypeOptions, ZoomCameraTypeOptions, CameraListItem } from '/@/types/live-stream' |
| | |
| | | const props = defineProps<{ |
| | | sn: string, |
| | | deviceInfo: DeviceInfoType, |
| | | payloads: null | PayloadInfo[] |
| | | payloads: null | PayloadInfo[], |
| | | modelValue: Boolean, |
| | | }>() |
| | | |
| | | const store = useMyStore() |
| | |
| | | } |
| | | cmdItem.loading = false |
| | | } |
| | | |
| | | const emits = defineEmits(['update:modelValue']) |
| | | // 关闭弹窗 |
| | | const closeDrone = () => { |
| | | emits('update:modelValue', false) |
| | | } |
| | | const { flyToPoint, stopFlyToPoint, takeoffToPoint } = useDroneControl() |
| | | const MAX_SPEED = 14 |
| | | |
| | |
| | | } |
| | | enterFlightControl() |
| | | } |
| | | |
| | | // 进入飞行控制 |
| | | async function enterFlightControl () { |
| | | try { |
| | |
| | | |
| | | <style lang='scss' scoped> |
| | | .drone-control-wrapper{ |
| | | // border-bottom: 1px solid #515151; |
| | | position: absolute; |
| | | background: #000; |
| | | color: #fff; |
| | | left: calc( 100% + 10px); |
| | | width: 480px; |
| | | top: 0; |
| | | |
| | | .drone-control-header{ |
| | | font-size: 14px; |