Compare commits
2 Commits
c67cf2e38b
...
28a3e543f9
| Author | SHA1 | Date |
|---|---|---|
|
|
28a3e543f9 | |
|
|
5de64605a9 |
|
|
@ -340,6 +340,14 @@
|
|||
createMessage.error('DRC连接失败,状态码' + rs.data.result);
|
||||
}
|
||||
}
|
||||
// 指点飞行
|
||||
if (rs.method == 'fly_to_point') {
|
||||
if (rs.data.result == 0) {
|
||||
createMessage.success('指点飞行成功');
|
||||
} else {
|
||||
createMessage.error('指点飞行失败,状态码' + rs.data.result);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
onUnmounted(() => {
|
||||
|
|
|
|||
|
|
@ -10,20 +10,20 @@
|
|||
<div class="content-edit">
|
||||
目标点纬度
|
||||
<div style="display: flex; flex-direction: column; align-items: center">
|
||||
<a-input v-model:value="data.points.latitude" readonly />
|
||||
<a-input v-model:value="data.points[0].latitude" readonly />
|
||||
<span style="margin-top: 4px; font-size: 12px; color: #f2762d">地图右键选择目标点</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-edit">
|
||||
目标点经度
|
||||
<div>
|
||||
<a-input v-model:value="data.points.longitude" readonly />
|
||||
<a-input v-model:value="data.points[0].longitude" readonly />
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-edit">
|
||||
目标点高度
|
||||
<div>
|
||||
<a-input v-model:value="data.points.height" />
|
||||
<a-input v-model:value="data.points[0].height" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-button">
|
||||
|
|
@ -57,13 +57,15 @@
|
|||
});
|
||||
|
||||
const data = reactive({
|
||||
flight_id: buildGUID(),
|
||||
fly_to_id: buildGUID(),
|
||||
max_speed: 10,
|
||||
points: {
|
||||
latitude: 35.134615,
|
||||
longitude: 118.296676,
|
||||
height: 115,
|
||||
},
|
||||
points: [
|
||||
{
|
||||
latitude: 35.134615,
|
||||
longitude: 118.296676,
|
||||
height: 115,
|
||||
},
|
||||
],
|
||||
});
|
||||
const takeOff = () => {
|
||||
const querys = {
|
||||
|
|
@ -87,8 +89,8 @@
|
|||
onMounted(() => {
|
||||
// 定位到某个经纬度
|
||||
EventBus.on('obtainTheLocation', (val: any) => {
|
||||
data.points.latitude = val.lat;
|
||||
data.points.longitude = val.lng;
|
||||
data.points[0].latitude = val.lat;
|
||||
data.points[0].longitude = val.lng;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -22,8 +22,12 @@
|
|||
<div class="content-button">
|
||||
<a-button @click="obtain">获取相机控制权</a-button>
|
||||
<a-button @click="singleShot">单拍</a-button>
|
||||
<a-button @click="enterDRC">进入飞行控制</a-button>
|
||||
<a-button @click="exitDRC">退出飞行控制</a-button>
|
||||
<a-button @click="enterDRC" style="background-color: #24d365; border: none"
|
||||
>进入飞行控制</a-button
|
||||
>
|
||||
<a-button @click="exitDRC" style="background-color: #e3150e; border: none"
|
||||
>退出飞行控制</a-button
|
||||
>
|
||||
</div>
|
||||
<div class="direction-controller">
|
||||
<img src="@/assets/images/flightoperation/direction_controller.png" alt="" />
|
||||
|
|
|
|||
Loading…
Reference in New Issue