瀏覽代碼

功能修改20250317-01

zhiyuan-007 3 周之前
父節點
當前提交
aa6f132f4d
共有 2 個文件被更改,包括 11801 次插入3 次删除
  1. 11769 0
      src/data/shifei.json
  2. 32 3
      src/views/home/cpns/PanelSjwg.vue

File diff suppressed because it is too large
+ 11769 - 0
src/data/shifei.json


+ 32 - 3
src/views/home/cpns/PanelSjwg.vue

@@ -24,7 +24,7 @@
     <Transition>
       <div v-if="contentShow.b2" v-collapse="'scroll'" class="flex-1 pr-1">
         <div class="title-shade">
-          <span>空域</span>
+          <span @click="handleCheckShiFei">空域</span>
           <i class="btn-selectall" :class="{ 'active': checkAll.area }" @click="handleCheckAll('area')"></i>
           <i class="drop-down" @click="toggleContentShow('b2r1')" :class="{ 'reverse': contentShow.b2r1 }"></i>
         </div>
@@ -86,9 +86,9 @@ import { DeleteArea, DeletePlot, DeleteRoute, GetAreaList, GetPlotList, GetRoute
 import { airSpaceTypes } from '@/utils/options';
 import { hexToRgb } from '@/utils/tools';
 import usePanelStore from '@/store/panel';
-
+import shifei from '@/data/shifei.json'
 const panelStore = usePanelStore()
-
+let shifeiStatus = false;
 onBeforeMount(() => {
   getLists()
 })
@@ -204,6 +204,35 @@ function handleCheck(item, type) {
   })
 }
 
+function handleCheckShiFei(){
+  shifeiStatus = !shifeiStatus;
+  if(shifeiStatus){
+    shifei.forEach((item) =>{
+      showShapes({
+        id:item.attributes.FID,
+        data:[
+          {
+            type: 'polygon',
+            shape:{
+              color:[0,255,0,0.5],
+              height:120,
+              rings:item.geometry.rings
+            }
+          }
+        ]
+      })
+    })
+  }else{
+    shifei.forEach((item) =>{
+      showShapes({
+        id:item.attributes.FID
+      })
+    })
+  }
+}
+
+
+
 function handleDelete(item, type) {
   switch (type) {
     case 'area':