飞行控制页面优化、解决拖拽导致文本框不能输入问题

main
刘妍 2 months ago
parent 1321546849
commit 8ffd55356e

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

@ -172,7 +172,7 @@
console.log(value); console.log(value);
cameraType.value = value; cameraType.value = value;
}; };
const msgData = ref(); const msgData = ref({});
const changeSelect = async (value?: any) => { const changeSelect = async (value?: any) => {
// //
// //
@ -211,9 +211,6 @@
airPort.value.latitude = rs.data.latitude; airPort.value.latitude = rs.data.latitude;
airPort.value.longitude = rs.data.longitude; airPort.value.longitude = rs.data.longitude;
} }
// relative_alternate_land_point 0
// self_converge_coordinate
// alternate_land_point 0
if (topic == topicUAVUrl) { if (topic == topicUAVUrl) {
if (rs.data.latitude && rs.data.longitude) { if (rs.data.latitude && rs.data.longitude) {
uavTrack.value = rs.data; uavTrack.value = rs.data;

@ -1,5 +1,5 @@
<template> <template>
<div class="airport-information" v-if="airportVal"> <div class="airport-information">
<div class="title" <div class="title"
>机场信息<span v-if="flighttask_step_code"> >机场信息<span v-if="flighttask_step_code">
<template v-if="flighttask_step_code == 0"></template> <template v-if="flighttask_step_code == 0"></template>
@ -16,8 +16,6 @@
<div class="content"> <div class="content">
<div class="content-title"> <div class="content-title">
{{ time }} {{ time }}
<!-- 获取不到摄像头的内容 -->
<!-- <span>机场摄像头未开</span> -->
</div> </div>
<div class="content-item"> <div class="content-item">
<div class="item-div" title="风速"> <div class="item-div" title="风速">
@ -68,9 +66,6 @@
@click="emits('changeLive')" @click="emits('changeLive')"
>机场直播</a-button >机场直播</a-button
> >
<!-- <a-button type="primary" style="background: #0a99eb" @click="emits('changeRemote')"
>远程调试</a-button
> -->
</div> </div>
</div> </div>
</div> </div>
@ -118,6 +113,12 @@
// console.log(val); // console.log(val);
flighttask_step_code.value = val.message.data.flighttask_step_code; flighttask_step_code.value = val.message.data.flighttask_step_code;
time.value = timestampToFormattedDate(val.message.timestamp); time.value = timestampToFormattedDate(val.message.timestamp);
} else if (
val.topic == 'thing/product/' + airPort.sn + '/osd' &&
val.message.data.drone_charge_state
) {
airportVal.value = val.message.data;
time.value = timestampToFormattedDate(val.message.timestamp);
} }
}, },
); );

@ -93,6 +93,7 @@
}; };
const stopTid = buildGUID(); const stopTid = buildGUID();
const closeLive = () => { const closeLive = () => {
emits('changeAirportLive');
const querys = { const querys = {
bid: buildGUID(), bid: buildGUID(),
method: 'live_stop_push', method: 'live_stop_push',
@ -103,7 +104,6 @@
}, },
}; };
servicesTopic(querys); servicesTopic(querys);
emits('changeAirportLive');
}; };
const reloadLive = () => { const reloadLive = () => {
player.src(live_info.url + liveCode.value + '.flv'); player.src(live_info.url + liveCode.value + '.flv');

@ -45,32 +45,76 @@
<div class="content-info"> <div class="content-info">
<div class="info-item"> <div class="info-item">
<!-- <img src="@/assets/images/flightoperation/flight_control.png" alt="" /> --> <!-- <img src="@/assets/images/flightoperation/flight_control.png" alt="" /> -->
<div class="info-item-top" title="上升" @click="changeDRC('throttle', 'up')"> <div class="info-item-top" title="上升" @click="changeDRC('throttle', 'up', '上升')">
<img src="@/assets/images/flightoperation/top.png" alt="" /> <img
src="@/assets/images/flightoperation/top-active.png"
alt=""
v-if="selectName == '上升'"
/>
<img src="@/assets/images/flightoperation/top.png" alt="" v-else />
</div> </div>
<div class="info-item-right" title="右旋转" @click="changeDRC('yaw', 'up')"> <div class="info-item-right" title="右旋转" @click="changeDRC('yaw', 'up', '右旋转')">
<img src="@/assets/images/flightoperation/right.png" alt="" /> <img
src="@/assets/images/flightoperation/right-active.png"
alt=""
v-if="selectName == '右旋转'"
/>
<img src="@/assets/images/flightoperation/right.png" alt="" v-else />
</div> </div>
<div class="info-item-bottom" title="下降" @click="changeDRC('throttle', 'down')"> <div
<img src="@/assets/images/flightoperation/bottom.png" alt="" /> class="info-item-bottom"
title="下降"
@click="changeDRC('throttle', 'down', '下降')"
>
<img
src="@/assets/images/flightoperation/bottom-active.png"
alt=""
v-if="selectName == '下降'"
/>
<img src="@/assets/images/flightoperation/bottom.png" alt="" v-else />
</div> </div>
<div class="info-item-left" title="左旋转" @click="changeDRC('yaw', 'down')"> <div class="info-item-left" title="左旋转" @click="changeDRC('yaw', 'down', '左旋转')">
<img src="@/assets/images/flightoperation/left.png" alt="" /> <img
src="@/assets/images/flightoperation/left-active.png"
alt=""
v-if="selectName == '左旋转'"
/>
<img src="@/assets/images/flightoperation/left.png" alt="" v-else />
</div> </div>
</div> </div>
<div class="info-item"> <div class="info-item">
<!-- <img src="@/assets/images/flightoperation/flight_control.png" alt="" /> --> <!-- <img src="@/assets/images/flightoperation/flight_control.png" alt="" /> -->
<div class="info-item-top" title="前进" @click="changeDRC('pitch', 'up')"> <div class="info-item-top" title="前进" @click="changeDRC('pitch', 'up', '前进')">
<img src="@/assets/images/flightoperation/top.png" alt="" /> <img
src="@/assets/images/flightoperation/top-active.png"
alt=""
v-if="selectName == '前进'"
/>
<img src="@/assets/images/flightoperation/top.png" alt="" v-else />
</div> </div>
<div class="info-item-right" title="右移" @click="changeDRC('roll', 'up')"> <div class="info-item-right" title="右移" @click="changeDRC('roll', 'up', '右移')">
<img src="@/assets/images/flightoperation/right.png" alt="" /> <img
src="@/assets/images/flightoperation/right-active.png"
alt=""
v-if="selectName == '右移'"
/>
<img src="@/assets/images/flightoperation/right.png" alt="" v-else />
</div> </div>
<div class="info-item-bottom" title="后退" @click="changeDRC('pitch', 'down')"> <div class="info-item-bottom" title="后退" @click="changeDRC('pitch', 'down', '后退')">
<img src="@/assets/images/flightoperation/bottom.png" alt="" /> <img
src="@/assets/images/flightoperation/bottom-active.png"
alt=""
v-if="selectName == '后退'"
/>
<img src="@/assets/images/flightoperation/bottom.png" alt="" v-else />
</div> </div>
<div class="info-item-left" title="左移" @click="changeDRC('roll', 'down')"> <div class="info-item-left" title="左移" @click="changeDRC('roll', 'down', '左移')">
<img src="@/assets/images/flightoperation/left.png" alt="" /> <img
src="@/assets/images/flightoperation/left-active.png"
alt=""
v-if="selectName == '左移'"
/>
<img src="@/assets/images/flightoperation/left.png" alt="" v-else />
</div> </div>
</div> </div>
</div> </div>
@ -129,6 +173,7 @@
const airportVal: any = ref({ const airportVal: any = ref({
mode_code: 0, mode_code: 0,
}); });
const selectName = ref('');
const bid = buildGUID(); const bid = buildGUID();
//redis //redis
const changeRedisUser = (val: boolean) => { const changeRedisUser = (val: boolean) => {
@ -153,7 +198,7 @@
// //
const takeOff = () => { const takeOff = () => {
if (isLocked.value) { if (isLocked.value) {
createMessage.success('当前有用户正在操作,请稍后再试'); createMessage.warning('当前有用户正在操作,请稍后再试');
return; return;
} }
@ -166,7 +211,7 @@
// createConnection(); // createConnection();
// } // }
if (isLocked.value) { if (isLocked.value) {
createMessage.success('当前有用户正在操作,请稍后再试'); createMessage.warning('当前有用户正在操作,请稍后再试');
return; return;
} }
if (flightGrab.value) { if (flightGrab.value) {
@ -212,11 +257,16 @@
}); });
}; };
const seq = ref(1); const seq = ref(1);
const changeDRC = (type, value) => { const changeDRC = (type, value, name) => {
selectName.value = name;
setTimeout(() => {
selectName.value = '';
}, 2000);
if (!modeEnter.value) { if (!modeEnter.value) {
createMessage.warning('请先进入指令飞行控制'); createMessage.warning('请先进入指令飞行控制');
return; return;
} }
createMessage.info(name + '指令已发送');
seq.value = seq.value + 1; seq.value = seq.value + 1;
let data = { let data = {
roll: 1024, roll: 1024,
@ -449,8 +499,6 @@
width: 36px; width: 36px;
} }
.info-item-top { .info-item-top {
width: 40px;
height: 40px;
position: absolute; position: absolute;
top: 8px; top: 8px;
left: 20px; left: 20px;
@ -460,16 +508,12 @@
} }
} }
.info-item-right { .info-item-right {
width: 40px;
height: 40px;
position: absolute; position: absolute;
top: 30px; top: 30px;
right: 33px; right: 36px;
cursor: pointer; cursor: pointer;
} }
.info-item-bottom { .info-item-bottom {
width: 40px;
height: 40px;
position: absolute; position: absolute;
bottom: 0px; bottom: 0px;
left: 21px; left: 21px;
@ -479,11 +523,9 @@
} }
} }
.info-item-left { .info-item-left {
width: 40px;
height: 40px;
position: absolute; position: absolute;
top: 30px; top: 30px;
left: 0px; left: -2px;
cursor: pointer; cursor: pointer;
} }
} }

@ -7,6 +7,7 @@
:isActive="true" :isActive="true"
:parentLimitation="true" :parentLimitation="true"
:isResizable="false" :isResizable="false"
@clicked="activateEv"
> >
<div class="takeoff-information"> <div class="takeoff-information">
<div class="title" <div class="title"
@ -84,6 +85,9 @@
}, },
], ],
}); });
const activateEv = (e) => {
e.target.focus();
};
const takeOff = () => { const takeOff = () => {
if ( if (
data.points[0].latitude == null || data.points[0].latitude == null ||

@ -243,7 +243,7 @@
// createConnection(); // createConnection();
// } // }
if (isLocked.value) { if (isLocked.value) {
createMessage.success('当前有用户正在操作,请稍后再试'); createMessage.warning('当前有用户正在操作,请稍后再试');
return; return;
} }
if (grabBtn.value) { if (grabBtn.value) {

@ -7,6 +7,7 @@
:isActive="true" :isActive="true"
:parentLimitation="true" :parentLimitation="true"
:isResizable="false" :isResizable="false"
@clicked="activateEv"
> >
<div class="takeoff-information"> <div class="takeoff-information">
<div class="title" <div class="title"
@ -31,8 +32,11 @@
</div> </div>
<div class="content-edit"> <div class="content-edit">
目标点高度 目标点高度
<div> <div style="display: flex; flex-direction: column; align-items: center">
<a-input v-model:value="data.target_height" /> <a-input v-model:value="data.target_height" />
<span style="margin-top: 4px; font-size: 12px; color: #f2762d"
>右击目标点选择按轴平移拖动Z轴</span
>
</div> </div>
</div> </div>
<div class="content-edit"> <div class="content-edit">
@ -201,6 +205,9 @@
} }
}, },
); );
const activateEv = (e) => {
e.target.focus();
};
const takeOff = () => { const takeOff = () => {
if ( if (
data.target_latitude == null || data.target_latitude == null ||

Loading…
Cancel
Save