From 6d932472d41bcb6dbcb3a5e6791c1a40e93cafbe Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Sat, 04 Jan 2025 20:17:49 +0800
Subject: [PATCH] 图层控制-应急空间更新

---
 src/api/space/space.js                                 |   64 +++++++++++++--------
 src/pages/map/components/scomponents/layersControl.vue |   97 ++++++--------------------------
 2 files changed, 59 insertions(+), 102 deletions(-)

diff --git a/src/api/space/space.js b/src/api/space/space.js
index 59ad24a..9492e64 100644
--- a/src/api/space/space.js
+++ b/src/api/space/space.js
@@ -1,30 +1,46 @@
+/*
+ * @Author: shuishen 1109946754@qq.com
+ * @Date: 2025-01-04 20:09:53
+ * @LastEditors: shuishen 1109946754@qq.com
+ * @LastEditTime: 2025-01-04 20:11:47
+ * @FilePath: \bigScreen\src\api\space\space.js
+ * @Description: 
+ * 
+ * Copyright (c) 2025 by shuishen, All Rights Reserved. 
+ */
 import request from 'utils/http'
 
 export const getDetail = (params) => {
-    const url = `/yw/emergencySpace/getDetail`;
-    return request({
-        url,
-        method: 'get',
-        params,
-    });
-};
-
-
-
+  const url = `/yw/emergencySpace/getDetail`
+  return request({
+    url,
+    method: 'get',
+    params,
+  })
+}
 
 export const getList = (params) => {
-    const url = `/yw/emergencySpace/page`;
-    return request({
-        url,
-        method: 'get',
-        params,
-    });
-};
+  const url = `/yw/emergencySpace/page`
+  return request({
+    url,
+    method: 'get',
+    params,
+  })
+}
 export const getGouQu = (params) => {
-    const url = `/yw/emergencySpace/page`;
-    return request({
-        url,
-        method: 'get',
-        params,
-    });
-};
\ No newline at end of file
+  const url = `/yw/emergencySpace/page`
+  return request({
+    url,
+    method: 'get',
+    params,
+  })
+}
+
+export const updateSpace = (data) => {
+  const url = `/yw/emergencySpace/update`
+  return request({
+    url,
+    method: 'post',
+    data,
+  })
+}
\ No newline at end of file
diff --git a/src/pages/map/components/scomponents/layersControl.vue b/src/pages/map/components/scomponents/layersControl.vue
index 18a790a..5a3783a 100644
--- a/src/pages/map/components/scomponents/layersControl.vue
+++ b/src/pages/map/components/scomponents/layersControl.vue
@@ -2,7 +2,7 @@
  * @Author: shuishen 1109946754@qq.com
  * @Date: 2024-10-31 10:47:29
  * @LastEditors: shuishen 1109946754@qq.com
- * @LastEditTime: 2025-01-04 20:06:31
+ * @LastEditTime: 2025-01-04 20:17:26
  * @FilePath: \bigScreen\src\pages\map\components\scomponents\layersControl.vue
  * @Description:
  *
@@ -149,19 +149,19 @@
     children: [
       {
         parentId: '3',
-        id: '3-2',
-        label: '事故应急池',
+        id: '3-1',
+        label: '雨水池',
         type: 'layer',
         subType: 'labelPoint',
         method: getList,
         params: {
-          type: 2,
+          type: 1,
           size: 1000,
         },
         backgroundIcon: VITE_APP_BASE + 'img/mapicon/yjc.png',
         className: 'yjc-box',
         showPanel: false,
-        layerName: 'sg-yjc',
+        layerName: 'cq-yssjc',
         incident: (e) => {
           const { attrParams } = e.overlay
           // 删除
@@ -191,19 +191,19 @@
 
       {
         parentId: '3',
-        id: '3-1',
-        label: '初期雨水收集池',
+        id: '3-2',
+        label: '应急池',
         type: 'layer',
         subType: 'labelPoint',
         method: getList,
         params: {
-          type: 1,
+          type: 2,
           size: 1000,
         },
         backgroundIcon: VITE_APP_BASE + 'img/mapicon/yjc.png',
         className: 'yjc-box',
         showPanel: false,
-        layerName: 'cq-yssjc',
+        layerName: 'sg-yjc',
         incident: (e) => {
           const { attrParams } = e.overlay
           // 删除
@@ -291,48 +291,6 @@
 
       {
         parentId: '3',
-        id: '3-5',
-        label: '水库',
-        type: 'layer',
-        subType: 'labelPoint',
-        method: getList,
-        params: {
-          type: 5,
-          size: 1000
-        },
-        backgroundIcon: VITE_APP_BASE + 'img/mapicon/sk.png',
-        className: 'sk-box',
-        showPanel: false,
-        layerName: 'sk',
-        incident: (e) => {
-          const { attrParams } = e.overlay
-          // 删除
-          destroyPop()
-          if (!attrParams.imageUrl) {
-            return
-          }
-          addPopLayers[attrParams.name] = new DC.HtmlLayer(attrParams.name)
-          window.$viewer.addLayer(addPopLayers[attrParams.name])
-          let iconEl = `<div class="marsBlueGradientPnl">
-                   <div>${attrParams.firmName}</div>
-                  <img src="${attrParams.imageUrl}" width="160" height="160" />
-                </div>`
-          let divIcon = new DC.DivIcon(
-            new DC.Position(attrParams.lng, attrParams.lat, attrParams.ele || 64),
-            `<div class="public-map-popup-two">
-                    ${iconEl}
-                  </div>`
-          )
-          let incident = () => {
-            destroyPop()
-          }
-          divIcon.on(DC.MouseEventType.CLICK, incident)
-          addPopLayers[attrParams.name].addOverlay(divIcon)
-        }
-      },
-
-      {
-        parentId: '3',
         id: '3-6',
         label: '坑塘',
         type: 'layer',
@@ -376,23 +334,6 @@
       {
         parentId: '3',
         id: '3-7',
-        label: '洼地',
-        type: 'layer',
-        subType: 'labelPoint',
-        method: getList,
-        params: {
-          type: 7,
-          size: 1000
-        },
-        backgroundIcon: VITE_APP_BASE + 'img/mapicon/wd.png',
-        className: 'xfs-box',
-        showPanel: false,
-        layerName: 'wd'
-      },
-
-      {
-        parentId: '3',
-        id: '3-8',
         label: '桥梁',
         type: 'layer',
         subType: 'labelPoint',
@@ -407,7 +348,7 @@
         layerName: 'ql'
       },
 
-      {
+      /* {
         parentId: '3',
         id: '3-9',
         label: '雨水管网',
@@ -417,7 +358,7 @@
         source: ysgw,
         color: DC.Color.CYAN.withAlpha(0.9),
         height: 48,
-      },
+      }, */
     ]
   },
 
@@ -549,14 +490,14 @@
     ]
   },
 
-  {
-    id: '5',
-    label: '园区范围',
-    type: 'layer',
-    subType: 'geojsonWall',
-    layerName: 'yqfw',
-    source: yqfw
-  },
+  // {
+  //   id: '5',
+  //   label: '园区范围',
+  //   type: 'layer',
+  //   subType: 'geojsonWall',
+  //   layerName: 'yqfw',
+  //   source: yqfw
+  // },
 
   {
     id: '7',

--
Gitblit v1.9.3