智慧园区前端大屏
shuishen
2024-12-02 d0412e2831b2a9471535cf8a888eafe1b1170c29
突发事件模拟调整
1 files modified
48 ■■■■■ changed files
src/views/pd/components/dynamicPanel.vue 48 ●●●●● 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-02 18:36:34
 * @LastEditTime: 2024-12-02 21:53:13
 * @FilePath: \bigScreen\src\views\pd\components\dynamicPanel.vue
 * @Description: 
 * 
@@ -46,7 +46,7 @@
        lng: 115.10343807,
        lat: 27.27256126
      },
      linePosition: '115.10341051,27.27251643,80;115.10357817,27.27278003,80',
      linePosition: '115.10341051,27.27251643,64;115.10357817,27.27278003,64',
      lineTime: 5000,
      threeContent: '关闭绿源污水处理厂旁雨水排口,拦截污染水体。',
@@ -86,7 +86,7 @@
        lng: 115.10627858,
        lat: 27.29434439
      },
      linePosition: '115.10627726,27.29408853,80;115.10627703,27.29456132,80',
      linePosition: '115.10627726,27.29408853,64;115.10627703,27.29456132,64',
      lineTime: 5000,
      twoContent: '园区关闭北区雨水排口,拦截污染水体。',
@@ -211,10 +211,18 @@
const synth = window.speechSynthesis
const speak = (msg, continueFun = () => { }) => {
  let u = new SpeechSynthesisUtterance()
  u.lang = 'zh-TW'
  let voices = synth.getVoices()
  u.text = msg
  u.rate = 2
  let findObj = voices.some(voice => voice.lang == 'zh-CN')
  if (!findObj) {
    u.lang = 'zh-TW'
  }
  u.onend = () => {
    continueFun()
  }
@@ -347,25 +355,25 @@
}
const createLinePath = (item, cb = () => { }) => {
  lineTime = setTimeout(() => {
    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
    })
  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)
    window.$viewer.flyToPosition(new DC.Position(item.lineCenter.lng, item.lineCenter.lat, 400, 0, -90, 0), () => {
  window.$viewer.flyToPosition(new DC.Position(item.lineCenter.lng, item.lineCenter.lat, 400, 0, -90, 0), () => {
    lineTime = setTimeout(() => {
      cb()
    }, 3)
  }, item.lineTime)
    }, item.lineTime)
  }, 3)
}
const schemeStart = (item) => {