Kaynağa Gözat

功能修改20250308-01

zhiyuan-007 1 ay önce
ebeveyn
işleme
5fcb190314

+ 27 - 0
src/service/http.js

@@ -221,6 +221,33 @@ export function selectJzgdCount() {
 
 /* ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ new add ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ */
 
+
+//删除空域
+export function DeleteArea(id) {
+    return requestNetPost({
+        url: '/pg/airSpace/'+ id,
+        method:"delete"
+    })
+}
+
+//删除航线
+export function DeleteRoute(id) {
+    return requestNetPost({
+        url: '/pg/airLine/'+ id,
+        method:"delete"
+    })
+}
+
+//删除起降场
+export function DeletePlot(id) {
+    return requestNetPost({
+        url: '/pg/airPort/'+ id,
+        method:"delete"
+    })
+}
+
+
+
 // 空域列表
 export function GetAreaList() {
     return requestNetPost({

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

@@ -551,6 +551,10 @@ export async function AddSingleLayer(params) {
         "type": "scene",
         "theme": "高度",
         "popupEnabled": false,
+        "elevationInfo":{   //下沉高度
+          mode:"absolute-height",
+          offset:-3.5
+        },
         "renderer": {
           "type": "class-breaks",
           "field": "HEIGHT",

+ 4 - 3
src/views/home/cpns/PanelHxhs.vue

@@ -36,9 +36,9 @@
               <el-radio label="导入航线" value="03" />
             </el-radio-group>
           </el-form-item>
-          <div v-if="form.dataType === '01'" class="msg-draw">
+          <div v-if="form.dataType === '01'" @click="changeDataType()"  class="msg-draw">
             <img src="../../../assets/images/page/icon-draw.png" alt="">
-            <span>地图绘制功能已开启</span>
+            <span>重新绘制</span>
           </div>
           <template v-if="form.dataType === '02'">
             <el-form-item label="起飞场" prop="fromPort">
@@ -510,7 +510,7 @@ function getDrawGeometry(){
       path.forEach((item) => {
         flyPathArr.push([item[0],item[1],(form.value.height1 + form.value.height2)/2 ]);
       });
-      flyPathArr.push(path[path.length-1]);
+      flyPathArr.push([path[path.length-1][0],path[path.length-1][1],0]);
       showAndRedrawPath({
         status:"show",
         path:flyPathArr
@@ -531,6 +531,7 @@ function getDrawGeometry(){
 }
 
 function changeDataType(){
+  debugger
   if(form.value.dataType == '01'){ //手动
     autoHeight = true;
     showAndRedrawPath({

+ 3 - 3
src/views/home/cpns/PanelQjchs.vue

@@ -161,7 +161,7 @@ const form = ref({
   aircraftType: '01',
   dataType: '手动划设',
   type: '长期',
-  drawType: 'mesh',
+  drawType: 'funnel',
   height: '100',
   topHeight: '110',
   bottomHeight: '60',
@@ -170,9 +170,9 @@ const form = ref({
 })
 
 const drawTypes = [
-  { label: '圆台', value: 'mesh', geoType: '6', shapeType: 'frustum-cone' },
-  { label: '圆锥', value: 'point', geoType: '4', shapeType: 'inverted-cone' },
   { label: '漏斗', value: 'funnel', geoType: '5', shapeType: 'funnel' },
+  { label: '圆台', value: 'mesh', geoType: '6', shapeType: 'frustum-cone' },
+  { label: '圆锥', value: 'point', geoType: '4', shapeType: 'inverted-cone' }
 ]
 
 const rules = {

+ 39 - 1
src/views/home/cpns/PanelSjwg.vue

@@ -35,6 +35,7 @@
               <span>{{ item.name }}</span>
               <i title="查看" @click="handleCheck(item, 'area')" :class="{ 'active': item.check }"></i>
               <i title="网格" @click="handleMesh(item, 'area')" :class="{ 'active': item.mesh }"></i>
+              <i title="删除" @click="handleDelete(item, 'area')"></i>
             </li>
           </ul>
         </Transition>
@@ -51,6 +52,7 @@
               <span>{{ item.name }}</span>
               <i title="查看" @click="handleCheck(item, 'route')" :class="{ 'active': item.check }"></i>
               <i title="网格" @click="handleMesh(item, 'route')" :class="{ 'active': item.mesh }"></i>
+              <i title="删除" @click="handleDelete(item, 'area')"></i>
             </li>
           </ul>
         </Transition>
@@ -67,6 +69,7 @@
               <span>{{ item.name }}</span>
               <i title="查看" @click="handleCheck(item, 'plot')" :class="{ 'active': item.check }"></i>
               <i title="网格" @click="handleMesh(item, 'plot')" :class="{ 'active': item.mesh }"></i>
+              <i title="删除" @click="handleDelete(item, 'area')"></i>
             </li>
           </ul>
         </Transition>
@@ -79,9 +82,10 @@
 import { getAssetsFile, getData } from '@/utils/require';
 import { onBeforeMount, onBeforeUnmount, reactive, ref } from 'vue';
 import { showShapes, heatMap, AddSingleLayer, InspectCube } from '@/utils/map/addLayer'
-import { GetAreaList, GetPlotList, GetRouteList } from '@/service/http'
+import {DeleteArea, DeletePlot, DeleteRoute, GetAreaList, GetPlotList, GetRouteList} from '@/service/http'
 import { airSpaceTypes } from '@/utils/options';
 import { hexToRgb } from '@/utils/tools';
+import {ElMessage} from "element-plus";
 
 onBeforeMount(() => {
   getLists()
@@ -193,6 +197,37 @@ function handleCheck(item, type) {
   })
 }
 
+function handleDelete(item, type){
+  debugger
+  switch(type) {
+    case 'area':
+      DeleteArea(item.id).then(res => {
+        if (res.data.code === 200) {
+          ElMessage.success('删除成功')
+          getLists()
+        }
+      })
+      break;
+    case 'plot':
+      DeletePlot(item.id).then(res => {
+        if (res.data.code === 200) {
+          ElMessage.success('删除成功')
+          getLists()
+        }
+      })
+      break;
+    case 'route':
+      DeleteRoute(item.id).then(res => {
+        if (res.data.code === 200) {
+          ElMessage.success('删除成功')
+          getLists()
+        }
+      })
+  }
+}
+
+
+
 function handleMesh(item) {
   item.mesh = !item.mesh
   InspectCube({
@@ -381,5 +416,8 @@ const vCollapse = {
   i:nth-child(4) {
     background: url('../../../assets/images/page/btn-mesh.png');
   }
+  i:nth-child(5) {
+    background: url('../../../assets/images/page/btn-delete.png');
+  }
 }
 </style>