diff --git a/src/views/demo/workmanagement/workplan/components/airLineList.vue b/src/views/demo/workmanagement/workplan/components/airLineList.vue index fd88e6a..38c37eb 100644 --- a/src/views/demo/workmanagement/workplan/components/airLineList.vue +++ b/src/views/demo/workmanagement/workplan/components/airLineList.vue @@ -77,7 +77,9 @@ -
+
{{item.airLineName}} @@ -115,6 +117,31 @@ 导入航线
+ + + + + + +
+
+ {{item.label}} +
+
+ +
+
+

- +

单击或拖动文件到此区域进行上传

@@ -132,12 +159,13 @@

+
@@ -147,10 +175,11 @@ import { ExclamationCircleOutlined,PlusOutlined,FileAddOutlined,LeftOutlined,ImportOutlined,MoreOutlined,EditOutlined,InboxOutlined } from '@ant-design/icons-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'; const emit = defineEmits(["checkAriLine","createAirLine"]) + import {templateTypeOptions} from '../waylineConfig/index' // 上传文件 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 【waypoint、mapping2d、mappingStrip】 + "uavId": "", + "flyToFirstPointMode": "", // 飞向首航点模式:flyToWaylineMode 【safely、pointToPoint】 + "safeTakeoffAltitude": 0, // 安全起飞高度 : takeOffSecurityHeight + "safeTakeoffSpeed": 0, // 飞行到首航点速度 + "globalRouteSpeed": 0, // 全局航线速度 autoFlightSpeed + "taskCompletionAction": "", // 任务完成动作 finishAction 【goHome、autoLand、gotoFirstWaypoint】 + "outOfControlOption": "", // 失控选项 exitOnRCLost 【goContinue、executeLostAction】 + "typeOfOutOfControlAction": "", // 失控动作类型 executeRCLostAction 【goBack、landing、hover】 + "globalWayPointType": "", // 全局航点类型 globalWaypointTurnMode 【toPointAndStopWithDiscontinuityCurvature】 + "ptzControlMode": "", // 云台控制模式 + "aircraftYawAngleMode": "", // 飞行器偏航角模式 + "wpml": "" // 航线文件 + }) + const handleManualUpload = async () => { if (fileList.value.length<1) return; @@ -180,9 +231,19 @@ let res = await uploadXmlFile(formData); if(res){ - fileList.value = []; - importAirLineShow.value = false; - message.success("操作成功!"); + + submitForm.value.wpml = res.path; + + let addAirLineRes =await addAirLine(submitForm.value); + + if(addAirLineRes){ + fileList.value = []; + importAirLineShow.value = false; + message.success("操作成功!"); + }else{ + message.error("操作失败!"); + } + }else{ message.error("操作失败!"); } @@ -268,6 +329,10 @@ } + + + + \ No newline at end of file diff --git a/src/views/demo/workmanagement/workplan/components/createWorkPlan.vue b/src/views/demo/workmanagement/workplan/components/createWorkPlan.vue index 675bbe1..6d9aad6 100644 --- a/src/views/demo/workmanagement/workplan/components/createWorkPlan.vue +++ b/src/views/demo/workmanagement/workplan/components/createWorkPlan.vue @@ -3,112 +3,186 @@
新建计划
- - - - - - - - 普通任务 - 蛙跳任务 - - - - - - - 选择航线 - - - - - - - - 选择设备 - - - - - - 高精度RTK - GNSS - - - - - - 立即 - 单次定时 - 重复定时 - 继续执行 - - - -
-
智能最佳返航路线
-
- -
-
- - - - 返航 - 继续执行 - - - - - - 返航 - 继续执行 - - - -
-
自动断点续飞
-
- -
-
- - - 取消 - 确定 - -
+
+ + + + + + + +
+
+ {{item.label}} +
+
+
+ + + + + 选择航线 + + +
+
{{props.checkedAriLine.airLineName}}
+
+ +
+
+
+ + + + + 选择设备 + + +
+
{{props.checkedDronePort.name}}
+
+ +
+
+ +
+ + + + +
+
智能最佳返航路线
+
+ +
+
+ + +
+
-100
+
-10
+
-1
+
+ +
+
m
+
+1
+
+10
+
+100
+
+
+ + +
+
+ {{item.label}} +
+
+ +
+ + +
+
+ {{item.label}} +
+
+
+ +
+
自动断点续飞
+
+ +
+
+ + + + 取消 + 确定 + +
+
+
+ \ No newline at end of file diff --git a/src/views/demo/workmanagement/workplan/index.vue b/src/views/demo/workmanagement/workplan/index.vue index e9aeea9..09ca163 100644 --- a/src/views/demo/workmanagement/workplan/index.vue +++ b/src/views/demo/workmanagement/workplan/index.vue @@ -11,7 +11,7 @@
- +
@@ -21,7 +21,7 @@
- +
@@ -65,10 +65,23 @@ const cancleCraete = ()=>{ aircraftShow.value = false; planListShow.value = true; } + +const checkedAriLine = ref({}); + const checkAriLine = (item)=>{ if(item){ 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; airRoute.value = info } + + +const successCreatePlan = ()=>{ + workPlanFormShow.value = false; + ariLineShow.value = false; + aircraftShow.value = false; + planListShow.value = true; +} diff --git a/src/views/demo/workmanagement/workplan/waylineConfig/index.ts b/src/views/demo/workmanagement/workplan/waylineConfig/index.ts new file mode 100644 index 0000000..2067973 --- /dev/null +++ b/src/views/demo/workmanagement/workplan/waylineConfig/index.ts @@ -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" + } +] \ No newline at end of file