智慧园区前端大屏
shuishen
2024-11-22 8e72ebbb44dba3ec5cf6dd3cd2613e6e9aed31ef
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-22 14:52:56
 * @LastEditTime: 2024-11-22 15:37:11
 * @FilePath: \bigScreen\src\pages\layout\components\scomponents\layersControl.vue
 * @Description:
 *
@@ -74,7 +74,7 @@
const { VITE_APP_BASE } = import.meta.env
let indexPoint = ref(['1'])
let indexPoint = ref(['5', '7', '1'])
const treeRef = ref(null)
const Cesium = DC.getLib('Cesium')
@@ -169,7 +169,7 @@
          addPupoLayers[attrParams.name] = new DC.HtmlLayer(attrParams.name)
          window.$viewer.addLayer(addPupoLayers[attrParams.name])
          let iconEl = `<div class="marsBlueGradientPnl">
            <div>${attrParams.fullName}</div>
            <div>${attrParams.fullName}</div>
            <img src="${attrParams.imageUrl}" />
                </div>`
          let divIcon = new DC.DivIcon(
@@ -598,7 +598,6 @@
        } else {
          window.addTileLayers[item.layerName].forEach(i => i.show = true)
        }
        // window.$viewer.flyTo(window.addTileLayers[item.layerName][0])
      } else if (item.subType == 'labelPoint') {
        if (!window.addTileLayers[item.layerName]) {
          window.addTileLayers[item.layerName] = new DC.HtmlLayer(item.layerName)
@@ -660,7 +659,7 @@
            wall.setStyle({
              material: new DC.WallTrailMaterialProperty({
                color: Cesium.Color.fromBytes(0, 123, 255, 180),
                speed: 10
                speed: 8
              })
            })
            window.addTileLayers[item.layerName].addOverlay(wall)
@@ -668,6 +667,8 @@
        } else {
          window.addTileLayers[item.layerName].show = true
        }
        window.$viewer.flyTo(addTileLayers[item.layerName])
        console.log(addTileLayers[item.layerName], "22222222222222222222222222222222")
      } else if (item.subType == 'geojsonPipe') {
        if (!window.addTileLayers[item.layerName]) {
          window.addTileLayers[item.layerName] = new DC.VectorLayer(item.layerName)