智慧园区前端大屏
shuishen
2024-12-26 f7da5040d8894048d8c8116a8f372fcfc1236ec6
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-25 15:32:04
 * @LastEditTime: 2024-12-26 12:41:25
 * @FilePath: \bigScreen\src\pages\map\components\scomponents\layersControl.vue
 * @Description:
 *
@@ -411,7 +411,7 @@
        layerName: 'ysgw',
        source: ysgw,
        color: DC.Color.CYAN.withAlpha(0.9),
        height: 60,
        height: 48,
      },
    ]
  },
@@ -501,46 +501,46 @@
        }
      },
      // {
      //   parentId: '4',
      //   id: '4-9',
      //   label: '暂定',
      //   type: 'layer',
      //   subType: 'labelPoint',
      //   method: getRiskList,
      //   params: {
      //     riskLevel: 9,
      //     size: 1000
      //   },
      //   showParams: 'category',
      //   className: 'fxy-zd',
      //   backgroundIcon: VITE_APP_BASE + 'img/mapicon/fxy-zd.png',
      //   showPanel: false,
      //   layerName: 'fxyZdLarger',
      //   incident: (e) => {
      //     const { attrParams } = e.overlay
      //     // 删除
      //     destroyPop()
      //     addPopLayers[attrParams.name] = new DC.HtmlLayer(attrParams.name)
      //     window.$viewer.addLayer(addPopLayers[attrParams.name])
      //     let iconEl = `<div class="marsBlueGradientPnl">
      //       <li>${attrParams.firmName || ''}</li>
      //       <li>${attrParams.name || ''}</li>
      //       <li>${attrParams.riskLevelName || ''}</li>
      //       </div>`
      //     let divIcon = new DC.DivIcon(
      //       new DC.Position(attrParams.lng, attrParams.lat, attrParams.ele || 64),
      //       `<div class="public-map-popup-three">
      //               ${iconEl}
      //             </div>`
      //     )
      //     let incident = () => {
      //       destroyPop()
      //     }
      //     divIcon.on(DC.MouseEventType.CLICK, incident)
      //     addPopLayers[attrParams.name].addOverlay(divIcon)
      //   }
      // }
      {
        parentId: '4',
        id: '4-9',
        label: '其他',
        type: 'layer',
        subType: 'labelPoint',
        method: getRiskList,
        params: {
          riskLevel: 9,
          size: 1000
        },
        showParams: 'category',
        className: 'fxy-zd',
        backgroundIcon: VITE_APP_BASE + 'img/mapicon/fxy-zd.png',
        showPanel: false,
        layerName: 'fxyZdLarger',
        incident: (e) => {
          const { attrParams } = e.overlay
          // 删除
          destroyPop()
          addPopLayers[attrParams.name] = new DC.HtmlLayer(attrParams.name)
          window.$viewer.addLayer(addPopLayers[attrParams.name])
          let iconEl = `<div class="marsBlueGradientPnl">
            <li>${attrParams.firmName || ''}</li>
            <li>${attrParams.name || ''}</li>
            <li>${attrParams.riskLevelName || ''}</li>
            </div>`
          let divIcon = new DC.DivIcon(
            new DC.Position(attrParams.lng, attrParams.lat, attrParams.ele || 64),
            `<div class="public-map-popup-three">
                    ${iconEl}
                  </div>`
          )
          let incident = () => {
            destroyPop()
          }
          divIcon.on(DC.MouseEventType.CLICK, incident)
          addPopLayers[attrParams.name].addOverlay(divIcon)
        }
      }
    ]
  },