Browse Source

功能修改20250118

zhiyuan-007 21 hours ago
parent
commit
64b0c6d9f1
2 changed files with 48 additions and 5 deletions
  1. 15 0
      src/utils/map/addLayer.js
  2. 33 5
      src/views/home/cpns/RoutePlan.vue

+ 15 - 0
src/utils/map/addLayer.js

@@ -786,6 +786,21 @@ export function showRoutePath(params) {
   })
 }
 
+
+// 航线展示
+export function showVritualRoutePath(params) {
+  invokeParams('PathPipe', {
+    ...params,
+    // "id": "1",
+    // "status": "show",
+    // "paths": [],  //传入路径
+    "color": params.color,
+    "intensity": 1.2,
+    "pipeRadius": 5
+  })
+}
+
+
 export function symbolPathPipe(params){
   invokeParams('SymbolPathPipe', {
     ...params,

+ 33 - 5
src/views/home/cpns/RoutePlan.vue

@@ -103,7 +103,13 @@
 <script setup>
 import {getCurrentInstance, ref, watch} from 'vue';
 import useLayoutStore from '@/store/layout';
-import {drawRouteAuto, drawRouteManual, getVirtualFlyPoint, ShowThreeCubeDetail} from '@/utils/map/addLayer';
+import {
+  drawRouteAuto,
+  drawRouteManual,
+  getVirtualFlyPoint,
+  showRoutePath,
+  ShowThreeCubeDetail, showVritualRoutePath
+} from '@/utils/map/addLayer';
 import {searchPathByPoint, queryGridByLine, routeRePlan} from '@/service/map';
 import { useMapStore } from "@/store/map.js";
 const { proxy } = getCurrentInstance();
@@ -340,15 +346,24 @@ function auxiliaryModification(){
 
 function virtualFly(){
   isFly.value = !isFly.value;
-  debugger
+  drawRouteManual({ status: 'hide' });
+  ShowThreeCubeDetail({
+    status: 'hide'
+  });
+  showVritualRoutePath({
+    id: "virtualFlyPath",
+    paths: mapStore.draw_geometry.paths,
+    color:"#0095ff",
+    status: isFly.value ? 'show' : 'hide'
+  });
   getVirtualFlyPoint({
-    status:"show",
+    status: 'show',
     flyList:{
       path: mapStore.draw_geometry.paths[0],
       status:isFly.value?1:3,  //1:正常,2:悬停,3:停止,4:飞行故障
       uavid: "9556344a-c055-4156-86d4-bc57930275a2",
     }
-  })
+  });
 }
 
 
@@ -368,10 +383,23 @@ function handleClear() {
   drawRouteManual({ status: 'hide' });
   ShowThreeCubeDetail({
     status: 'hide'
-  })
+  });
+  showRoutePath({
+    id: "virtualFlyPath",
+    status: 'hide'
+  });
+  showVritualRoutePath({
+    status: 'hide',
+    flyList:{
+      path: mapStore.draw_geometry.paths[0],
+      status:3,  //1:正常,2:悬停,3:停止,4:飞行故障
+      uavid: "9556344a-c055-4156-86d4-bc57930275a2",
+    }
+  });
 }
 
 watch(() => mapStore.draw_geometry, (val) => {
+  debugger
   getDrawGeometry()
 }, {
   deep: true