智慧园区前端大屏
linwe
2024-11-08 c3172c1b618141b538fdd0af4e503246b41f9135
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)
          })