Compare commits
2 Commits
334540517a
...
752c869865
| Author | SHA1 | Date |
|---|---|---|
|
|
752c869865 | |
|
|
1f759475ff |
|
|
@ -22,7 +22,13 @@ enum Api{
|
||||||
EditAirLine = '/api/Manage/EditAirLine',
|
EditAirLine = '/api/Manage/EditAirLine',
|
||||||
GetAirLine = '/api/Manage/GetAirLine',
|
GetAirLine = '/api/Manage/GetAirLine',
|
||||||
DeleteAirLine = '/api/Manage/DeleteAirLine',
|
DeleteAirLine = '/api/Manage/DeleteAirLine',
|
||||||
UploadXmlFile = '/api/Manage/UploadXmlFile/upload'
|
UploadXmlFile = '/api/Manage/UploadXmlFile/upload',
|
||||||
|
|
||||||
|
|
||||||
|
// 文件目录
|
||||||
|
ListAirLineFolder = '/api/Manage/ListAirLineFolder',
|
||||||
|
DeleteAirLineFolder = '/api/Manage/DeleteAirLineFolder',
|
||||||
|
CreateAirLineFolder = '/api/Manage/CreateAirLineFolder'
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -89,3 +95,21 @@ export function deleteAirLine(params){
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 文件目录
|
||||||
|
export function getListAirLineFolder(params) {
|
||||||
|
return defHttp.get({ url: Api.ListAirLineFolder, params });
|
||||||
|
}
|
||||||
|
|
||||||
|
export function deleteAirLineFolder(params){
|
||||||
|
return defHttp.post({ url: Api.DeleteAirLineFolder+"?folderId="+params.folderId });
|
||||||
|
}
|
||||||
|
|
||||||
|
export function createAirLineFolder(params){
|
||||||
|
return defHttp.post({ url: Api.CreateAirLineFolder, params });
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@
|
||||||
<div class="file-container">
|
<div class="file-container">
|
||||||
<div class="tip">
|
<div class="tip">
|
||||||
<div class="info">文件夹</div>
|
<div class="info">文件夹</div>
|
||||||
<div>
|
<div @click="createFolder">
|
||||||
<FileAddOutlined />
|
<FileAddOutlined />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -70,7 +70,17 @@
|
||||||
multiple
|
multiple
|
||||||
:tree-data="treeData"
|
:tree-data="treeData"
|
||||||
:defaultExpandAll="true"
|
:defaultExpandAll="true"
|
||||||
></a-directory-tree>
|
:autoExpandParent="true"
|
||||||
|
:field-names="fieldNames"
|
||||||
|
|
||||||
|
>
|
||||||
|
<template #title="{ data }">
|
||||||
|
<span @click="folderClick(data)">{{ data.path }}</span>
|
||||||
|
<span class="tree-node-actions" @click="deleteFolder(data)">
|
||||||
|
<DeleteOutlined />
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</a-directory-tree>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="routers-list">
|
<div class="routers-list">
|
||||||
|
|
@ -101,9 +111,9 @@
|
||||||
<a-menu-item @click="airLineDetail(item)" >
|
<a-menu-item @click="airLineDetail(item)" >
|
||||||
<a href="javascript:;">预览</a>
|
<a href="javascript:;">预览</a>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
<a-menu-item>
|
<!-- <a-menu-item>
|
||||||
<a href="javascript:;">编辑</a>
|
<a href="javascript:;">编辑</a>
|
||||||
</a-menu-item>
|
</a-menu-item> -->
|
||||||
<a-menu-item @click="deletePlan(item.id)">
|
<a-menu-item @click="deletePlan(item.id)">
|
||||||
<a href="javascript:;">删除</a>
|
<a href="javascript:;">删除</a>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
|
|
@ -185,13 +195,30 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- 创建目录弹窗 -->
|
||||||
|
<Modal
|
||||||
|
title="添加目录"
|
||||||
|
:open="visible"
|
||||||
|
@ok="handleGetData"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
:destroyOnClose="true"
|
||||||
|
:width="200"
|
||||||
|
|
||||||
|
>
|
||||||
|
|
||||||
|
<div style="padding:40px;">
|
||||||
|
<div> 文件名称:</div>
|
||||||
|
<a-input v-model:value="createFolderForm.folderName"></a-input>
|
||||||
|
</div>
|
||||||
|
</Modal>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ExclamationCircleOutlined,PlusOutlined,FileAddOutlined,LeftOutlined,ImportOutlined,MoreOutlined,EditOutlined,InboxOutlined } from '@ant-design/icons-vue';
|
import { DeleteOutlined,ExclamationCircleOutlined,PlusOutlined,FileAddOutlined,LeftOutlined,ImportOutlined,MoreOutlined,EditOutlined,InboxOutlined } from '@ant-design/icons-vue';
|
||||||
import {ref,defineEmits,defineProps,createVNode} from 'vue'
|
import {ref,defineEmits,defineProps,createVNode} from 'vue'
|
||||||
|
|
||||||
import { getAirLineList,uploadXmlFile,deleteAirLine,addAirLine} from '@/api/sys/workplan';
|
import { getAirLineList,uploadXmlFile,deleteAirLine,addAirLine,getListAirLineFolder,deleteAirLineFolder,createAirLineFolder} from '@/api/sys/workplan';
|
||||||
import { Modal, message } from 'ant-design-vue';
|
import { Modal, message } from 'ant-design-vue';
|
||||||
const emit = defineEmits(["checkAriLine","createAirLine","previewAirLine","closeAirLine"])
|
const emit = defineEmits(["checkAriLine","createAirLine","previewAirLine","closeAirLine"])
|
||||||
|
|
||||||
|
|
@ -209,6 +236,11 @@
|
||||||
emit("closeAirLine");
|
emit("closeAirLine");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const fieldNames = ref({
|
||||||
|
title: 'path',
|
||||||
|
key: 'id',
|
||||||
|
children: 'children'
|
||||||
|
})
|
||||||
// 上传文件
|
// 上传文件
|
||||||
const importAirLineShow = ref(false);
|
const importAirLineShow = ref(false);
|
||||||
const fileList = ref([]);
|
const fileList = ref([]);
|
||||||
|
|
@ -246,7 +278,8 @@
|
||||||
"globalWayPointType": "", // 全局航点类型 globalWaypointTurnMode 【toPointAndStopWithDiscontinuityCurvature】
|
"globalWayPointType": "", // 全局航点类型 globalWaypointTurnMode 【toPointAndStopWithDiscontinuityCurvature】
|
||||||
"ptzControlMode": "", // 云台控制模式
|
"ptzControlMode": "", // 云台控制模式
|
||||||
"aircraftYawAngleMode": "", // 飞行器偏航角模式
|
"aircraftYawAngleMode": "", // 飞行器偏航角模式
|
||||||
"wpml": "" // 航线文件
|
"wpml": "", // 航线文件
|
||||||
|
"folder":null
|
||||||
})
|
})
|
||||||
|
|
||||||
const handleManualUpload = async () => {
|
const handleManualUpload = async () => {
|
||||||
|
|
@ -261,6 +294,8 @@
|
||||||
if(res){
|
if(res){
|
||||||
|
|
||||||
submitForm.value.wpml = res.path;
|
submitForm.value.wpml = res.path;
|
||||||
|
submitForm.value.folder = currentFolderPath.value
|
||||||
|
|
||||||
|
|
||||||
let addAirLineRes =await addAirLine(submitForm.value);
|
let addAirLineRes =await addAirLine(submitForm.value);
|
||||||
|
|
||||||
|
|
@ -336,25 +371,35 @@
|
||||||
const expandedKeys = ref<string[]>(['0-0', '0-1']);
|
const expandedKeys = ref<string[]>(['0-0', '0-1']);
|
||||||
const selectedKeys = ref<string[]>([]);
|
const selectedKeys = ref<string[]>([]);
|
||||||
const treeData = ref(
|
const treeData = ref(
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
title: '默认文件夹',
|
title: '默认文件夹',
|
||||||
key: '1',
|
key: '1',
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
title: '面状航线',
|
title: '面状航线',
|
||||||
key: '2',
|
key: '2',
|
||||||
isLeaf: true,
|
isLeaf: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '航点航线',
|
title: '航点航线',
|
||||||
key: '3',
|
key: '3',
|
||||||
isLeaf: true,
|
isLeaf: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const getFolder = async () => {
|
||||||
|
let res = await getListAirLineFolder({});
|
||||||
|
treeData.value = res;
|
||||||
|
console.log("treeData",treeData.value);
|
||||||
|
}
|
||||||
|
|
||||||
|
getFolder();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const ariLineList = ref([])
|
const ariLineList = ref([])
|
||||||
const ariLineCount = ref(0);
|
const ariLineCount = ref(0);
|
||||||
|
|
@ -364,18 +409,16 @@
|
||||||
UavTypeId:null,
|
UavTypeId:null,
|
||||||
AirLineType:null,
|
AirLineType:null,
|
||||||
AirLineName:null,
|
AirLineName:null,
|
||||||
|
Folder:null,
|
||||||
page:1,
|
page:1,
|
||||||
limit:10,
|
limit:10,
|
||||||
key:null,
|
key:null,
|
||||||
})
|
})
|
||||||
|
|
||||||
const getAirList = async ()=>{
|
const getAirList = async ()=>{
|
||||||
|
|
||||||
let res = await getAirLineList(pageQuery.value);
|
let res = await getAirLineList(pageQuery.value);
|
||||||
|
|
||||||
ariLineCount.value = res.total;
|
ariLineCount.value = res.total;
|
||||||
ariLineList.value = res.items;
|
ariLineList.value = res.items;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getAirList();
|
getAirList();
|
||||||
|
|
@ -400,12 +443,71 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
const currentFolder = ref();
|
||||||
|
const currentFolderPath = ref(null);
|
||||||
|
// 选择目录
|
||||||
|
const folderClick = (item)=>{
|
||||||
|
pageQuery.value.Folder = item.ancestor;
|
||||||
|
currentFolderPath.value = item.ancestor;
|
||||||
|
currentFolder.value = item.id;
|
||||||
|
getAirList();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除目录
|
||||||
|
const deleteFolder =async (data) => {
|
||||||
|
Modal.confirm({
|
||||||
|
title: '是否确认删除?',
|
||||||
|
icon: createVNode(ExclamationCircleOutlined),
|
||||||
|
onCancel() {},
|
||||||
|
async onOk() {
|
||||||
|
let res = await deleteAirLineFolder({folderId:data.id});
|
||||||
|
if(res){
|
||||||
|
message.success("操作成功!");
|
||||||
|
getAirList();
|
||||||
|
}else{
|
||||||
|
message.error("操作失败!");
|
||||||
|
}
|
||||||
|
getFolder();
|
||||||
|
},
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 创建目录
|
||||||
|
const visible = ref(false);
|
||||||
|
const createFolderForm = ref({
|
||||||
|
folderName:null,
|
||||||
|
parentId:currentFolder.value
|
||||||
|
})
|
||||||
|
const createFolder = () => {
|
||||||
|
visible.value = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleGetData =async ()=>{
|
||||||
|
|
||||||
|
createFolderForm.value.parentId = currentFolder.value
|
||||||
|
|
||||||
|
let res = await createAirLineFolder(createFolderForm.value);
|
||||||
|
if(res){
|
||||||
|
message.success("操作成功!");
|
||||||
|
getFolder();
|
||||||
|
}else{
|
||||||
|
message.error("操作失败!");
|
||||||
|
}
|
||||||
|
|
||||||
|
createFolderForm.value.folderName = null;
|
||||||
|
createFolderForm.value.parentId = null;
|
||||||
|
visible.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const handleCancel = ()=>{
|
||||||
|
visible.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
@ -455,7 +557,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.file-container{
|
.file-container{
|
||||||
width:220px;
|
width:240px;
|
||||||
border-right: 1px solid rgba(204, 204, 204, 0.227) ;
|
border-right: 1px solid rgba(204, 204, 204, 0.227) ;
|
||||||
padding:0px;
|
padding:0px;
|
||||||
display:flex;
|
display:flex;
|
||||||
|
|
@ -812,4 +914,13 @@
|
||||||
::v-deep .anticon-delete{
|
::v-deep .anticon-delete{
|
||||||
color:#fff!important;
|
color:#fff!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tree-node-actions{
|
||||||
|
display:inline-block;
|
||||||
|
float:right;
|
||||||
|
font-size:12px;
|
||||||
|
}
|
||||||
|
.tree-node-actions span{
|
||||||
|
margin:0px 2px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -463,6 +463,8 @@ const saveAirLine = ()=>{
|
||||||
|
|
||||||
let xmlString3 = xmlString2.replace("<kml>",`<?xml version="1.0" encoding="UTF-8"?><kml xmlns="http://www.opengis.net/kml/2.2" xmlns:wpml="http://www.dji.com/wpmz/1.0.6">`)
|
let xmlString3 = xmlString2.replace("<kml>",`<?xml version="1.0" encoding="UTF-8"?><kml xmlns="http://www.opengis.net/kml/2.2" xmlns:wpml="http://www.dji.com/wpmz/1.0.6">`)
|
||||||
|
|
||||||
|
console.log("xmlString3",xmlString3);
|
||||||
|
return null;
|
||||||
handlerCreateFile(xmlString3);
|
handlerCreateFile(xmlString3);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,10 @@
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<LeftOutlined @click="backPage" />
|
<LeftOutlined @click="backPage" />
|
||||||
<div>面状航线</div>
|
<div>面状航线</div>
|
||||||
<SaveOutlined/>
|
<SaveOutlined @click="saveAirLine" />
|
||||||
|
|
||||||
<div style="flex:1;">
|
<div style="flex:1;">
|
||||||
<a-input v-model:value="submitForm.airLineName" size="small" placeholder="航线名称" />
|
<a-input v-model:value="submitForm.airLineName" size="middle" placeholder="航线名称" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -79,6 +79,15 @@
|
||||||
<div class="unit"> %</div>
|
<div class="unit"> %</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="item">
|
||||||
|
<div class="label">航线间距</div>
|
||||||
|
<div class="content">
|
||||||
|
<a-input style="width:100px;" placeholder="" v-model:value="calculatParam.spacing" disabled></a-input>
|
||||||
|
</div>
|
||||||
|
<div class="unit"> m</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<div class="label">主航线角度</div>
|
<div class="label">主航线角度</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
@ -237,6 +246,7 @@ const calculatParam = ref({
|
||||||
overlapAngle:0,
|
overlapAngle:0,
|
||||||
height:0,
|
height:0,
|
||||||
spacing:0,
|
spacing:0,
|
||||||
|
safeyFlyHeight:20,
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
|
|
@ -247,6 +257,8 @@ watch(
|
||||||
{deep:true}
|
{deep:true}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
calculatParam.value.height = calculateHeight(calculatParam.value.gsd,uavModel['m4td']);
|
calculatParam.value.height = calculateHeight(calculatParam.value.gsd,uavModel['m4td']);
|
||||||
|
|
||||||
calculatParam.value.spacing = calculateSpacing(calculatParam.value.gsd,calculatParam.value.overlapY/100,uavModel['m4td'])
|
calculatParam.value.spacing = calculateSpacing(calculatParam.value.gsd,calculatParam.value.overlapY/100,uavModel['m4td'])
|
||||||
|
|
@ -296,15 +308,81 @@ const missionConfig = ref(
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => missionConfig.value,
|
||||||
|
(newVal,oldVal) => {
|
||||||
|
calculatParam.value.safeyFlyHeight = missionConfig.value.takeOffSecurityHeight;
|
||||||
|
},
|
||||||
|
{deep:true}
|
||||||
|
)
|
||||||
|
|
||||||
// 航点基本信息
|
// 航点基本信息
|
||||||
const folder = ref({
|
const folder = ref({
|
||||||
"templateId": 0,
|
"templateId": 0,
|
||||||
"executeHeightMode": "WGS84",
|
"executeHeightMode": "WGS84",
|
||||||
"waylineId": 0,
|
"waylineId": 0,
|
||||||
"distance": 410.047576904297,
|
"distance": 1391.755859375,
|
||||||
"duration": 80.3239784240723,
|
"duration": 200.941531419754,
|
||||||
"autoFlightSpeed": 10,
|
"autoFlightSpeed": 8.2,
|
||||||
"Placemark":[]
|
"startActionGroup": {
|
||||||
|
"action": [
|
||||||
|
{
|
||||||
|
"actionId": 0,
|
||||||
|
"actionActuatorFunc": "gimbalRotate",
|
||||||
|
"actionActuatorFuncParam": {
|
||||||
|
"gimbalHeadingYawBase": "aircraft",
|
||||||
|
"gimbalRotateMode": "absoluteAngle",
|
||||||
|
"gimbalPitchRotateEnable": 1,
|
||||||
|
"gimbalPitchRotateAngle": -90,
|
||||||
|
"gimbalRollRotateEnable": 0,
|
||||||
|
"gimbalRollRotateAngle": 0,
|
||||||
|
"gimbalYawRotateEnable": 1,
|
||||||
|
"gimbalYawRotateAngle": 0,
|
||||||
|
"gimbalRotateTimeEnable": 0,
|
||||||
|
"gimbalRotateTime": 10,
|
||||||
|
"payloadPositionIndex": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"actionId": 1,
|
||||||
|
"actionActuatorFunc": "hover",
|
||||||
|
"actionActuatorFuncParam": {
|
||||||
|
"hoverTime": 0.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"actionId": 2,
|
||||||
|
"actionActuatorFunc": "setFocusType",
|
||||||
|
"actionActuatorFuncParam": {
|
||||||
|
"cameraFocusType": "manual",
|
||||||
|
"payloadPositionIndex": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"actionId": 3,
|
||||||
|
"actionActuatorFunc": "focus",
|
||||||
|
"actionActuatorFuncParam": {
|
||||||
|
"focusX": 0,
|
||||||
|
"focusY": 0,
|
||||||
|
"focusRegionWidth": 0,
|
||||||
|
"focusRegionHeight": 0,
|
||||||
|
"isPointFocus": 0,
|
||||||
|
"isInfiniteFocus": 1,
|
||||||
|
"payloadPositionIndex": 0,
|
||||||
|
"isCalibrationFocus": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"actionId": 4,
|
||||||
|
"actionActuatorFunc": "hover",
|
||||||
|
"actionActuatorFuncParam": {
|
||||||
|
"hoverTime": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
Placemark:[]
|
||||||
})
|
})
|
||||||
|
|
||||||
// 航点详细信息
|
// 航点详细信息
|
||||||
|
|
@ -413,16 +491,18 @@ const pointInfo = {
|
||||||
const handlerPointInfo = ()=>{
|
const handlerPointInfo = ()=>{
|
||||||
|
|
||||||
if(props.airPoints?.length<=0){
|
if(props.airPoints?.length<=0){
|
||||||
message.warning("请添加航点!");
|
message.warning("请绘制航测区域!");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let placemarkArray = [];
|
||||||
props.airPoints?.forEach((item,index)=>{
|
props.airPoints?.forEach((item,index)=>{
|
||||||
let point = {
|
let point = {
|
||||||
"Point": {
|
"Point": {
|
||||||
"coordinates": item.lng+","+item.lat // 坐标
|
"coordinates": item.lng+","+item.lat // 坐标
|
||||||
},
|
},
|
||||||
"index": index, // 序号
|
"index": index, // 序号
|
||||||
"executeHeight": 167, // 高度
|
"executeHeight": item.alt, // 高度
|
||||||
"waypointSpeed": 12.7125370218057, // 飞行速度
|
"waypointSpeed": 12.7125370218057, // 飞行速度
|
||||||
"waypointHeadingParam": { // 飞行器参数
|
"waypointHeadingParam": { // 飞行器参数
|
||||||
"waypointHeadingMode": "followWayline", // 偏航角模式 和航线角度一致
|
"waypointHeadingMode": "followWayline", // 偏航角模式 和航线角度一致
|
||||||
|
|
@ -516,9 +596,11 @@ const handlerPointInfo = ()=>{
|
||||||
"isRisky": 0,
|
"isRisky": 0,
|
||||||
"waypointWorkType": 0
|
"waypointWorkType": 0
|
||||||
}
|
}
|
||||||
|
placemarkArray.push(point);
|
||||||
folder.value.Placemark?.push(point);
|
|
||||||
})
|
});
|
||||||
|
|
||||||
|
folder.value.Placemark = placemarkArray;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|
@ -544,11 +626,14 @@ const saveAirLine = ()=>{
|
||||||
let handlerResult = handlerPointInfo();
|
let handlerResult = handlerPointInfo();
|
||||||
|
|
||||||
if(handlerResult){
|
if(handlerResult){
|
||||||
|
|
||||||
const builder = new XMLBuilder();
|
const builder = new XMLBuilder();
|
||||||
|
|
||||||
let lineData = {...waylinesJson.value}
|
let lineData = {...waylinesJson.value}
|
||||||
|
|
||||||
let obj = handlerPrefixWpml(lineData);
|
let obj = handlerPrefixWpml(lineData);
|
||||||
|
|
||||||
|
console.log("obj1234",obj);
|
||||||
|
|
||||||
let xmlString = builder.build(obj);
|
let xmlString = builder.build(obj);
|
||||||
|
|
||||||
|
|
@ -556,6 +641,12 @@ const saveAirLine = ()=>{
|
||||||
|
|
||||||
let xmlString3 = xmlString2.replace("<kml>",`<?xml version="1.0" encoding="UTF-8"?><kml xmlns="http://www.opengis.net/kml/2.2" xmlns:wpml="http://www.dji.com/wpmz/1.0.6">`)
|
let xmlString3 = xmlString2.replace("<kml>",`<?xml version="1.0" encoding="UTF-8"?><kml xmlns="http://www.opengis.net/kml/2.2" xmlns:wpml="http://www.dji.com/wpmz/1.0.6">`)
|
||||||
|
|
||||||
|
convertXmlToWmpl(xmlString3);
|
||||||
|
|
||||||
|
console.log("xmlString3",xmlString3);
|
||||||
|
|
||||||
|
return null;
|
||||||
|
|
||||||
handlerCreateFile(xmlString3);
|
handlerCreateFile(xmlString3);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -564,8 +655,9 @@ const saveAirLine = ()=>{
|
||||||
|
|
||||||
// 处理wmpl:前缀
|
// 处理wmpl:前缀
|
||||||
const handlerPrefixWpml = (obj) => {
|
const handlerPrefixWpml = (obj) => {
|
||||||
for (const key in obj) {
|
console.log("obj123",obj);
|
||||||
|
|
||||||
|
for (const key in obj) {
|
||||||
// 如果是对象
|
// 如果是对象
|
||||||
if (typeof obj[key] === 'object' && obj[key] !== null) {
|
if (typeof obj[key] === 'object' && obj[key] !== null) {
|
||||||
|
|
||||||
|
|
@ -573,7 +665,6 @@ const handlerPrefixWpml = (obj) => {
|
||||||
|
|
||||||
const newAttrs = {};
|
const newAttrs = {};
|
||||||
for (const attrName in obj[key]) {
|
for (const attrName in obj[key]) {
|
||||||
|
|
||||||
// 检查属性名是否首字母小写
|
// 检查属性名是否首字母小写
|
||||||
if (/^[a-z]/.test(attrName)) {
|
if (/^[a-z]/.test(attrName)) {
|
||||||
newAttrs[`wmpl:${attrName}`] = obj[key][attrName];
|
newAttrs[`wmpl:${attrName}`] = obj[key][attrName];
|
||||||
|
|
@ -611,10 +702,13 @@ const submitForm = ref({
|
||||||
|
|
||||||
// 生成xml文件,创建航线
|
// 生成xml文件,创建航线
|
||||||
const handlerCreateFile =async (content)=>{
|
const handlerCreateFile =async (content)=>{
|
||||||
|
|
||||||
const blob = new Blob([content], { type: 'wmpl/plain' });
|
const blob = new Blob([content], { type: 'wmpl/plain' });
|
||||||
|
|
||||||
// 创建FormData对象用于上传
|
// 创建FormData对象用于上传
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('xmlFile', blob);
|
formData.append('xmlFile', blob);
|
||||||
|
|
||||||
let res = await uploadXmlFile(formData);
|
let res = await uploadXmlFile(formData);
|
||||||
if(res){
|
if(res){
|
||||||
submitForm.value.wpml = res.path;
|
submitForm.value.wpml = res.path;
|
||||||
|
|
@ -630,6 +724,17 @@ const handlerCreateFile =async (content)=>{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// xml文本转换为wmpl和kml文件
|
||||||
|
const convertXmlToWmpl = (xmlString)=>{
|
||||||
|
|
||||||
|
const parser = new DOMParser();
|
||||||
|
|
||||||
|
const xmlDoc = parser.parseFromString(xmlString, "text/xml");
|
||||||
|
|
||||||
|
console.log();
|
||||||
|
|
||||||
|
console.log(xmlDoc);
|
||||||
|
}
|
||||||
// 退出绘制
|
// 退出绘制
|
||||||
const backPage = ()=>{
|
const backPage = ()=>{
|
||||||
emits("exitDraw")
|
emits("exitDraw")
|
||||||
|
|
|
||||||
|
|
@ -95,27 +95,31 @@
|
||||||
name:"面状航线",
|
name:"面状航线",
|
||||||
checked:false,
|
checked:false,
|
||||||
icon:'<svg t="1749104746320" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7498" width="40" height="40"><path d="M918.485333 261.930667L857.813333 208.64a20.992 20.992 0 0 0-27.008 0L770.133333 261.973333a15.36 15.36 0 0 0 0 23.68 20.48 20.48 0 0 0 13.482667 4.906667 20.48 20.48 0 0 0 13.525333-4.906667l15.36-13.482666v141.994666c0 15.402667 14.250667 27.904 31.786667 27.904 17.578667 0 31.829333-12.501333 31.829333-27.904V272.128l15.36 13.482667a20.48 20.48 0 0 0 13.482667 4.906666 20.48 20.48 0 0 0 13.525333-4.906666 15.36 15.36 0 0 0 0-23.68z m-277.461333 159.146666c0 15.445333 14.250667 27.946667 31.829333 27.946667s31.829333-12.501333 31.829334-27.946667V346.325333c0-31.786667-11.349333-61.952-31.914667-84.906666a115.328 115.328 0 0 0-85.632-38.698667c-32.426667 0-63.573333 14.08-85.632 38.698667a126.848 126.848 0 0 0-31.914667 84.906666v335.530667c0 36.693333-24.704 67.754667-53.888 67.754667-29.226667 0-53.930667-31.061333-53.930666-67.754667V355.498667l0.469333-7.68 0.042667-1.493334c0-31.786667-11.306667-61.952-31.914667-84.906666a115.328 115.328 0 0 0-85.632-38.698667c-32.384 0-63.573333 14.08-85.632 38.698667a126.848 126.848 0 0 0-31.914667 84.906666v138.496c0 15.402667 14.250667 27.904 31.829334 27.904s31.829333-12.501333 31.829333-27.904V346.325333c0-36.693333 24.704-67.754667 53.888-67.754666 29.013333 0 53.589333 30.634667 53.930667 67.072l-0.512 8.405333v327.808c0 31.786667 11.306667 61.952 31.914666 84.906667a115.328 115.328 0 0 0 85.632 38.698666c32.384 0 63.573333-14.08 85.632-38.698666a126.848 126.848 0 0 0 31.914667-84.906667V346.325333c0-36.693333 24.661333-67.754667 53.888-67.754666 29.226667 0 53.888 31.018667 53.888 67.754666V421.12z" p-id="7499" fill="#ffffff"></path><path d="M858.453333 786.432l72.106667-122.624a27.861333 27.861333 0 0 0 0-28.288l-72.106667-122.624a28.928 28.928 0 0 0-24.96-14.165333h-144.128a28.928 28.928 0 0 0-24.96 14.165333l-72.106666 122.624a27.861333 27.861333 0 0 0 0 28.288l72.106666 122.624c5.12 8.746667 14.634667 14.165333 24.96 14.165333h144.128a28.928 28.928 0 0 0 24.96-14.165333z m-152.32-231.04h110.805334l55.466666 94.293333-55.466666 94.293334H706.133333l-55.424-94.293334 55.466667-94.293333z" p-id="7500" fill="#ffffff"></path><path d="M703.786667 650.410667a57.173333 57.173333 0 0 0 57.642666 56.618666 57.173333 57.173333 0 0 0 57.642667-56.618666 57.173333 57.173333 0 0 0-57.642667-56.618667 57.173333 57.173333 0 0 0-57.642666 56.618667z m57.6 14.165333q1.408 0 2.816-0.298667 1.408-0.256 2.688-0.810666 1.322667-0.512 2.517333-1.28 1.194667-0.768 2.176-1.749334 1.024-1.024 1.792-2.133333 0.810667-1.194667 1.322667-2.474667 0.554667-1.28 0.853333-2.645333 0.256-1.365333 0.256-2.773333t-0.256-2.773334q-0.298667-1.365333-0.853333-2.645333-0.512-1.28-1.28-2.432-0.853333-1.194667-1.834667-2.133333-0.981333-1.024-2.176-1.792-1.194667-0.768-2.517333-1.28-1.28-0.554667-2.688-0.853334-1.408-0.256-2.816-0.256t-2.816 0.256q-1.365333 0.298667-2.688 0.853334-1.28 0.512-2.517334 1.28-1.152 0.768-2.133333 1.749333-1.024 0.981333-1.834667 2.133333-0.768 1.194667-1.322666 2.474667-0.554667 1.28-0.853334 2.645333-0.256 1.365333-0.256 2.773334t0.298667 2.773333q0.256 1.365333 0.810667 2.645333t1.322666 2.432q0.810667 1.152 1.792 2.133334 1.024 1.024 2.176 1.792 1.194667 0.768 2.517334 1.28 1.28 0.554667 2.688 0.853333 1.408 0.256 2.816 0.256z" p-id="7501" fill="#ffffff"></path><path d="M162.389333 510.464a43.690667 43.690667 0 1 1 0 87.381333 43.690667 43.690667 0 0 1 0-87.381333z m0-37.632c-44.8 0-81.322667 36.48-81.322666 81.322667 0 44.8 36.48 81.322667 81.322666 81.322666s81.322667-36.48 81.322667-81.322666-36.48-81.322667-81.322667-81.322667z" p-id="7502" fill="#ffffff"></path><path d="M234.112 554.154667q0-29.653333-21.034667-50.688t-50.688-21.034667q-29.653333 0-50.688 21.034667-20.992 21.034667-20.992 50.688t20.992 50.645333q21.034667 21.034667 50.688 21.034667t50.688-21.034667q21.034667-20.992 21.034667-50.645333z m19.2 0q0 37.589333-26.666667 64.256-26.624 26.666667-64.256 26.666666-37.589333 0-64.256-26.666666t-26.666666-64.256q0-37.632 26.666666-64.256 26.666667-26.666667 64.256-26.666667 37.632 0 64.256 26.666667 26.666667 26.624 26.666667 64.256z m-144.213333 0q0-22.101333 15.616-37.717334t37.674666-15.616q22.101333 0 37.717334 15.616t15.616 37.717334q0 22.058667-15.616 37.674666t-37.717334 15.616q-22.058667 0-37.674666-15.616t-15.616-37.674666z m19.2 0q0 14.08 9.984 24.106666 9.984 9.984 24.106666 9.984 14.122667 0 24.106667-9.984 9.984-9.984 9.984-24.106666 0-14.122667-9.984-24.106667-9.984-9.984-24.106667-9.984-14.08 0-24.106666 9.984-9.984 9.984-9.984 24.106667z" p-id="7503" fill="#ffffff"></path></svg>',
|
icon:'<svg t="1749104746320" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7498" width="40" height="40"><path d="M918.485333 261.930667L857.813333 208.64a20.992 20.992 0 0 0-27.008 0L770.133333 261.973333a15.36 15.36 0 0 0 0 23.68 20.48 20.48 0 0 0 13.482667 4.906667 20.48 20.48 0 0 0 13.525333-4.906667l15.36-13.482666v141.994666c0 15.402667 14.250667 27.904 31.786667 27.904 17.578667 0 31.829333-12.501333 31.829333-27.904V272.128l15.36 13.482667a20.48 20.48 0 0 0 13.482667 4.906666 20.48 20.48 0 0 0 13.525333-4.906666 15.36 15.36 0 0 0 0-23.68z m-277.461333 159.146666c0 15.445333 14.250667 27.946667 31.829333 27.946667s31.829333-12.501333 31.829334-27.946667V346.325333c0-31.786667-11.349333-61.952-31.914667-84.906666a115.328 115.328 0 0 0-85.632-38.698667c-32.426667 0-63.573333 14.08-85.632 38.698667a126.848 126.848 0 0 0-31.914667 84.906666v335.530667c0 36.693333-24.704 67.754667-53.888 67.754667-29.226667 0-53.930667-31.061333-53.930666-67.754667V355.498667l0.469333-7.68 0.042667-1.493334c0-31.786667-11.306667-61.952-31.914667-84.906666a115.328 115.328 0 0 0-85.632-38.698667c-32.384 0-63.573333 14.08-85.632 38.698667a126.848 126.848 0 0 0-31.914667 84.906666v138.496c0 15.402667 14.250667 27.904 31.829334 27.904s31.829333-12.501333 31.829333-27.904V346.325333c0-36.693333 24.704-67.754667 53.888-67.754666 29.013333 0 53.589333 30.634667 53.930667 67.072l-0.512 8.405333v327.808c0 31.786667 11.306667 61.952 31.914666 84.906667a115.328 115.328 0 0 0 85.632 38.698666c32.384 0 63.573333-14.08 85.632-38.698666a126.848 126.848 0 0 0 31.914667-84.906667V346.325333c0-36.693333 24.661333-67.754667 53.888-67.754666 29.226667 0 53.888 31.018667 53.888 67.754666V421.12z" p-id="7499" fill="#ffffff"></path><path d="M858.453333 786.432l72.106667-122.624a27.861333 27.861333 0 0 0 0-28.288l-72.106667-122.624a28.928 28.928 0 0 0-24.96-14.165333h-144.128a28.928 28.928 0 0 0-24.96 14.165333l-72.106666 122.624a27.861333 27.861333 0 0 0 0 28.288l72.106666 122.624c5.12 8.746667 14.634667 14.165333 24.96 14.165333h144.128a28.928 28.928 0 0 0 24.96-14.165333z m-152.32-231.04h110.805334l55.466666 94.293333-55.466666 94.293334H706.133333l-55.424-94.293334 55.466667-94.293333z" p-id="7500" fill="#ffffff"></path><path d="M703.786667 650.410667a57.173333 57.173333 0 0 0 57.642666 56.618666 57.173333 57.173333 0 0 0 57.642667-56.618666 57.173333 57.173333 0 0 0-57.642667-56.618667 57.173333 57.173333 0 0 0-57.642666 56.618667z m57.6 14.165333q1.408 0 2.816-0.298667 1.408-0.256 2.688-0.810666 1.322667-0.512 2.517333-1.28 1.194667-0.768 2.176-1.749334 1.024-1.024 1.792-2.133333 0.810667-1.194667 1.322667-2.474667 0.554667-1.28 0.853333-2.645333 0.256-1.365333 0.256-2.773333t-0.256-2.773334q-0.298667-1.365333-0.853333-2.645333-0.512-1.28-1.28-2.432-0.853333-1.194667-1.834667-2.133333-0.981333-1.024-2.176-1.792-1.194667-0.768-2.517333-1.28-1.28-0.554667-2.688-0.853334-1.408-0.256-2.816-0.256t-2.816 0.256q-1.365333 0.298667-2.688 0.853334-1.28 0.512-2.517334 1.28-1.152 0.768-2.133333 1.749333-1.024 0.981333-1.834667 2.133333-0.768 1.194667-1.322666 2.474667-0.554667 1.28-0.853334 2.645333-0.256 1.365333-0.256 2.773334t0.298667 2.773333q0.256 1.365333 0.810667 2.645333t1.322666 2.432q0.810667 1.152 1.792 2.133334 1.024 1.024 2.176 1.792 1.194667 0.768 2.517334 1.28 1.28 0.554667 2.688 0.853333 1.408 0.256 2.816 0.256z" p-id="7501" fill="#ffffff"></path><path d="M162.389333 510.464a43.690667 43.690667 0 1 1 0 87.381333 43.690667 43.690667 0 0 1 0-87.381333z m0-37.632c-44.8 0-81.322667 36.48-81.322666 81.322667 0 44.8 36.48 81.322667 81.322666 81.322666s81.322667-36.48 81.322667-81.322666-36.48-81.322667-81.322667-81.322667z" p-id="7502" fill="#ffffff"></path><path d="M234.112 554.154667q0-29.653333-21.034667-50.688t-50.688-21.034667q-29.653333 0-50.688 21.034667-20.992 21.034667-20.992 50.688t20.992 50.645333q21.034667 21.034667 50.688 21.034667t50.688-21.034667q21.034667-20.992 21.034667-50.645333z m19.2 0q0 37.589333-26.666667 64.256-26.624 26.666667-64.256 26.666666-37.589333 0-64.256-26.666666t-26.666666-64.256q0-37.632 26.666666-64.256 26.666667-26.666667 64.256-26.666667 37.632 0 64.256 26.666667 26.666667 26.624 26.666667 64.256z m-144.213333 0q0-22.101333 15.616-37.717334t37.674666-15.616q22.101333 0 37.717334 15.616t15.616 37.717334q0 22.058667-15.616 37.674666t-37.717334 15.616q-22.058667 0-37.674666-15.616t-15.616-37.674666z m19.2 0q0 14.08 9.984 24.106666 9.984 9.984 24.106666 9.984 14.122667 0 24.106667-9.984 9.984-9.984 9.984-24.106666 0-14.122667-9.984-24.106667-9.984-9.984-24.106667-9.984-14.08 0-24.106666 9.984-9.984 9.984-9.984 24.106667z" p-id="7503" fill="#ffffff"></path></svg>',
|
||||||
},{
|
},
|
||||||
name:"带状航线",
|
// {
|
||||||
checked:false,
|
// name:"带状航线",
|
||||||
icon:'<svg t="1749104685102" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6766" width="40" height="40"><path d="M712.313523 0.469118v51.176544c-208.544417 0-446.600641 148.795802-446.600641 279.040107 0 41.197118 9.552955 70.367748 31.68681 107.342801l7.25001 11.600017 17.314731 27.422098 3.497064 5.714714c31.729457 53.820666 34.075049 100.007497-2.004415 164.959061-51.38978 92.458956-145.682562 173.914956-282.281288 244.965057l-18.039731 9.211778L0.234559 856.098288c137.920786-68.960393 230.507684-146.919329 278.485694-233.237099 26.867686-48.404481 25.502978-75.314814 2.644122-114.123694l-21.579443-34.20299-6.22648-10.107367c-26.611803-44.438299-39.022115-81.882471-39.022114-133.741369 0-162.059056 255.669485-324.629878 485.878638-330.088709L712.313523 0.469118z m49.470659 185.514973l22.901504 45.717712-18.892674 9.638249-16.845613 9.083837c-68.661863 38.126525-82.053059 63.288326-72.329516 121.757528 3.539711 21.110324 17.442672 42.775061 44.566241 71.092749l8.316188 8.529424 9.595602 9.425014 31.089751 29.852984c59.876557 57.744201 90.3266 98.514847 104.058973 153.231102 20.129441 80.645704 21.408854 148.326684 2.857357 203.000292l-3.966182 10.747074-47.508892-19.020616c18.039732-45.120653 18.039732-105.850152-1.066178-182.316438-10.022073-40.088293-33.307401-72.926575-80.219233-119.411936l-42.34859-40.813294-12.282371-12.154429a601.06851 601.06851 0 0 1-5.458831-5.62942c-33.648578-35.141227-52.498605-64.525093-58.128025-98.131023-14.926492-89.644246 14.07355-130.628129 114.592812-183.809088l21.067677-10.832368zM574.904502 797.970264v50.579484h-29.852984v-50.622131h29.852984z m0-136.513432v85.29424h-29.852984v-85.29424h29.852984z m-25.161801-139.882554c14.627962 30.492691 23.072092 58.767731 24.863271 87.511891l-29.852984 1.833826c-1.450002-24.479447-8.827954-49.172129-21.92062-76.466286z m-68.278039-119.028112l7.505893 14.286786 35.269168 58.213318-25.588272 15.352964-31.302986-51.517721a446.856524 446.856524 0 0 1-12.538253-22.858857l26.65445-13.47649zM458.264629 268.719504l25.75886 15.09708a192.082629 192.082629 0 0 0-15.99267 34.927991c-4.264712 12.836783-5.117654 24.820624-2.985298 37.955937l-29.426513 4.861772a106.191329 106.191329 0 0 1 4.136771-52.370663c4.776477-14.07355 11.002957-27.55004 18.50885-40.472117z m104.186914-99.282496l15.011786 25.844155a284.712174 284.712174 0 0 0-64.013327 49.641248l-21.707384-20.513265a314.351922 314.351922 0 0 1 70.708925-54.972138z m131.011953-51.261838l7.25001 29.000041a533.515472 533.515472 0 0 0-78.811878 26.014744l-11.642663-27.507393c25.588272-10.875016 53.436841-20.044146 83.161884-27.507392z" fill="#ffffff" p-id="6767"></path></svg>',
|
// checked:false,
|
||||||
}
|
// icon:'<svg t="1749104685102" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6766" width="40" height="40"><path d="M712.313523 0.469118v51.176544c-208.544417 0-446.600641 148.795802-446.600641 279.040107 0 41.197118 9.552955 70.367748 31.68681 107.342801l7.25001 11.600017 17.314731 27.422098 3.497064 5.714714c31.729457 53.820666 34.075049 100.007497-2.004415 164.959061-51.38978 92.458956-145.682562 173.914956-282.281288 244.965057l-18.039731 9.211778L0.234559 856.098288c137.920786-68.960393 230.507684-146.919329 278.485694-233.237099 26.867686-48.404481 25.502978-75.314814 2.644122-114.123694l-21.579443-34.20299-6.22648-10.107367c-26.611803-44.438299-39.022115-81.882471-39.022114-133.741369 0-162.059056 255.669485-324.629878 485.878638-330.088709L712.313523 0.469118z m49.470659 185.514973l22.901504 45.717712-18.892674 9.638249-16.845613 9.083837c-68.661863 38.126525-82.053059 63.288326-72.329516 121.757528 3.539711 21.110324 17.442672 42.775061 44.566241 71.092749l8.316188 8.529424 9.595602 9.425014 31.089751 29.852984c59.876557 57.744201 90.3266 98.514847 104.058973 153.231102 20.129441 80.645704 21.408854 148.326684 2.857357 203.000292l-3.966182 10.747074-47.508892-19.020616c18.039732-45.120653 18.039732-105.850152-1.066178-182.316438-10.022073-40.088293-33.307401-72.926575-80.219233-119.411936l-42.34859-40.813294-12.282371-12.154429a601.06851 601.06851 0 0 1-5.458831-5.62942c-33.648578-35.141227-52.498605-64.525093-58.128025-98.131023-14.926492-89.644246 14.07355-130.628129 114.592812-183.809088l21.067677-10.832368zM574.904502 797.970264v50.579484h-29.852984v-50.622131h29.852984z m0-136.513432v85.29424h-29.852984v-85.29424h29.852984z m-25.161801-139.882554c14.627962 30.492691 23.072092 58.767731 24.863271 87.511891l-29.852984 1.833826c-1.450002-24.479447-8.827954-49.172129-21.92062-76.466286z m-68.278039-119.028112l7.505893 14.286786 35.269168 58.213318-25.588272 15.352964-31.302986-51.517721a446.856524 446.856524 0 0 1-12.538253-22.858857l26.65445-13.47649zM458.264629 268.719504l25.75886 15.09708a192.082629 192.082629 0 0 0-15.99267 34.927991c-4.264712 12.836783-5.117654 24.820624-2.985298 37.955937l-29.426513 4.861772a106.191329 106.191329 0 0 1 4.136771-52.370663c4.776477-14.07355 11.002957-27.55004 18.50885-40.472117z m104.186914-99.282496l15.011786 25.844155a284.712174 284.712174 0 0 0-64.013327 49.641248l-21.707384-20.513265a314.351922 314.351922 0 0 1 70.708925-54.972138z m131.011953-51.261838l7.25001 29.000041a533.515472 533.515472 0 0 0-78.811878 26.014744l-11.642663-27.507393c25.588272-10.875016 53.436841-20.044146 83.161884-27.507392z" fill="#ffffff" p-id="6767"></path></svg>',
|
||||||
|
// }
|
||||||
])
|
])
|
||||||
|
|
||||||
const airType = ref([
|
const airType = ref([
|
||||||
|
// {
|
||||||
|
// name:"经纬 M30 系列",
|
||||||
|
// checked:false,
|
||||||
|
// },{
|
||||||
|
// name:"Mavic 3 行业系列",
|
||||||
|
// checked:false,
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name:"Matrice 3D 系列",
|
||||||
|
// checked:false,
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name:"Matrice 4 行业系列",
|
||||||
|
// checked:false,
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
name:"经纬 M30 系列",
|
|
||||||
checked:false,
|
|
||||||
},{
|
|
||||||
name:"Mavic 3 行业系列",
|
|
||||||
checked:false,
|
|
||||||
},{
|
|
||||||
name:"Matrice 3D 系列",
|
|
||||||
checked:false,
|
|
||||||
},{
|
|
||||||
name:"Matrice 4 行业系列",
|
|
||||||
checked:false,
|
|
||||||
},{
|
|
||||||
name:"Matrice 4D 系列",
|
name:"Matrice 4D 系列",
|
||||||
checked:false,
|
checked:false,
|
||||||
}
|
}
|
||||||
|
|
@ -125,7 +129,8 @@
|
||||||
{
|
{
|
||||||
name:"Matrice 4D",
|
name:"Matrice 4D",
|
||||||
checked:false,
|
checked:false,
|
||||||
},{
|
},
|
||||||
|
{
|
||||||
name:"Matrice 4TD",
|
name:"Matrice 4TD",
|
||||||
checked:false,
|
checked:false,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="group-container">
|
<div class="group-container">
|
||||||
<a-form-item ref="name" label="任务类型" name="taskType">
|
<!-- <a-form-item ref="name" label="任务类型" name="taskType">
|
||||||
<div class="radio-box">
|
<div class="radio-box">
|
||||||
<div v-for="(item,index) in taskTypeOptions" :key="index"
|
<div v-for="(item,index) in taskTypeOptions" :key="index"
|
||||||
:class=" submitForm.taskType == item.value ? 'radio-item-active':'radio-item'"
|
:class=" submitForm.taskType == item.value ? 'radio-item-active':'radio-item'"
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
{{item.label}}
|
{{item.label}}
|
||||||
</div>
|
</div>
|
||||||
</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" v-show="!submitForm.airLineId">
|
<a-button type="primary" style="width:100%;" @click="selectAriLine" v-show="!submitForm.airLineId">
|
||||||
|
|
@ -80,8 +80,8 @@
|
||||||
|
|
||||||
<div class="radio-box">
|
<div class="radio-box">
|
||||||
<div v-for="(item,index) in periodicFormulaOptions" :key="index"
|
<div v-for="(item,index) in periodicFormulaOptions" :key="index"
|
||||||
:class=" submitForm.periodicFormula == item.value ? 'radio-item-active':'radio-item'"
|
:class=" submitForm.taskType == item.value ? 'radio-item-active':'radio-item'"
|
||||||
@click="submitForm.periodicFormula = item.value"
|
@click="submitForm.taskType = item.value"
|
||||||
>
|
>
|
||||||
{{item.label}}
|
{{item.label}}
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -95,12 +95,12 @@
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<!-- 单次定时 -->
|
<!-- 单次定时 -->
|
||||||
<a-form-item v-if="submitForm.periodicFormula == 1" ref="accuracy" label="设置时间" name="accuracy">
|
<a-form-item v-if="submitForm.taskType == 1" ref="accuracy" label="设置时间" name="accuracy">
|
||||||
<a-date-picker v-model:value="onceTime" valueFormat="YYYY-MM-DD HH:mm:ss" style="width:100%;" show-time placeholder="选择时间" @change="onOnceTimeChange" />
|
<a-date-picker v-model:value="onceTime" valueFormat="YYYY-MM-DD HH:mm:ss" style="width:100%;" show-time placeholder="选择时间" @change="onOnceTimeChange" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<!-- 重复定时 -->
|
<!-- 重复定时 -->
|
||||||
<div v-if="submitForm.periodicFormula == 2">
|
<div v-if="submitForm.taskType == 2">
|
||||||
<a-form-item ref="accuracy" label="选择日期" valueFormat="YYYY-M-D" name="accuracy">
|
<a-form-item ref="accuracy" label="选择日期" valueFormat="YYYY-M-D" name="accuracy">
|
||||||
<a-range-picker v-model:value="repeatTime.date" style="width:100%;" @change="onRepeatDateChange" />
|
<a-range-picker v-model:value="repeatTime.date" style="width:100%;" @change="onRepeatDateChange" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
@ -492,17 +492,19 @@ const onOnceTimeChange = (e) => {
|
||||||
let yearTime = time.getFullYear();
|
let yearTime = time.getFullYear();
|
||||||
|
|
||||||
let cronTime = secondTime+" "+minutisTime+" "+ hourTime+" "+ dayTime+" "+monthTime+" ? "+yearTime
|
let cronTime = secondTime+" "+minutisTime+" "+ hourTime+" "+ dayTime+" "+monthTime+" ? "+yearTime
|
||||||
|
|
||||||
|
submitForm.value.periodicFormula = cronTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 选择日期
|
// 选择日期
|
||||||
const onRepeatDateChange = (e) =>{
|
const onRepeatDateChange = (e) =>{
|
||||||
console.log(e);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 选择时间
|
// 选择时间
|
||||||
const onRepeatTimeChange = (e) => {
|
const onRepeatTimeChange = (e) => {
|
||||||
console.log("123",e);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 重复定时
|
// 重复定时
|
||||||
|
|
@ -541,7 +543,7 @@ const handleRepeatTypeChange = (e)=>{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
submitForm.value.executeTime = cronTime;
|
submitForm.value.periodicFormula = cronTime;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue