智慧园区前端大屏
shuishen
2024-12-18 9a37c5e1b2190c3f6ec71483923922189091dd52
事件模拟更新
1 files modified
44 ■■■■■ changed files
src/views/pd/components/dynamicPanel.vue 44 ●●●●● patch | view | raw | blame | history
src/views/pd/components/dynamicPanel.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2024-11-09 15:41:35
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2024-12-17 19:00:23
 * @LastEditTime: 2024-12-18 09:39:00
 * @FilePath: \bigScreen\src\views\pd\components\dynamicPanel.vue
 * @Description: 
 * 
@@ -414,19 +414,33 @@
}
const createLinePath = (item, cb = () => { }) => {
  let polyline = new DC.Polyline(item.linePosition)
  polyline.setStyle({
    width: 20,
    material: new DC.PolylineImageTrailMaterialProperty({
      color: DC.Color.RED,
      speed: 20,
      image: VITE_APP_BASE + 'img/mapicon/right.png',
      repeat: { x: 5, y: 1 }
    }),
    clampToGround: false
  })
  if (item.linePosition) {
    let polyline = new DC.Polyline(item.linePosition)
    polyline.setStyle({
      width: 20,
      material: new DC.PolylineImageTrailMaterialProperty({
        color: DC.Color.RED,
        speed: 20,
        image: VITE_APP_BASE + 'img/mapicon/right.png',
        repeat: { x: 5, y: 1 }
      }),
      clampToGround: false
    })
  dynamicLineVectorLayer.addOverlay(polyline)
    dynamicLineVectorLayer.addOverlay(polyline)
  } else {
    let threeCenter = DC.Position.fromObject(item.threePointPosition)
    let threeCircle = new DC.Circle(threeCenter, 30)
    threeCircle.setStyle({
      material: new DC.CircleWaveMaterialProperty({
        color: DC.Color.fromRandom(),
        speed: 20,
        count: 5,
        gradient: 0.5
      })
    })
    dynamicVectorLayer.addOverlay(threeCircle)
  }
  let threeContent = new DC.DivIcon(
    new DC.Position(item.threePointPosition.lng, item.threePointPosition.lat, 70),
@@ -516,7 +530,9 @@
          })
        } else {
          twoFun(item, () => {
            publicFun(item)
            createLinePath(item, () => {
              publicFun(item)
            })
          })
        }
      })