智慧园区前端大屏
shuishen
2024-12-02 0c7f4b05b0deac89be565628b716dfb8e6d45614
风险源,图标显示调整
管网大小,高度调整
2 files modified
2 files added
88 ■■■■ changed files
public/img/mapicon/fxy-jd.png patch | view | raw | blame | history
public/img/mapicon/fxy-yb.png patch | view | raw | blame | history
src/pages/map/components/scomponents/layersControl.vue 74 ●●●● patch | view | raw | blame | history
vite.config.js 14 ●●●● patch | view | raw | blame | history
public/img/mapicon/fxy-jd.png
public/img/mapicon/fxy-yb.png
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: 2024-12-02 19:46:13
 * @LastEditTime: 2024-12-02 21:12:23
 * @FilePath: \bigScreen\src\pages\map\components\scomponents\layersControl.vue
 * @Description:
 *
@@ -236,16 +236,6 @@
        children: [
          // 给水管网、污水管网、燃气管网、雨水管网
          {
            id: '3-3-1',
            label: '给水管网',
            type: 'layer',
            subType: 'geojsonPipe',
            layerName: 'gsgw',
            source: gsgw,
            color: DC.Color.BLUE.withAlpha(0.9),
            height: 65,
          },
          {
            id: '3-3-2',
            label: '污水管网',
            type: 'layer',
@@ -253,17 +243,7 @@
            layerName: 'wsgw',
            source: wsgw,
            color: DC.Color.DARKBLUE.withAlpha(0.9),
            height: 68,
          },
          {
            id: '3-3-3',
            label: '燃气管网',
            type: 'layer',
            subType: 'geojsonPipe',
            layerName: 'rqgw',
            source: rqgw,
            color: DC.Color.RED.withAlpha(0.9),
            height: 71,
            height: 60.2,
          },
          {
            id: '3-3-4',
@@ -273,7 +253,27 @@
            layerName: 'ysgw',
            source: ysgw,
            color: DC.Color.CYAN.withAlpha(0.9),
            height: 75,
            height: 60,
          },
          {
            id: '3-3-1',
            label: '给水管网',
            type: 'layer',
            subType: 'geojsonPipe',
            layerName: 'gsgw',
            source: gsgw,
            color: DC.Color.BLUE.withAlpha(0.9),
            height: 60.4,
          },
          {
            id: '3-3-3',
            label: '燃气管网',
            type: 'layer',
            subType: 'geojsonPipe',
            layerName: 'rqgw',
            source: rqgw,
            color: DC.Color.RED.withAlpha(0.9),
            height: 60.6,
          },
        ]
      },
@@ -478,7 +478,7 @@
        },
        showParams: 'category',
        className: 'fxy-ordinary',
        backgroundIcon: VITE_APP_BASE + 'img/mapicon/fxy.png',
        backgroundIcon: VITE_APP_BASE + 'img/mapicon/fxy-yb.png',
        showPanel: false,
        layerName: 'fxyOrdinary',
        incident: (e) => {
@@ -516,7 +516,7 @@
        },
        showParams: 'category',
        className: 'fxy-larger',
        backgroundIcon: VITE_APP_BASE + 'img/mapicon/fxy.png',
        backgroundIcon: VITE_APP_BASE + 'img/mapicon/fxy-jd.png',
        showPanel: false,
        layerName: 'fxyLarger',
        incident: (e) => {
@@ -685,7 +685,7 @@
          // })
          addTileLayers[item.layerName] = []
          item.urlData.forEach((m, ind) => {
            let tile = new DC.Tileset(m.url, {
            addTileLayers[item.layerName][ind] = new DC.Tileset(m.url, {
              maximumMemoryUsage: 1024,
              maximumScreenSpaceError: 8,
              skipLevels: 5,
@@ -694,13 +694,12 @@
              progressiveResolutionHeightFraction: 0.5,
              baseScreenSpaceError: 1024
            })
            tile.setSplitDirection(1)
            addTileLayers[item.layerName][ind].setSplitDirection(1)
            // tile.setHeight(-420)
            // tile.setSplitDirection(-1)
            window.$viewer.sceneSplit.addTileset(tile)
            tileLayers.addOverlay(tile)
            window.$viewer.sceneSplit.addTileset(addTileLayers[item.layerName][ind])
            tileLayers.addOverlay(addTileLayers[item.layerName][ind])
            window.$viewer.sceneSplit.enable = false
            addTileLayers[item.layerName][ind] = tile
          })
        } else {
          addTileLayers[item.layerName].forEach(m => m.show = true)
@@ -794,7 +793,7 @@
          item.source.features.forEach(i => {
            let polylineVolume = new DC.PolylineVolume(
              i.geometry.coordinates.map(d => [d[0], d[1], item.height].join(',')).join(';'),
              computeCircle(2)
              computeCircle(1.6)
            )
            polylineVolume.setStyle({
@@ -935,15 +934,10 @@
}
onUnmounted(() => {
  if (tileLayers) {
    tileLayers.clear()
    window.$viewer && window.$viewer.removeLayer(tileLayers)
    tileLayers = null
  }
  let arr = Object.keys(addTileLayers)
  arr.forEach(i => {
    if (i == 'hgyq') {
      tileLayers.removeOverlay(addTileLayers[i])
      addTileLayers[i] = null
      delete addTileLayers[i]
    } else {
@@ -953,6 +947,12 @@
    }
  })
  addTileLayers = null
  if (tileLayers) {
    tileLayers.remove()
    window.$viewer && window.$viewer.removeLayer(tileLayers)
    tileLayers = null
  }
  // 弹窗销毁
  destroy()
  addPupoLayers = null
vite.config.js
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2024-10-25 10:56:27
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2024-12-01 21:17:55
 * @LastEditTime: 2024-12-02 19:53:54
 * @FilePath: \bigScreen\vite.config.js
 * @Description: 
 * 
@@ -116,12 +116,12 @@
          rewrite: path => path.replace(/^\/zhyq\/newMx/, ''),
        },
        // '/zhyq/mx': {
        //   // target: 'http://localhost',
        //   target: 'https://wrj.shuixiongit.com/zhyq/mx',
        //   changeOrigin: true,
        //   rewrite: path => path.replace(/^\/zhyq\/mx/, ''),
        // },
        '/zhyq/mx': {
          // target: 'http://localhost',
          target: 'https://wrj.shuixiongit.com/zhyq/mx',
          changeOrigin: true,
          rewrite: path => path.replace(/^\/zhyq\/mx/, ''),
        },
        '/zhyqapi': {
          // target: 'http://localhost:8082',