GuLiMmo
2024-03-19 aec00ecc093be803860c8675cbe1c4c776a7cb4e
src/components/g-map/DroneControlPanel.vue
@@ -14,56 +14,56 @@
                            {{ flightController ? '退出控制' : '进入控制' }}
                        </Button>
                      <Button  size="small" @click="flyByPoints">
                        图斑飞行
                      </Button>
<!--                      <Button  size="small" @click="flyByPoints">-->
<!--                        图斑飞行-->
<!--                      </Button>-->
                    </div>
                </div>
                <div class="row">
                    <div class="drone-control-direction">
                        <Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_Q)" @onmouseup="onMouseUp">
                        <Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_Q)" @mouseup="onMouseUp">
                            <template #icon>
                                <UndoOutlined/>
                            </template>
                            <span class="word">Q</span>
                        </Button>
                        <Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_W)" @onmouseup="onMouseUp">
                        <Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_W)" @mouseup="onMouseUp">
                            <template #icon>
                                <UpOutlined/>
                            </template>
                            <span class="word">W</span>
                        </Button>
                        <Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_E)" @onmouseup="onMouseUp">
                        <Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_E)" @mouseup="onMouseUp">
                            <template #icon>
                                <RedoOutlined/>
                            </template>
                            <span class="word">E</span>
                        </Button>
                        <Button size="small" ghost @mousedown="onMouseDown(KeyCode.ARROW_UP)" @onmouseup="onMouseUp">
                        <Button size="small" ghost @mousedown="onMouseDown(KeyCode.ARROW_UP)" @mouseup="onMouseUp">
                            <template #icon>
                                <ArrowUpOutlined/>
                            </template>
                        </Button>
                        <br/>
                        <Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_A)" @onmouseup="onMouseUp">
                        <Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_A)" @mouseup="onMouseUp">
                            <template #icon>
                                <LeftOutlined/>
                            </template>
                            <span class="word">A</span>
                        </Button>
                        <Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_S)" @onmouseup="onMouseUp">
                        <Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_S)" @mouseup="onMouseUp">
                            <template #icon>
                                <DownOutlined/>
                            </template>
                            <span class="word">S</span>
                        </Button>
                        <Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_D)" @onmouseup="onMouseUp">
                        <Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_D)" @mouseup="onMouseUp">
                            <template #icon>
                                <RightOutlined/>
                            </template>
                            <span class="word">D</span>
                        </Button>
                        <Button size="small" ghost @mousedown="onMouseDown(KeyCode.ARROW_DOWN)" @onmouseup="onMouseUp">
                        <Button size="small" ghost @mousedown="onMouseDown(KeyCode.ARROW_DOWN)" @mouseup="onMouseUp">
                            <template #icon>
                                <ArrowDownOutlined/>
                            </template>
@@ -321,6 +321,7 @@
import { parseJsonFile } from '/@/utils/geo-utils'
import { cesiumOperation } from '/@/hooks/use-cesium-tsa'
import * as Cesium from 'cesium'
import { start } from 'repl'
const props = defineProps<{
    sn: string,
    deviceInfo: DeviceInfoType,
@@ -524,10 +525,16 @@
  // })
  flyByArea(sn, dockPoint, jsonPath, radius, deviceSn, payloadIndex).then(res => {
    const targetPoint = res.data
    const targetPoint = res.data || []
    // 机场位置
    const startPoint = {
      lon: props.deviceInfo.dock.basic_osd.longitude,
      lat: props.deviceInfo.dock.basic_osd.latitude
    }
    targetPoint.unshift(startPoint)
    console.log('targetPoint====', targetPoint)
    // 获取到点之后在图上绘点
    targetPoint.forEach((point, index) => {
    targetPoint.forEach((point: { lon: number; lat: number }, index: number) => {
      console.log(point)
      const setting = {
        longitude: point.lon,