智慧园区前端大屏
shuishen
2024-11-18 4a663525553b07a9eed93aeb409b6c7db29bca44
公共管网加载调整
1 files modified
123 ■■■■ changed files
src/pages/layout/components/scomponents/layersControl.vue 123 ●●●● patch | view | raw | blame | history
src/pages/layout/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-11-15 14:57:14
 * @LastEditTime: 2024-11-18 17:07:09
 * @FilePath: \bigScreen\src\pages\layout\components\scomponents\layersControl.vue
 * @Description:
 *
@@ -139,6 +139,9 @@
          type: 1,
          size: 1000
        },
        backgroundIcon: VITE_APP_BASE + 'img/mapicon/yjc.png',
        className: 'yjc-box',
        showPanel: false,
        layerName: 'yjc'
      },
      {
@@ -151,20 +154,58 @@
          type: 2,
          size: 1000
        },
        backgroundIcon: VITE_APP_BASE + 'img/mapicon/ysf.png',
        className: 'ysf-box',
        showPanel: false,
        layerName: 'fm'
      },
      {
        id: '3-3',
        label: '公共管网',
        type: 'layer',
        subType: 'labelPoint',
        method: getList,
        params: {
          type: 3,
          size: 1000
        },
        layerName: 'gggw'
        children: [
          // 给水管网、污水管网、燃气管网、雨水管网
          {
            id: '3-3-1',
            label: '给水管网',
            type: 'layer',
            subType: 'geojsonPipe',
            layerName: 'gsgw',
            source: gsgw,
            color: DC.Color.BLUE,
            height: 5,
          },
          {
            id: '3-3-2',
            label: '污水管网',
            type: 'layer',
            subType: 'geojsonPipe',
            layerName: 'wsgw',
            source: wsgw,
            color: DC.Color.BLACK,
            height: 10,
          },
          {
            id: '3-3-3',
            label: '燃气管网',
            type: 'layer',
            subType: 'geojsonPipe',
            layerName: 'rqgw',
            source: rqgw,
            color: DC.Color.RED,
            height: 15,
          },
          {
            id: '3-3-4',
            label: '雨水管网',
            type: 'layer',
            subType: 'geojsonPipe',
            layerName: 'ysgw',
            source: ysgw,
            color: DC.Color.CYAN,
            height: 20,
          },
        ]
      },
      {
@@ -190,6 +231,9 @@
          type: 5,
          size: 1000
        },
        backgroundIcon: VITE_APP_BASE + 'img/mapicon/sk.png',
        className: 'sk-box',
        showPanel: false,
        layerName: 'sk'
      },
@@ -203,6 +247,9 @@
          type: 6,
          size: 1000
        },
        backgroundIcon: VITE_APP_BASE + 'img/mapicon/yjb.png',
        className: 'yjb-box',
        showPanel: false,
        layerName: 'yjb'
      },
@@ -216,6 +263,9 @@
          type: 7,
          size: 1000
        },
        backgroundIcon: VITE_APP_BASE + 'img/mapicon/xfs.png',
        className: 'xfs-box',
        showPanel: false,
        layerName: 'xfs'
      }
    ]
@@ -244,55 +294,6 @@
    subType: 'geojsonWall',
    layerName: 'yqfw',
    source: yqfw
  },
  {
    id: '6',
    label: '地下管网',
    children: [
      // 给水管网、污水管网、燃气管网、雨水管网
      {
        id: '6-1',
        label: '给水管网',
        type: 'layer',
        subType: 'geojsonPipe',
        layerName: 'gsgw',
        source: gsgw,
        color: DC.Color.BLUE,
        height: 5,
      },
      {
        id: '6-2',
        label: '污水管网',
        type: 'layer',
        subType: 'geojsonPipe',
        layerName: 'wsgw',
        source: wsgw,
        color: DC.Color.BLACK,
        height: 10,
      },
      {
        id: '6-3',
        label: '燃气管网',
        type: 'layer',
        subType: 'geojsonPipe',
        layerName: 'rqgw',
        source: rqgw,
        color: DC.Color.RED,
        height: 15,
      },
      {
        id: '6-4',
        label: '雨水管网',
        type: 'layer',
        subType: 'geojsonPipe',
        layerName: 'ysgw',
        source: ysgw,
        color: DC.Color.CYAN,
        height: 20,
      },
    ]
  },
  {
@@ -419,7 +420,7 @@
              }
              let divIcon = new DC.DivIcon(
                new DC.Position(i.lng, i.lat, 0),
                new DC.Position(i.lng, i.lat, 64),
                `<div class="public-map-popup ${item.className || ''}">
                    ${iconEl}
                  </div>`
@@ -545,11 +546,13 @@
const restHandleDelChange = (key) => {
  let checkIds = treeRef.value?.getCheckedKeys()
  console.log(checkIds, key)
  if (!checkIds.some(i => i == key)) {
    return
  }
  treeRef.value?.setCheckedKeys(checkIds.filter(i => i != key))
  treeRef.value?.setCheckedKeys(checkIds.filter(i => i.indexOf(key)))
  handleCheckChange([findObjectById(data, key)])
}