一键起飞、指点起飞选择目标点增加高度控制

main
刘妍 2 months ago
parent 929ffcb2a5
commit 5820971d5c

@ -1,43 +0,0 @@
# Whether to open mock
VITE_USE_MOCK = true
# public path
VITE_PUBLIC_PATH = /
# Whether to enable gzip or brotli compression
# Optional: gzip | brotli | none
# If you need multiple forms, you can use `,` to separate
VITE_BUILD_COMPRESS = 'none'
# Basic interface address SPA
# 天空地项目
VITE_GLOB_API_URL=http://175.27.168.120:6001
VITE_GLOB_INFO_IMAGE_URL=http://175.27.168.120:6079
# File upload address optional
# It can be forwarded by nginx or write the actual address directly
VITE_GLOB_UPLOAD_URL=http://175.27.168.120:6079
# Interface prefix
VITE_GLOB_API_URL_PREFIX=
VITE_GLOB_APP_TITLE = 天网慧眼低空态势感知平台
VITE_GLOB_APP_EN_TITLE = The Information System of Lanling County Natural Resources and Planning Bureau
VITE_GLOB_APP_LOGO = /logo.png
VITE_GLOB_APP_MANAGEMENT_UNIT = 管理单位:天网慧眼低空态势感知平台
VITE_GLOB_APP_TECHINICAL_SUPPORT = 技术⽀持:天网慧眼低空态势感知平台
VITE_GLOB_APP_VERSIONS = 系统版本V1.0
VITE_GLOB_YINGXIANG_SERVER = http://192.168.31.205:8080/geoserver/ne/wms?service=WMS&version=1.1.0&request=GetMap&layers=ne:linyitif&styles=&bbox={bbox-epsg-3857}&width=256&height=256&srs=EPSG:3857&format=image/png&TRANSPARENT=TRUE
VITE_GLOB_FILE_PREVIEW = http://120.222.154.7:6081

@ -13,7 +13,6 @@
import { getAppEnvConfig } from '@/utils/env';
import axios from 'axios';
const { VITE_GLOB_YINGXIANG_SERVER, VITE_GLOB_YAOGANYINGXIANG_SERVER } = getAppEnvConfig();
const { VITE_GLOB_API_URL, VITE_GLOB_LAN_API_URL } = getAppEnvConfig();
const props = defineProps(['width', 'height', 'zIndex', 'position', 'centerAndZoom']);
@ -83,20 +82,6 @@
],
tileSize: 256,
},
yaogan: {
type: 'raster',
tiles: [VITE_GLOB_YAOGANYINGXIANG_SERVER],
tileSize: 256,
minzoom: 16,
maxzoom: 24,
},
yingxiang: {
type: 'raster',
tiles: [VITE_GLOB_YINGXIANG_SERVER],
tileSize: 256,
minzoom: 16,
maxzoom: 24,
},
}
: {
'raster-tiles': {
@ -130,20 +115,6 @@
type: 'raster',
source: 'raster-tiles',
},
{
id: 'yaogan',
type: 'raster',
source: 'yaogan',
minzoom: 9,
maxzoom: 15,
},
{
id: 'yingxiang',
type: 'raster',
source: 'yingxiang',
minzoom: 13,
maxzoom: 24,
},
]
: [
{

@ -40,8 +40,7 @@ export function getAppEnvConfig() {
VITE_GLOB_APP_MANAGEMENT_UNIT,
VITE_GLOB_APP_TECHINICAL_SUPPORT,
VITE_GLOB_APP_VERSIONS,
VITE_GLOB_YINGXIANG_SERVER,
VITE_GLOB_FILE_PREVIEW
VITE_GLOB_FILE_PREVIEW,
} = ENV;
let { VITE_GLOB_API_URL } = ENV;
if (localStorage.getItem(API_ADDRESS)) {
@ -59,8 +58,7 @@ export function getAppEnvConfig() {
VITE_GLOB_APP_MANAGEMENT_UNIT,
VITE_GLOB_APP_TECHINICAL_SUPPORT,
VITE_GLOB_APP_VERSIONS,
VITE_GLOB_YINGXIANG_SERVER,
VITE_GLOB_FILE_PREVIEW
VITE_GLOB_FILE_PREVIEW,
};
}

@ -99,6 +99,7 @@
console.log(e);
locationVal.value.lat = e._lat;
locationVal.value.lng = e._lng;
locationVal.value.alt = e._alt;
EventBus.emit('obtainTheLocation', locationVal.value);
};
const airPort = ref({
@ -146,18 +147,19 @@
flightControlVisible.value = !flightControlVisible.value;
};
const clickTakeOff = () => {
console.log('clickTakeOff');
takeOffFormVisible.value = true;
};
const clickFlyTo = () => {
flyToFormVisible.value = true;
};
const changeTakeOffForm = () => {
const changeTakeOffForm = (val) => {
takeOffFormVisible.value = false;
setTimeout(() => {
uavLive.value = true;
livePreviewVisible.value = true;
}, 2000);
if (!val) {
setTimeout(() => {
uavLive.value = true;
livePreviewVisible.value = true;
}, 2000);
}
};
const loadLiveStreaming = () => {
livePreviewVisible.value = !livePreviewVisible.value;

@ -61,7 +61,9 @@
import { Map } from '../index';
import { EventBus } from '@/utils/eventBus';
import VueDragResize from 'vue-drag-resize/src';
import { useMessage } from '@/hooks/web/useMessage';
const { createMessage } = useMessage();
const width = ref(460);
const height = ref(260);
const left = ref(300);
@ -76,13 +78,21 @@
max_speed: 10,
points: [
{
latitude: 35.134615,
longitude: 118.296676,
height: 115,
latitude: null,
longitude: null,
height: null,
},
],
});
const takeOff = () => {
if (
data.points[0].latitude == null ||
data.points[0].longitude == null ||
data.points[0].height == null
) {
createMessage.warning('请先选择目标点');
return;
}
const querys = {
bid: buildGUID(),
data: data,
@ -106,6 +116,7 @@
EventBus.on('obtainTheLocation', (val: any) => {
data.points[0].latitude = val.lat;
data.points[0].longitude = val.lng;
data.points[0].height = val.alt;
});
});
</script>

@ -11,7 +11,7 @@
<div class="takeoff-information">
<div class="title"
>一键起飞
<div @click="emits('changeTakeOffForm')">
<div @click="emits('changeTakeOffForm', true)">
<CloseOutlined />
</div>
</div>
@ -112,7 +112,9 @@
import { EventBus } from '@/utils/eventBus';
import { airPortStore } from '@/store/modules/airport';
import VueDragResize from 'vue-drag-resize/src';
import { useMessage } from '@/hooks/web/useMessage';
const { createMessage } = useMessage();
const width = ref(460);
const height = ref(620);
const left = ref(300);
@ -126,9 +128,9 @@
});
const data = reactive({
flight_id: uuid(14, 14),
target_latitude: 35.134615,
target_longitude: 118.296676,
target_height: 115,
target_latitude: null,
target_longitude: null,
target_height: null,
security_takeoff_height: 100,
rth_altitude: 115,
rth_mode: 1,
@ -200,6 +202,14 @@
},
);
const takeOff = () => {
if (
data.target_latitude == null ||
data.target_longitude == null ||
data.target_height == null
) {
createMessage.warning('请先选择目标点');
return;
}
const querys = {
bid: buildGUID(),
data: data,
@ -223,6 +233,7 @@
EventBus.on('obtainTheLocation', (val: any) => {
data.target_latitude = val.lat;
data.target_longitude = val.lng;
data.target_height = val.alt;
});
});
</script>

Loading…
Cancel
Save