merge
commit
1aa34afed7
43
.env.lanling
43
.env.lanling
|
|
@ -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
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
|
After Width: | Height: | Size: 50 KiB |
|
|
@ -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,
|
||||
},
|
||||
]
|
||||
: [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ export enum PageEnum {
|
|||
// basic login path
|
||||
BASE_LOGIN = '/login',
|
||||
// basic home path
|
||||
BASE_HOME = '/dashboard',
|
||||
BASE_HOME = '/workmanagement/projecthome',
|
||||
// error page path
|
||||
ERROR_PAGE = '/exception',
|
||||
// error log page path
|
||||
|
|
|
|||
|
|
@ -25,4 +25,4 @@ const dashboard: AppRouteModule = {
|
|||
],
|
||||
};
|
||||
|
||||
export default dashboard;
|
||||
// export default dashboard;
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,15 +2,15 @@
|
|||
<div class="setting-control-title">机场</div>
|
||||
<div class="setting-control-list" style="gap: 0px;">
|
||||
<div class="show-info-item">
|
||||
<div class="info-value">{{ (props.deviceInfoList[props.controlSN].acc_time / 60 / 60 / 24).toFixed(1) }}天</div>
|
||||
<div class="info-value">{{ `${(props.deviceInfoList[props.controlSN]?.acc_time / 60 / 60 / 24).toFixed(1)}天` || '--' }}</div>
|
||||
<div class="info-label">累计运行时长</div>
|
||||
</div>
|
||||
<div class="show-info-item">
|
||||
<div class="info-value">{{ props.deviceInfoList[props.controlSN].job_number }}次</div>
|
||||
<div class="info-value">{{ `${props.deviceInfoList[props.controlSN]?.job_number}次` || '--' }}</div>
|
||||
<div class="info-label">作业架次</div>
|
||||
</div>
|
||||
<div class="show-info-item">
|
||||
<div class="info-value">{{ (props.deviceInfoList[props.controlSN].position_state.gps_number + props.deviceInfoList[props.controlSN].position_state.rtk_number) }}个</div>
|
||||
<div class="info-value">{{ `${(props.deviceInfoList[props.controlSN]?.position_state?.gps_number + props.deviceInfoList[props.controlSN]?.position_state?.rtk_number)}个` || '--' }}</div>
|
||||
<div class="info-label">机场搜星</div>
|
||||
</div>
|
||||
<div class="show-info-item">
|
||||
|
|
@ -46,33 +46,73 @@
|
|||
<div class="info-label">蓄电池温度</div>
|
||||
</div>
|
||||
<div class="show-info-item">
|
||||
<div class="info-value">{{ props.deviceInfoList[props.controlSN].temperature }}℃</div>
|
||||
<div class="info-value">{{ `${props.deviceInfoList[props.controlSN]?.temperature}℃` || '--' }}</div>
|
||||
<div class="info-label">舱内温度</div>
|
||||
</div>
|
||||
<div class="show-info-item">
|
||||
<div class="info-value">{{ props.deviceInfoList[props.controlSN].humidity }}%RH</div>
|
||||
<div class="info-value">{{ `${props.deviceInfoList[props.controlSN]?.humidity}%RH` || '--' }}</div>
|
||||
<div class="info-label">舱内湿度</div>
|
||||
</div>
|
||||
<div class="show-info-item">
|
||||
<div class="info-value">{{ props.deviceInfoList[props.controlSN].environment_temperature }}℃</div>
|
||||
<div class="info-value">{{ `${props.deviceInfoList[props.controlSN]?.environment_temperature}℃` || '--' }}</div>
|
||||
<div class="info-label">舱外温度</div>
|
||||
</div>
|
||||
<div class="show-info-item">
|
||||
<div class="info-value">{{ rainfallOptions[props.deviceInfoList[props.controlSN].rainfall] }}</div>
|
||||
<div class="info-value">{{ rainfallOptions[props.deviceInfoList[props.controlSN]?.rainfall] || '--' }}</div>
|
||||
<div class="info-label">雨量</div>
|
||||
</div>
|
||||
<div class="show-info-item">
|
||||
<div class="info-value">{{ props.deviceInfoList[props.controlSN].wind_speed }}m/s</div>
|
||||
<div class="info-value">{{ `${props.deviceInfoList[props.controlSN]?.wind_speed}m/s` || '--' }}</div>
|
||||
<div class="info-label">风速</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="setting-control-title">飞行器</div>
|
||||
<div class="setting-control-title">飞行器</div>
|
||||
<div class="setting-control-list" style="gap: 0px;">
|
||||
<div class="show-info-item">
|
||||
<div class="info-value">{{ (props.deviceInfoList[props.controlSN].acc_time / 60 / 60 / 24).toFixed(1) }}天</div>
|
||||
<div class="info-label">累计运行时长</div>
|
||||
<div class="info-value">{{ props.deviceInfoList[props.controlChildSN]?.wind_speed || '--' }}m/s</div>
|
||||
<div class="info-label">累计飞行时长</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="show-info-item">
|
||||
<div class="info-value">{{ props.deviceInfoList[props.controlChildSN]?.total_flight_sorties || '--' }}次</div>
|
||||
<div class="info-label">飞行架次</div>
|
||||
</div>
|
||||
<div class="show-info-item">
|
||||
<div class="info-value">--</div>
|
||||
<div class="info-label">图传</div>
|
||||
</div>
|
||||
<div class="show-info-item">
|
||||
<div class="info-value">{{ isFixedOptions[props.deviceInfoList[props.controlChildSN]?.position_state?.is_fixed] || '--' }}</div>
|
||||
<div class="info-label">搜星状态</div>
|
||||
</div>
|
||||
<div class="show-info-item">
|
||||
<div class="info-value">{{ nightLightsStateOptions[props.deviceInfoList[props.controlChildSN]?.night_lights_state] || '--' }}</div>
|
||||
<div class="info-label">飞行器夜航灯</div>
|
||||
</div>
|
||||
<div class="show-info-item">
|
||||
<div class="info-value">{{ props.deviceInfoList[props.controlSN]?.alternate_land_point?.safe_land_height || '--' }}</div>
|
||||
<div class="info-label">备降转移高度</div>
|
||||
</div>
|
||||
<div class="show-info-item">
|
||||
<div class="info-value">{{ props.deviceInfoList[props.controlSN]?.height_limit || '--' }}米</div>
|
||||
<div class="info-label">限高</div>
|
||||
</div>
|
||||
<div class="show-info-item">
|
||||
<div class="info-value">--</div>
|
||||
<div class="info-label">限远</div>
|
||||
</div>
|
||||
<div class="show-info-item">
|
||||
<div class="info-value">{{ (
|
||||
props.deviceInfoList[props.controlChildSN]?.obstacle_avoidance?.horizon ||
|
||||
props.deviceInfoList[props.controlChildSN]?.obstacle_avoidance?.upside ||
|
||||
props.deviceInfoList[props.controlChildSN]?.obstacle_avoidance?.downside
|
||||
)? '开启': '关闭' }}</div>
|
||||
<div class="info-label">避障</div>
|
||||
</div>
|
||||
<div class="show-info-item">
|
||||
<div class="info-value">{{ childModeCodeOptions[props.deviceInfoList[props.controlChildSN]?.mode_code] || '--' }}</div>
|
||||
<div class="info-label">运行模式</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="open-control-div">
|
||||
<div class="control-content">
|
||||
<span class="open-title">远程调试</span>
|
||||
|
|
@ -275,7 +315,7 @@
|
|||
<div>
|
||||
<div class="show-span">
|
||||
{{
|
||||
deviceOnlineStatusOptions[props.deviceInfoList[props.controlSN].sub_device.device_online_status]
|
||||
deviceOnlineStatusOptions[props.deviceInfoList[props.controlSN]?.sub_device?.device_online_status] || '--'
|
||||
}}
|
||||
</div>
|
||||
<div class="show-span">飞行器电源</div>
|
||||
|
|
@ -284,9 +324,9 @@
|
|||
<div class="button-div">
|
||||
<a-button
|
||||
class="control-button"
|
||||
@click="changeDeviceState(props.deviceInfoList[props.controlSN].sub_device.device_online_status == 0? 'drone_open': 'drone_close')"
|
||||
@click="changeDeviceState(props.deviceInfoList[props.controlSN]?.sub_device?.device_online_status == 0? 'drone_open': 'drone_close')"
|
||||
:disabled="props.deviceInfoList[props.controlSN].mode_code != 2">
|
||||
{{props.deviceInfoList[props.controlSN].sub_device.device_online_status == 0? '开机': '关机'}}
|
||||
{{props.deviceInfoList[props.controlSN]?.sub_device?.device_online_status == 0? '开机': '关机'}}
|
||||
</a-button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -298,7 +338,7 @@
|
|||
<div>
|
||||
<div class="show-span">
|
||||
{{
|
||||
droneChargeStateOptions[props.deviceInfoList[props.controlSN].drone_charge_state.state]
|
||||
droneChargeStateOptions[props.deviceInfoList[props.controlSN]?.drone_charge_state?.state] || '--'
|
||||
}}
|
||||
</div>
|
||||
<div class="show-span">飞行器充电</div>
|
||||
|
|
@ -321,7 +361,7 @@
|
|||
<div>
|
||||
<div class="show-span">
|
||||
{{
|
||||
fourgLinkStateOptions[props.deviceInfoList[props.controlSN]?.wireless_link['4g_link_state']]
|
||||
fourgLinkStateOptions[props.deviceInfoList[props.controlSN]?.wireless_link?.['4g_link_state']] || '--'
|
||||
}}
|
||||
</div>
|
||||
<div class="show-span">增强图传</div>
|
||||
|
|
@ -330,9 +370,9 @@
|
|||
<div class="button-div">
|
||||
<a-button
|
||||
class="control-button"
|
||||
@click="changeDeviceState('sdr_workmode_switch',props.deviceInfoList[props.controlSN]?.wireless_link['4g_link_state'] == 0? 1: 0, 'link_workmode')"
|
||||
@click="changeDeviceState('sdr_workmode_switch',props.deviceInfoList[props.controlSN]?.wireless_link?.['4g_link_state'] == 0? 1: 0, 'link_workmode')"
|
||||
:disabled="props.deviceInfoList[props.controlSN].mode_code != 2">
|
||||
{{props.deviceInfoList[props.controlSN]?.wireless_link['4g_link_state'] == 0? '开启': '关闭'}}
|
||||
{{props.deviceInfoList[props.controlSN]?.wireless_link?.['4g_link_state'] == 0? '开启': '关闭'}}
|
||||
</a-button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -365,7 +405,7 @@
|
|||
<div>
|
||||
<div class="show-span">
|
||||
{{
|
||||
linkWorkmodeOptions[props.deviceInfoList[props.controlSN].wireless_link.link_workmode]
|
||||
linkWorkmodeOptions[props.deviceInfoList[props.controlSN]?.wireless_link?.link_workmode] || '--'
|
||||
}}
|
||||
</div>
|
||||
<div class="show-span">飞行器增强图传</div>
|
||||
|
|
@ -390,8 +430,9 @@ import { buildGUID } from '@/utils/uuid';
|
|||
import Icon from '@/components/Icon/Icon.vue';
|
||||
import { modeCodeOptions, deviceOnlineStatusOptions, coverStateOptions, airConditionerStateOptions, silentModeOptions,
|
||||
alarmStateOptions, droneChargeStateOptions, fourgLinkStateOptions, linkWorkmodeOptions, sourceTypeOptions, qualityOptions,
|
||||
isConfiguredOptions, rainfallOptions } from './util'
|
||||
const props = defineProps(['deviceInfoList', 'controlSN'])
|
||||
isConfiguredOptions, rainfallOptions, isFixedOptions, nightLightsStateOptions, childModeCodeOptions } from './util'
|
||||
const props = defineProps(['deviceInfoList', 'controlSN', 'controlChildSN'])
|
||||
console.log(props.deviceInfoList,props.controlChildSN)
|
||||
|
||||
const openDebug = () => {
|
||||
let publishUrl = `thing/product/${props.controlSN}/services`
|
||||
|
|
|
|||
|
|
@ -77,4 +77,36 @@ export const rainfallOptions = {
|
|||
1: '小雨',
|
||||
2: '中雨',
|
||||
3: '大雨',
|
||||
}
|
||||
export const isFixedOptions = {
|
||||
0: '未开始',
|
||||
1: '收敛中',
|
||||
2: '收敛成功',
|
||||
3: '收敛失败',
|
||||
}
|
||||
export const nightLightsStateOptions = {
|
||||
0: '关闭',
|
||||
1: '打开',
|
||||
}
|
||||
export const childModeCodeOptions = {
|
||||
0: '待机',
|
||||
1: '起飞准备',
|
||||
2: '起飞准备完毕',
|
||||
3: '手动飞行',
|
||||
4: '自动起飞',
|
||||
5: '航线飞行',
|
||||
6: '全景拍照',
|
||||
7: '智能跟随',
|
||||
8: 'ADS-B 躲避',
|
||||
9: '自动返航',
|
||||
10: '自动降落',
|
||||
11: '强制降落',
|
||||
12: '三桨叶降落',
|
||||
13: '升级中',
|
||||
14: '未连接',
|
||||
15: 'APAS',
|
||||
16: '虚拟摇杆状态',
|
||||
17: '指令飞行',
|
||||
18: '空中 RTK 收敛模式',
|
||||
19: '机场选址中',
|
||||
}
|
||||
|
|
@ -58,7 +58,7 @@
|
|||
<DeviceWarning />
|
||||
</a-drawer>
|
||||
<a-drawer class="feedback-drawer" title="设备运维" v-model:open="deviceControl" width="45%" :closable="false">
|
||||
<DeviceControl :deviceInfoList="deviceInfoList" :controlSN="controlSN"/>
|
||||
<DeviceControl :deviceInfoList="deviceInfoList" :controlSN="controlSN" :controlChildSN="controlChildSN"/>
|
||||
</a-drawer>
|
||||
<a-modal v-model:open="deviceBindingModal" title="设备绑定码" @ok="handleOk">
|
||||
<DeviceBindModal />
|
||||
|
|
@ -131,17 +131,25 @@ const deviceInfoList = ref({})
|
|||
const controlSN = ref()
|
||||
const editDeviceModal = ref(false)
|
||||
const editDeviceDate = ref({})
|
||||
const controlChildSN = ref()
|
||||
watch(() => [afterFetch.value, props.connected], ([newAfterFetch, newConnected], [oldAfterFetch, oldConnected]) => {
|
||||
console.log(newAfterFetch,newConnected)
|
||||
console.log(getDataSource())
|
||||
if(newConnected && newAfterFetch){
|
||||
nextTick(() => {
|
||||
console.log(getDataSource())
|
||||
getDataSource().forEach(item => {
|
||||
let topicUrl = `thing/product/${item.sn}/osd`;
|
||||
let servicesReplyUrl = `thing/product/${item.sn}/services_reply`
|
||||
clientSubscribe(topicUrl);
|
||||
clientSubscribe(servicesReplyUrl);
|
||||
if(item.uavList){
|
||||
item.uavList.forEach(childItem => {
|
||||
let childTopicUrl = `thing/product/${childItem.sn}/osd`;
|
||||
let childServicesReplyUrl = `thing/product/${childItem.sn}/services_reply`
|
||||
clientSubscribe(childTopicUrl);
|
||||
clientSubscribe(childServicesReplyUrl);
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
@ -213,6 +221,7 @@ const workStatus = (record) => {
|
|||
}
|
||||
const openDeviceControl = (record) => {
|
||||
controlSN.value = record.sn
|
||||
controlChildSN.value = record.uavList[0].sn
|
||||
let check = Object.keys(deviceInfoList.value).includes(controlSN.value) && Object.keys(deviceInfoList.value[controlSN.value]).includes('mode_code')
|
||||
if(!check){
|
||||
return message.warning('未获取到机场信息')
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@
|
|||
drcDownTopic,
|
||||
eventsTopicSubscribe,
|
||||
drcUpTopic,
|
||||
errorName
|
||||
errorName,
|
||||
} from '@/utils/debugging/remote';
|
||||
import { buildGUID } from '@/utils/uuid';
|
||||
import { useMessage } from '@/hooks/web/useMessage';
|
||||
|
|
@ -126,17 +126,6 @@
|
|||
const modeEnter = ref(false);
|
||||
const airportVal: any = ref({
|
||||
mode_code: 0,
|
||||
wind_speed: 0,
|
||||
environment_temperature: 0,
|
||||
temperature: 0,
|
||||
rainfall: 0,
|
||||
network_state: {
|
||||
rate: 0,
|
||||
},
|
||||
drone_in_dock: 0,
|
||||
drone_charge_state: {
|
||||
capacity_percent: 0,
|
||||
},
|
||||
});
|
||||
|
||||
//修改redis用户锁
|
||||
|
|
@ -320,7 +309,7 @@
|
|||
getClient().on('message', (topic, message) => {
|
||||
const rs = JSON.parse(message);
|
||||
if (rs.data.mode_code || rs.data.mode_code == 0) {
|
||||
airportVal.value = rs.data;
|
||||
airportVal.value.mode_code = rs.data.mode_code;
|
||||
}
|
||||
if (rs.method == 'flight_authority_grab') {
|
||||
if (rs.data.result == 0) {
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -278,7 +278,7 @@
|
|||
}
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
}, 2000);
|
||||
});
|
||||
const changeSize = (newRect) => {
|
||||
width.value = newRect.width;
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -1596,6 +1596,36 @@ const loadChangGuangLayer = ()=>{
|
|||
};
|
||||
// 设置无人机轨迹
|
||||
const setUAVPosition = () => {
|
||||
let point = graphicLayer.getGraphicById('set-uav');
|
||||
const position = [props.uavTrack.longitude, props.uavTrack.latitude, props.uavTrack.height];
|
||||
// 更新航点
|
||||
if (point) {
|
||||
point.setOptions({
|
||||
id: 'set-uav',
|
||||
name: '飞行器位置',
|
||||
position: position,
|
||||
style: {
|
||||
url: '/projecthome/dajiang.gltf',
|
||||
scale: 0.1,
|
||||
minimumPixelSize: 100,
|
||||
},
|
||||
frameRate: 1,
|
||||
});
|
||||
} else {
|
||||
const graphicModel = new mars3d.graphic.ModelPrimitive({
|
||||
id: 'set-uav',
|
||||
name: '飞行器位置',
|
||||
position: position,
|
||||
style: {
|
||||
url: '/projecthome/dajiang.gltf',
|
||||
scale: 0.1,
|
||||
minimumPixelSize: 100,
|
||||
},
|
||||
frameRate: 1,
|
||||
});
|
||||
graphicLayer.addGraphic(graphicModel);
|
||||
}
|
||||
|
||||
let route = graphicLayer.getGraphicById('uav-route');
|
||||
if (!route) {
|
||||
route = new mars3d.graphic.Route({
|
||||
|
|
@ -1616,56 +1646,6 @@ const loadChangGuangLayer = ()=>{
|
|||
);
|
||||
route.addTimePosition(positionVal);
|
||||
}
|
||||
|
||||
let point = graphicLayer.getGraphicById('set-uav');
|
||||
const position = [props.uavTrack.longitude, props.uavTrack.latitude, props.uavTrack.height];
|
||||
// 更新航点
|
||||
if (point) {
|
||||
point.setOptions({
|
||||
id: 'set-uav',
|
||||
name: '飞行器位置',
|
||||
position: position,
|
||||
style: {
|
||||
image: '/projecthome/uav.png',
|
||||
width: 35,
|
||||
height: 59,
|
||||
scale: 1,
|
||||
horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
|
||||
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
||||
label: {
|
||||
text: '飞行器',
|
||||
font_size: 14,
|
||||
color: '#ffffff',
|
||||
outline: true,
|
||||
outlineColor: '#000000',
|
||||
pixelOffsetY: -70,
|
||||
},
|
||||
},
|
||||
});
|
||||
} else {
|
||||
let startGraphic = new mars3d.graphic.BillboardEntity({
|
||||
id: 'set-uav',
|
||||
name: '飞行器位置',
|
||||
position: position,
|
||||
style: {
|
||||
image: '/projecthome/uav.png',
|
||||
width: 35,
|
||||
height: 59,
|
||||
scale: 1,
|
||||
horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
|
||||
verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
|
||||
label: {
|
||||
text: '飞行器',
|
||||
font_size: 14,
|
||||
color: '#ffffff',
|
||||
outline: true,
|
||||
outlineColor: '#000000',
|
||||
pixelOffsetY: -70,
|
||||
},
|
||||
},
|
||||
});
|
||||
graphicLayer.addGraphic(startGraphic);
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue