导入航线

main
徐景良 3 months ago
parent e017557425
commit 53dc1d3d40

@ -77,7 +77,9 @@
<PlusOutlined @click="createAirLine" /> <PlusOutlined @click="createAirLine" />
</div> </div>
</div> </div>
<div class="ari-line" v-for="(item,index) in ariLineList" :key="index" > <div class="ari-line" v-for="(item,index) in ariLineList" :key="index"
@click="checkAriLine(item)"
>
<div class="title"> <div class="title">
<div style="flex:1;"> <div style="flex:1;">
{{item.airLineName}} {{item.airLineName}}
@ -115,6 +117,31 @@
导入航线 导入航线
</div> </div>
<div class="import-airline-box"> <div class="import-airline-box">
<a-form
ref="formRef"
:layout="'vertical'"
:model="submitForm"
:label-col="labelCol"
:wrapper-col="wrapperCol"
:size="'middle'"
>
<a-form-item ref="name" label="计划名称" name="taskName">
<a-input v-model:value="submitForm.airLineName" placeholder="请输入航线名称" />
</a-form-item>
<a-form-item ref="outOfContact" label="航线类型" name="lossOfControlAction">
<div class="radio-box">
<div v-for="(item,index) in templateTypeOptions" :key="index"
:class=" submitForm.airLineType == item.value ? 'radio-item-active':'radio-item'"
@click="submitForm.airLineType = item.value"
>
{{item.label}}
</div>
</div>
</a-form-item>
</a-form>
<a-upload-dragger <a-upload-dragger
v-model:fileList="fileList" v-model:fileList="fileList"
name="xmlFile" name="xmlFile"
@ -124,7 +151,7 @@
> >
<p class="ant-upload-drag-icon"> <p class="ant-upload-drag-icon">
<InboxOutlined /> <InboxOutlined style="color:#3A57E8;" />
</p> </p>
<p class="ant-upload-text">单击或拖动文件到此区域进行上传</p> <p class="ant-upload-text">单击或拖动文件到此区域进行上传</p>
<p class="ant-upload-hint"> <p class="ant-upload-hint">
@ -132,12 +159,13 @@
</p> </p>
</a-upload-dragger> </a-upload-dragger>
</div> </div>
<div class="import-airline-footer"> <div class="import-airline-footer">
<div> <div>
<a-button type="default" @click="importAirLineShow = false">取消</a-button> <a-button type="default" @click="importAirLineShow = false">取消</a-button>
</div> </div>
<div> <div>
<a-button type="primary" @click="handleManualUpload"></a-button> <a-button type="primary" @click="handleManualUpload"></a-button>
</div> </div>
</div> </div>
</div> </div>
@ -147,10 +175,11 @@
import { ExclamationCircleOutlined,PlusOutlined,FileAddOutlined,LeftOutlined,ImportOutlined,MoreOutlined,EditOutlined,InboxOutlined } from '@ant-design/icons-vue'; import { ExclamationCircleOutlined,PlusOutlined,FileAddOutlined,LeftOutlined,ImportOutlined,MoreOutlined,EditOutlined,InboxOutlined } from '@ant-design/icons-vue';
import {ref,defineEmits,createVNode} from 'vue' import {ref,defineEmits,createVNode} from 'vue'
import { getAirLineList,uploadXmlFile,deleteAirLine } from '@/api/sys/workplan'; import { getAirLineList,uploadXmlFile,deleteAirLine,addAirLine} from '@/api/sys/workplan';
import { Modal, message } from 'ant-design-vue'; import { Modal, message } from 'ant-design-vue';
const emit = defineEmits(["checkAriLine","createAirLine"]) const emit = defineEmits(["checkAriLine","createAirLine"])
import {templateTypeOptions} from '../waylineConfig/index'
// //
const importAirLineShow = ref(false); const importAirLineShow = ref(false);
@ -170,6 +199,28 @@
} }
} }
const labelCol = { span: 24 };
const wrapperCol = { span: 24 };
const submitForm = ref({
"id": "",
"airLineName": "测试航线01", // 线
"airLineType": "waypoint", // 线 templateType waypointmapping2dmappingStrip
"uavId": "",
"flyToFirstPointMode": "", // :flyToWaylineMode safelypointToPoint
"safeTakeoffAltitude": 0, // takeOffSecurityHeight
"safeTakeoffSpeed": 0, //
"globalRouteSpeed": 0, // 线 autoFlightSpeed
"taskCompletionAction": "", // finishAction goHomeautoLandgotoFirstWaypoint
"outOfControlOption": "", // exitOnRCLost goContinueexecuteLostAction
"typeOfOutOfControlAction": "", // executeRCLostAction goBacklandinghover
"globalWayPointType": "", // globalWaypointTurnMode toPointAndStopWithDiscontinuityCurvature
"ptzControlMode": "", //
"aircraftYawAngleMode": "", //
"wpml": "" // 线
})
const handleManualUpload = async () => { const handleManualUpload = async () => {
if (fileList.value.length<1) return; if (fileList.value.length<1) return;
@ -180,12 +231,22 @@
let res = await uploadXmlFile(formData); let res = await uploadXmlFile(formData);
if(res){ if(res){
submitForm.value.wpml = res.path;
let addAirLineRes =await addAirLine(submitForm.value);
if(addAirLineRes){
fileList.value = []; fileList.value = [];
importAirLineShow.value = false; importAirLineShow.value = false;
message.success("操作成功!"); message.success("操作成功!");
}else{ }else{
message.error("操作失败!"); message.error("操作失败!");
} }
}else{
message.error("操作失败!");
}
} }
const showSearchInput = ref(false); const showSearchInput = ref(false);
@ -268,6 +329,10 @@
} }
</script> </script>
<style scoped> <style scoped>
.container{ .container{
@ -408,12 +473,41 @@
position: absolute; position: absolute;
bottom:0px; bottom:0px;
left:0px; left:0px;
padding:20px; padding:12px 20px;
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
gap:15px; gap:15px;
background: #282828; background: #282828;
} }
.radio-box{
width:100%;
display: flex;
overflow: hidden;
border:0.5px solid #3B4154 ;
font-size:13px;
}
.radio-box .radio-item{
flex:1;
color:#8A92A6 ;
text-align: center;
background:#222738 ;
padding:5px;
cursor:pointer;
}
.radio-box .radio-item-active{
flex:1;
color:#fff;
text-align: center;
background:#3A57E8 ;
padding:5px;
cursor:pointer;
}
::v-deep .ant-select-selector{ ::v-deep .ant-select-selector{
border:none!important; border:none!important;
color:#fff!important; color:#fff!important;
@ -478,13 +572,18 @@
} }
::v-deep .ant-upload-text{ ::v-deep .ant-upload-text{
color:#fff!important; color:rgba(255, 255, 255, 0.533)!important;
font-size:14px!important;
} }
::v-deep .ant-upload-hint{ ::v-deep .ant-upload-hint{
color:#fff!important; color:rgba(255, 255, 255, 0.533)!important;
font-size:14px!important;
} }
::v-deep .ant-upload-drag-icon{
color:#3A57E8!important;
}
::v-deep .ant-upload-wrapper .ant-upload-list{ ::v-deep .ant-upload-wrapper .ant-upload-list{
color:#fff; color:#fff;
} }
@ -492,4 +591,110 @@
::v-deep .ant-upload-list-item-actions .anticon{ ::v-deep .ant-upload-list-item-actions .anticon{
color:#fff; color:#fff;
} }
::v-deep .ant-form-item-label > label{
color:#ffffff!important;
font-size:12px;
}
::v-deep .ant-select-selector{
border:none!important;
color:#fff!important;
background:#3F4150!important ;
border-radius: 3px!important;
}
::v-deep .ant-select-selection-placeholder {
color:rgba(255, 255, 255, 0.533)!important;
}
::v-deep .ant-select-arrow {
color:rgba(255, 255, 255, 0.533)!important;
}
::v-deep .ant-select-selection-search-input::placeholder{
color:rgba(255, 255, 255, 0.933)!important;
}
::v-deep .ant-tree {
background:none!important;
color:#fff!important;
}
::v-deep .ant-tree-treenode-selected{
background:#3a57e877!important;
}
::v-deep .ant-tree-treenode-selected::before{
background:none!important;
}
::v-deep .ant-tree-treenode-selected::after{
content:"";
height:28px;
width:4px;
background:#3A57E8;
position:absolute;
top:0px;
left:0px;
}
::v-deep .ant-btn-default{
background:none!important;
border:none!important;
outline:none!important;
color:#fff!important;
height:30px !important;
background:#29305477!important;
}
::v-deep .ant-btn-primary{
background:#3A57E8!important;
border-radius:3px!important;
}
::v-deep .ant-radio-button-wrapper-checked{
background:#3A57E8!important;
}
::v-deep .ant-radio-button-wrapper{
border-radius: 2px !important;
}
::v-deep .ant-switch{
background:#ccc!important;
}
::v-deep .ant-switch-checked{
background:#3A57E8!important;
}
::v-deep .ant-input{
background:#222738!important ;
border:none!important;
border-top-left-radius: 3px !important;
border-bottom-left-radius: 3px !important;
color:#fff!important;
}
::v-deep .ant-input::placeholder{
color:rgba(255, 255, 255, 0.533)!important;
}
::v-deep .ant-upload-drag{
border-radius:0px!important;
border:1px dashed #3B4154!important;
}
::v-deep .anticon-delete{
color:#fff!important;
}
</style> </style>

@ -3,6 +3,7 @@
<div class="title"> <div class="title">
新建计划 新建计划
</div> </div>
<div class="body-container">
<a-form <a-form
ref="formRef" ref="formRef"
:layout="'vertical'" :layout="'vertical'"
@ -12,103 +13,176 @@
:wrapper-col="wrapperCol" :wrapper-col="wrapperCol"
:size="'middle'" :size="'middle'"
> >
<a-form-item ref="name" label="计划名称" name="name"> <a-form-item ref="name" label="计划名称" name="taskName">
<a-input v-model:value="submitForm.name" /> <a-input v-model:value="submitForm.taskName" placeholder="请输入计划名称" />
</a-form-item> </a-form-item>
<a-form-item ref="name" label="任务类型" name="name"> <a-form-item ref="name" label="任务类型" name="taskType">
<a-radio-group v-model:value="submitForm.type" button-style="solid">
<a-radio-button :value="1">普通任务</a-radio-button> <div class="radio-box">
<a-radio-button :value="2">蛙跳任务</a-radio-button> <div v-for="(item,index) in taskTypeOptions" :key="index"
</a-radio-group> :class=" submitForm.taskType == item.value ? 'radio-item-active':'radio-item'"
@click="submitForm.taskType = item.value"
>
{{item.label}}
</div>
</div>
</a-form-item> </a-form-item>
<a-form-item ref="name" label="选择航线" name="name"> <a-form-item ref="name" label="选择航线" name="name">
<a-button type="primary" style="width:100%;" @click="selectAriLine"> <a-button type="primary" style="width:100%;" @click="selectAriLine" v-show="!submitForm.taskAirLine">
<PlusOutlined /> <PlusOutlined />
选择航线 选择航线
</a-button> </a-button>
<div class="select-item" v-show="submitForm.taskAirLine">
<div class="item-name">{{props.checkedAriLine.airLineName}}</div>
<div class="item-operate">
<DeleteOutlined @click="submitForm.taskAirLine = null"/>
</div>
</div>
</a-form-item> </a-form-item>
<a-form-item ref="name" label="选择设备" name="name"> <a-form-item ref="name" label="选择设备" name="name">
<a-button type="primary" style="width:100%;" @click="selectAircraft"> <a-button type="primary" style="width:100%;" @click="selectAircraft" v-show="!submitForm.taskDronePort">
<PlusOutlined /> <PlusOutlined />
选择设备 选择设备
</a-button> </a-button>
</a-form-item>
<div class="select-item" v-show="submitForm.taskDronePort">
<div class="item-name">{{props.checkedDronePort.name}}</div>
<div class="item-operate">
<DeleteOutlined @click="submitForm.taskDronePort = null" />
</div>
</div>
</a-form-item>
<!--
<a-form-item ref="accuracy" label="任务精度" name="accuracy"> <a-form-item ref="accuracy" label="任务精度" name="accuracy">
<a-radio-group v-model:value="submitForm.accuracy" button-style="solid"> <a-radio-group v-model:value="submitForm.accuracy" button-style="solid">
<a-radio-button :value="1">高精度RTK</a-radio-button> <a-radio-button :value="1">高精度RTK</a-radio-button>
<a-radio-button :value="2">GNSS</a-radio-button> <a-radio-button :value="2">GNSS</a-radio-button>
</a-radio-group> </a-radio-group>
</a-form-item> </a-form-item> -->
<a-form-item ref="accuracy" label="任务策略" name="accuracy"> <!-- <a-form-item ref="accuracy" label="任务策略" name="accuracy">
<a-radio-group v-model:value="submitForm.strategy" button-style="solid"> <a-radio-group v-model:value="submitForm.periodicFormula" button-style="solid">
<a-radio-button :value="1">立即</a-radio-button> <a-radio-button :value="1">立即</a-radio-button>
<a-radio-button :value="2">单次定时</a-radio-button> <a-radio-button :value="2">单次定时</a-radio-button>
<a-radio-button :value="3">重复定时</a-radio-button> <a-radio-button :value="3">重复定时</a-radio-button>
<a-radio-button :value="4">继续执行</a-radio-button> <a-radio-button :value="4">继续执行</a-radio-button>
</a-radio-group> </a-radio-group>
</a-form-item> </a-form-item> -->
<div style="display:flex;margin-bottom:12px;color:#fff;font-size:12px;"> <div style="display:flex;color:#fff;font-size:12px;padding:20px 0px;">
<div style="flex:1;">智能最佳返航路线</div> <div style="flex:1;">智能最佳返航路线</div>
<div> <div>
<a-switch v-model:checked="submitForm.breakFly" /> <a-switch v-model:checked="submitForm.aiInspection"
checked-color="#3A57E8"
un-checked-color="#cccccc"
/>
</div>
</div>
<a-form-item ref="outOfContact" label="返航高度(相对机场返航高度)" name="outOfContact">
<div class="return-height">
<div @click="submitForm.returnAltitude-=100">-100</div>
<div @click="submitForm.returnAltitude-=10">-10</div>
<div @click="submitForm.returnAltitude-=1">-1</div>
<div>
<a-input type="text" size="small" v-model:value="submitForm.returnAltitude" style="width:40px;"></a-input>
</div>
<div>m</div>
<div @click="submitForm.returnAltitude+=1">+1</div>
<div @click="submitForm.returnAltitude+=10">+10</div>
<div @click="submitForm.returnAltitude+=100">+100</div>
</div>
</a-form-item>
<a-form-item ref="outOfContact" label="航线飞行中失控" name="lossOfControlAction">
<div class="radio-box">
<div v-for="(item,index) in lossOfControlActionOptions" :key="index"
:class=" submitForm.lossOfControlAction == item.value ? 'radio-item-active':'radio-item'"
@click="submitForm.lossOfControlAction = item.value"
>
{{item.label}}
</div> </div>
</div> </div>
<a-form-item ref="outOfContact" label="航线飞行中失联" name="outOfContact">
<a-radio-group v-model:value="submitForm.outOfContact" button-style="solid">
<a-radio-button :value="1">返航</a-radio-button>
<a-radio-button :value="2">继续执行</a-radio-button>
</a-radio-group>
</a-form-item> </a-form-item>
<a-form-item ref="outOfContact" label="完成动作" name="outOfContact"> <a-form-item ref="outOfContact" label="完成动作" name="outOfContact">
<a-radio-group v-model:value="submitForm.outOfContact" button-style="solid"> <div class="radio-box">
<a-radio-button :value="1">返航</a-radio-button> <div v-for="(item,index) in continuationModeOptions" :key="index"
<a-radio-button :value="2">继续执行</a-radio-button> :class=" submitForm.continuationMode == item.value ? 'radio-item-active':'radio-item'"
</a-radio-group> @click="submitForm.continuationMode = item.value"
>
{{item.label}}
</div>
</div>
</a-form-item> </a-form-item>
<div style="display:flex;margin-bottom:12px;color:#fff;font-size:12px;"> <div style="display:flex;color:#fff;font-size:12px;padding:20px 0px;color:#fff;">
<div style="flex:1;">自动断点续飞</div> <div style="flex:1;">自动断点续飞</div>
<div> <div>
<a-switch v-model:checked="submitForm.breakFly" /> <a-switch v-model:checked="submitForm.breakFly" />
</div> </div>
</div> </div>
<a-form-item :wrapper-col="{ span: 24, offset: 0 }"> <a-form-item :wrapper-col="{ span: 24, offset: 0 }">
<a-button @click="resetForm" style="width:44%;">取消</a-button> <a-button @click="resetForm" style="width:44%;">取消</a-button>
<a-button style="margin-left: 10px;width:44%;" type="primary" @click="onSubmit"></a-button> <a-button style="margin-left: 10px;width:48%;" type="primary" @click="onSubmit"></a-button>
</a-form-item> </a-form-item>
</a-form> </a-form>
</div> </div>
</div>
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, defineEmits } from "vue"; import { ref, defineEmits, defineProps, watch } from "vue";
import { PlusOutlined,LeftOutlined } from '@ant-design/icons-vue'; import { PlusOutlined,LeftOutlined,DeleteOutlined } from '@ant-design/icons-vue';
import { addTask } from "@/api/sys/workplan";
import { Modal, message } from 'ant-design-vue';
const formRef = ref(); const formRef = ref();
const labelCol = { span: 24 }; const labelCol = { span: 24 };
const wrapperCol = { span: 24 }; const wrapperCol = { span: 24 };
const props = defineProps(["checkedAriLine","checkedDronePort"]);
const submitForm = ref({ const submitForm = ref({
name:"工作计划1", taskName:null, //
type:1, taskType:0, //
airline:1, taskDronePort:null, // s
device:1, taskAirLine:null, // 线id
accuracy:1, returnAltitude:0, //
strategy:1, lossOfControlAction:"executeLostAction", //
outOfContact:1, continuationMode:"goBack", //
completeAction:1, aiInspection:null, // AI
breakFly:1, periodicFormula:null, //
airLineId:1, // 线id
}) })
const emit = defineEmits(['selectAriLine','cancleCraete',"selectAircraft"]); watch(
()=>props.checkedAriLine,
(newVal,oldVal)=>{
submitForm.value.taskAirLine = newVal.airLineName;
submitForm.value.airLineId = newVal.id;
}
)
watch(
()=>props.checkedDronePort,
(newVal,oldVal)=>{
submitForm.value.taskDronePort = newVal.id;
}
)
const emit = defineEmits(['selectAriLine','cancleCraete',"selectAircraft","successCreatePlan"]);
const removeAirLine = ()=>{
props.checkedAriLine.value = {};
}
const selectAriLine = ()=> { const selectAriLine = ()=> {
emit("selectAriLine",true) emit("selectAriLine",true)
@ -118,37 +192,175 @@ const selectAircraft = ()=>{
emit("selectAircraft",true) emit("selectAircraft",true)
} }
//
const taskTypeOptions = ref([
{
value:0,
label:"普通任务"
},{
value:1,
label:"蛙跳任务"
}
])
//
const lossOfControlActionOptions = ref([
{
value:'goContinue',
label:"继续执行航线"
},{
value:'executeLostAction',
label:"执行失控动作"
}
])
//
const continuationModeOptions = ref([
{
value:"goBack",
label:"返航"
},{
value:"landing",
label:"降落"
},{
value:"hover",
label:"悬停"
}
])
//
const periodicFormulaOptions = ref([
{
value:"goBack",
label:"立即"
},{
value:"landing",
label:"单次定时"
},{
value:"hover",
label:"重复定时"
},{
value:"hover",
label:"继续执行"
}
])
const rules = { const rules = {
}; };
const onSubmit = () => { const onSubmit =async () => {
formRef.value
.validate()
.then(() => {
}) console.log("submitForm",submitForm.value)
.catch(error => {
let res = await addTask(submitForm.value);
if(res){
message.success("操作成功!");
emit("successCreatePlan");
}else{
message.error("操作失败!");
}
return null;
formRef.value.validate().then(() => {
}).catch(error => {
console.log('error', error); console.log('error', error);
}); });
}; };
const resetForm = () => { const resetForm = () => {
emit("cancleCraete"); emit("cancleCraete");
formRef.value.resetFields(); formRef.value.resetFields();
}; };
</script> </script>
<style scoped> <style scoped>
.container{ .container{
width:100%;
height:100%;
padding:10px 20px; padding:10px 20px;
} }
.title{ .title{
padding:15px 0px; padding:15px 0px;
color:#fff; color:#fff;
} }
.body-container{
width:100%;
height: calc( 100% - 60px);
overflow-y: auto;
}
.ant-form-item{ .ant-form-item{
margin-bottom:12px; margin-bottom:12px;
} }
.select-item{
width:100%;
display: flex;
color:#fff;
border:1px solid rgba(204, 204, 204, 0.787);
padding:0px;
}
.select-item .item-name{
flex:1;
border-right:1px solid rgba(204, 204, 204, 0.787);
padding:4px;
}
.select-item .item-operate{
width:40px;
text-align: center;
padding:4px;
cursor: pointer;
}
.radio-box{
width:100%;
display: flex;
overflow: hidden;
border:0.5px solid #3B4154 ;
font-size:13px;
}
.radio-box .radio-item{
flex:1;
color:#8A92A6 ;
text-align: center;
background:#222738 ;
padding:5px;
cursor:pointer;
}
.radio-box .radio-item-active{
flex:1;
color:#fff;
text-align: center;
background:#3A57E8 ;
padding:5px;
cursor:pointer;
}
.return-height{
display:flex;
gap:5px;
}
.return-height div{
flex:1;
color: #fff ;
background:#333B56;
font-size:12px;
padding:3px;
text-align: center;
cursor:pointer;
}
::v-deep .ant-form-item-label > label{ ::v-deep .ant-form-item-label > label{
color:#ffffff!important; color:#ffffff!important;
font-size:12px; font-size:12px;
@ -197,16 +409,7 @@ const onSubmit = () => {
left:0px; left:0px;
} }
::v-deep .ant-input{
background:#3B4154!important;
border:none!important;
border-radius: 3px !important;
color:#fff!important;
}
::v-deep .ant-input::placeholder{
color:rgba(255, 255, 255, 0.533)!important;
}
::v-deep .ant-btn-default{ ::v-deep .ant-btn-default{
@ -230,4 +433,25 @@ const onSubmit = () => {
::v-deep .ant-radio-button-wrapper{ ::v-deep .ant-radio-button-wrapper{
border-radius: 2px !important; border-radius: 2px !important;
} }
::v-deep .ant-switch{
background:#ccc!important;
}
::v-deep .ant-switch-checked{
background:#3A57E8!important;
}
::v-deep .ant-input{
background:#222738!important ;
border:none!important;
border-top-left-radius: 3px !important;
border-bottom-left-radius: 3px !important;
color:#fff!important;
}
::v-deep .ant-input::placeholder{
color:rgba(255, 255, 255, 0.533)!important;
}
</style> </style>

@ -11,7 +11,7 @@
<!-- 创建计划弹窗 --> <!-- 创建计划弹窗 -->
<div v-if="workPlanFormShow" style="width:380px;background:#0d0e15ce ;position:absolute;top:30px;left:30px;z-index:1;height: calc( 100vh - 164px);overflow-y:hidden;"> <div v-if="workPlanFormShow" style="width:380px;background:#0d0e15ce ;position:absolute;top:30px;left:30px;z-index:1;height: calc( 100vh - 164px);overflow-y:hidden;">
<createWorkPlan @cancleCraete="cancleCraete" @selectAircraft="selectAircraft" @selectAriLine="selectAriLine"></createWorkPlan> <createWorkPlan @successCreatePlan="successCreatePlan" @cancleCraete="cancleCraete" @selectAircraft="selectAircraft" @selectAriLine="selectAriLine" :checkedAriLine="checkedAriLine" :checkedDronePort="checkedDronePort"></createWorkPlan>
</div> </div>
<!-- 航线库 --> <!-- 航线库 -->
@ -21,7 +21,7 @@
<!-- 飞行器 --> <!-- 飞行器 -->
<div v-if="aircraftShow" style="width:340px;background:#0d0e15c1 ;position:absolute;top:30px;left:440px;z-index:1;height: calc( 100vh - 164px);overflow-y:hidden;"> <div v-if="aircraftShow" style="width:340px;background:#0d0e15c1 ;position:absolute;top:30px;left:440px;z-index:1;height: calc( 100vh - 164px);overflow-y:hidden;">
<aircraft @checkAriLine="checkAriLine" ></aircraft> <aircraft @checkAriLine="checkDronePort" ></aircraft>
</div> </div>
<!-- 新建航线 --> <!-- 新建航线 -->
@ -65,10 +65,23 @@ const cancleCraete = ()=>{
aircraftShow.value = false; aircraftShow.value = false;
planListShow.value = true; planListShow.value = true;
} }
const checkedAriLine = ref({});
const checkAriLine = (item)=>{ const checkAriLine = (item)=>{
if(item){ if(item){
ariLineShow.value = false; ariLineShow.value = false;
checkedAriLine.value = item;
}
}
const checkedDronePort = ref({});
const checkDronePort = (item)=>{
if(item){
aircraftShow.value = false;
checkedDronePort.value = item;
console.log("checkedDronePort",checkedDronePort.value);
} }
} }
@ -95,4 +108,12 @@ const handlerCreateAirRoute = (info)=>{
createAirLineShow.value = false; createAirLineShow.value = false;
airRoute.value = info airRoute.value = info
} }
const successCreatePlan = ()=>{
workPlanFormShow.value = false;
ariLineShow.value = false;
aircraftShow.value = false;
planListShow.value = true;
}
</script> </script>

@ -0,0 +1,55 @@
export const templateTypeOptions = [
{
label:"航点航线",
value:"waypoint"
},{
label:"面状航线",
value:"mapping2d"
}
]
export const flyToWaylineModeOptions = [
{
label:"安全模式",
value:"safely"
},{
label:"倾斜飞行模式",
value:"pointToPoint"
}
]
export const finishActionOptions = [
{
label:"返航",
value:"goHome"
},{
label:"原地降落",
value:"autoLand"
},{
label:"返回起始点",
value:"gotoFirstWaypoint"
}
]
export const exitOnRCLostOptions = [
{
label:"继续执行航线",
value:"goContinue"
},{
label:"执行失控动作",
value:"executeLostAction"
}
]
export const executeRCLostActionOptions = [
{
label:"返航",
value:"goBack"
},{
label:"降落",
value:"landing"
},{
label:"悬停",
value:"hover"
}
]
Loading…
Cancel
Save