diff --git a/package.json b/package.json index 1e85002..2f3d463 100644 --- a/package.json +++ b/package.json @@ -161,7 +161,7 @@ "xe-utils": "^3.5.14", "xlsx": "^0.18.5", "xml-js": "^1.6.11", - "vue3-cron-plus":"^0.1.9" + "file-saver":"^2.0.5" }, "devDependencies": { "@commitlint/cli": "^18.4.4", diff --git a/src/api/sys/workplan.ts b/src/api/sys/workplan.ts index f219525..313a32d 100644 --- a/src/api/sys/workplan.ts +++ b/src/api/sys/workplan.ts @@ -86,8 +86,8 @@ export function getAirLine(params) { } -export function uploadXmlFile(params){ - return defHttp.post({ url: Api.UploadXmlFile, params,headers: {'Content-Type': 'multipart/form-data' }}); +export function uploadXmlFile(folder,params){ + return defHttp.post({ url: Api.UploadXmlFile+"?folder="+folder, params,headers: {'Content-Type': 'multipart/form-data' }}); } export function deleteAirLine(params){ diff --git a/src/views/demo/workmanagement/airlinemanagement/index.vue b/src/views/demo/workmanagement/airlinemanagement/index.vue index 4f1e7b5..6307a37 100644 --- a/src/views/demo/workmanagement/airlinemanagement/index.vue +++ b/src/views/demo/workmanagement/airlinemanagement/index.vue @@ -16,12 +16,18 @@ + +
+ +
+ \ No newline at end of file diff --git a/src/views/demo/workmanagement/workplan/components/map.vue b/src/views/demo/workmanagement/workplan/components/map.vue index 4394049..305e067 100644 --- a/src/views/demo/workmanagement/workplan/components/map.vue +++ b/src/views/demo/workmanagement/workplan/components/map.vue @@ -49,6 +49,7 @@ import * as turf from '@turf/turf'; import airPolygon from './airPolygon.vue'; import airPointConfig from './airPointConfig.vue'; +import { polygon } from '@turf/turf'; const props = defineProps([ 'airRoute', @@ -154,7 +155,7 @@ const generatePreviewPoint = (placemark)=>{ } }; - const emits = defineEmits(['exitDraw', 'flyToThere', 'mapOnLoad', 'clickAirPort']); + const emits = defineEmits(['exitDraw', 'flyToThere', 'mapOnLoad', 'clickAirPort', 'changeAirportLive', 'changeUAVLive']); const airPoints = ref([]); const currentAirPoint = ref({}); @@ -214,6 +215,7 @@ const generatePreviewPoint = (placemark)=>{ let graphic = null; const exitDraw = () => { + // 清空数据 graphicLayer ? graphicLayer.clear() : null; drawGraphicLayer ? drawGraphicLayer.clear() : null; @@ -227,6 +229,7 @@ const generatePreviewPoint = (placemark)=>{ props.airRoute.airLineType = null; airPointConfigShow.value = false; + emits('exitDraw'); }; @@ -495,6 +498,8 @@ const initMap = () => { }); }; + + // 绑定地图右键菜单 const handlerBindMapMenus = () => { const mapContextmenuItems = [ @@ -1809,7 +1814,15 @@ const clearAllLayer = () => { polygonGraphicLayer ? polygonGraphicLayer.clear() : null; polygonLineGraphicLayer ? polygonLineGraphicLayer.clear() : null; + + // 面状航线 + polygonLineGraphicLayer ? polygonLineGraphicLayer.clear() : null; + + // 文字标注 + labelGraphicLayer ? labelGraphicLayer.clear() : null; + airPoints.value = []; + polygonGeoJson.value = null; }; @@ -1934,6 +1947,12 @@ const homeSetAirportPosition = () => { homeStartGraphic.on(mars3d.EventType.click, function (event) { emits('clickAirPort') }); + homeStartGraphicLive.on(mars3d.EventType.click, function (event) { + emits('changeAirportLive', true) + if(props.homeAirport.mode_code == 4){ + emits('changeUAVLive', true) + } + }); graphicLayer.addGraphic(homeStartGraphic); graphicLayer.addGraphic(homeStartGraphicLive); } diff --git a/src/views/demo/workmanagement/workplan/components/planList.vue b/src/views/demo/workmanagement/workplan/components/planList.vue index 4c0885a..4f0df6a 100644 --- a/src/views/demo/workmanagement/workplan/components/planList.vue +++ b/src/views/demo/workmanagement/workplan/components/planList.vue @@ -69,7 +69,7 @@ -
 {{item.createUserName ? createUserName : '超级管理员'}}
+
 {{item.createUserName ? item.createUserName : '超级管理员'}}
更新时间:{{item.createTime}}
diff --git a/src/views/demo/workmanagement/workplan/index.vue b/src/views/demo/workmanagement/workplan/index.vue index adb410c..1794379 100644 --- a/src/views/demo/workmanagement/workplan/index.vue +++ b/src/views/demo/workmanagement/workplan/index.vue @@ -53,6 +53,7 @@
+ @@ -89,6 +90,7 @@ const workPlanFormShow = ref(false); const ariLineShow = ref(false); const aircraftShow = ref(false); const createAirLineShow = ref(false); +const importAirLineShow = ref(true); const selectAriLine = ()=> { ariLineShow.value = true; diff --git a/src/views/demo/workmanagement/workplan/waylineConfig/template.ts b/src/views/demo/workmanagement/workplan/waylineConfig/template.ts new file mode 100644 index 0000000..da13ef6 --- /dev/null +++ b/src/views/demo/workmanagement/workplan/waylineConfig/template.ts @@ -0,0 +1,87 @@ +export const templateStr = ` + + + + 17861857725 + 1752564928459 + 1752655482664 + + safely + goHome + goContinue + goBack + 20 + 35.134599,118.296654,77.599742 + 0 + 15 + 100 + + 100 + 1 + + 0 + + 99 + 0 + 0 + + + + mapping2d + 0 + + WGS84 + EGM96 + 56.2196685082873 + 1 + 0 + 56.2196685082873 + wpmz/res/dsm/wgs84_ASTGTMV003_N35E118_dem_7.tif + + 8.2 + + 0 + 1 + 0 + 0 + 0 + 0 + time + 90 + 0 + 0 + + 80 + 70 + 80 + 70 + + + + + + 118.295351569369,35.1352007156958,0 + 118.29374537007,35.1352473702113,0 + 118.293814481984,35.1333789340881,0 + 118.295269229943,35.1333726378323,0 + + + + + 56.2196685082873 + 56.2196685082873 + + + 0 + firstPoint + average + singleReturnStrongest + 240000 + repetitive + visable + + + + + +`; \ No newline at end of file