From c3172c1b618141b538fdd0af4e503246b41f9135 Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Fri, 08 Nov 2024 17:15:32 +0800
Subject: [PATCH] 管网

---
 src/views/layout/components/scomponents/layersControl.vue |   55 +++++++++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 49 insertions(+), 6 deletions(-)

diff --git a/src/views/layout/components/scomponents/layersControl.vue b/src/views/layout/components/scomponents/layersControl.vue
index 32b9571..240b3ab 100644
--- a/src/views/layout/components/scomponents/layersControl.vue
+++ b/src/views/layout/components/scomponents/layersControl.vue
@@ -50,7 +50,10 @@
 import { getList } from "@/api/space/space"
 import { getList as getRiskList } from "@/api/riskSource/riskSource"
 import yqfw from "@/assets/json/yqfw"
-import pipeLine from "@/assets/json/line"
+import gsgw from "@/assets/json/gsgw"
+import rqgw from "@/assets/json/rqgw"
+import wsgw from "@/assets/json/wsgw"
+import ysgw from "@/assets/json/ysgw"
 import { onUnmounted } from 'vue'
 
 const { VITE_APP_BASE } = import.meta.env
@@ -205,10 +208,50 @@
   {
     id: '6',
     label: '地下管网',
-    type: 'layer',
-    subType: 'geojsonPipe',
-    layerName: 'dxgw',
-    source: pipeLine
+    children: [
+      // 给水管网、污水管网、燃气管网、雨水管网
+      {
+        id: '6-1',
+        label: '给水管网',
+        type: 'layer',
+        subType: 'geojsonPipe',
+        layerName: 'gsgw',
+        source: gsgw,
+        color: DC.Color.BLUE,
+        height: 1,
+      },
+      {
+        id: '6-2',
+        label: '污水管网',
+        type: 'layer',
+        subType: 'geojsonPipe',
+        layerName: 'wsgw',
+        source: wsgw,
+        color: DC.Color.BLACK,
+        height: 2,
+      },
+      {
+        id: '6-3',
+        label: '燃气管网',
+        type: 'layer',
+        subType: 'geojsonPipe',
+        layerName: 'rqgw',
+        source: rqgw,
+        color: DC.Color.RED,
+        height: 3,
+      },
+      {
+        id: '6-4',
+        label: '雨水管网',
+        type: 'layer',
+        subType: 'geojsonPipe',
+        layerName: 'ysgw',
+        source: ysgw,
+        color: DC.Color.CYAN,
+        height: 4,
+      },
+
+    ]
   },
 ]
 
@@ -351,7 +394,7 @@
             )
 
             polylineVolume.setStyle({
-              material: DC.Color.RED
+              material: item.color
             })
             addTileLayers[item.layerName].addOverlay(polylineVolume)
           })

--
Gitblit v1.9.3