智慧园区前端大屏
shuishen
2025-08-06 3b10270c0dcc71faef1a67ea74971f2f29dc202a
周边检索及突发事件模拟调整
1 files modified
4 files added
1822 ■■■■■ changed files
src/views/pd/components/dynamicPanel.vue 1283 ●●●● patch | view | raw | blame | history
src/views/rim/components/box/dataContent.vue 369 ●●●●● patch | view | raw | blame | history
src/views/rim/components/leftContainer.vue 34 ●●●●● patch | view | raw | blame | history
src/views/rim/components/rightContainer.vue 107 ●●●●● patch | view | raw | blame | history
src/views/rim/index.vue 29 ●●●●● patch | view | raw | blame | history
src/views/pd/components/dynamicPanel.vue
@@ -2,15 +2,15 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2024-11-09 15:41:35
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2025-02-12 20:00:22
 * @FilePath: \bigScreen\src\views\pd\components\dynamicPanel.vue
 * @LastEditTime: 2025-08-06 00:09:39
 * @FilePath: \jsProject\bigScreen\src\views\pd\components\dynamicPanel.vue
 * @Description: 
 * 
 * Copyright (c) 2024 by shuishen, All Rights Reserved. 
-->
<script setup>
import EventBus from 'utils/bus'
import qysgwslx from "@/assets/json/qysgwslx"
const { VITE_APP_BASE } = import.meta.env
const emit = defineEmits(['closePanel'])
@@ -24,7 +24,7 @@
const pointStore = usePointStore()
onMounted(() => {
  pointStore.updateSharedData(1)
    pointStore.updateSharedData(1)
})
let lineTime = null
@@ -36,110 +36,111 @@
let timeSix = null
const panelData = reactive({
  data: [
    {
      type: 'demo',
      key: 1,
      title: '典型案例',
      content: '化工园区罐区泄漏事故: 化工园区某企业储罐泄漏,如不采取措施,将造成污染事故,影响到长江下游水质。',
    data: [
        {
            type: 'demo',
            key: 1,
            title: '典型案例',
            content: '化工园区罐区泄漏事故: 化工园区某企业储罐泄漏,如不采取措施,将造成污染事故,影响到长江下游水质。',
      oneCentent: '2024年11月11日11时,化工园区某企业储罐泄漏。企业关闭前置阀门切断泄漏源,向罐内适量注水,抬高液位。',
      onePointPosition: {
        lng: 115.60652633,
        lat: 29.80893013,
        alt: 19
      },
      onetime: 0,
            oneCentent: '2024年11月11日11时,化工园区某企业储罐泄漏。企业关闭前置阀门切断泄漏源,向罐内适量注水,抬高液位。',
            onePointPosition: {
                lng: 115.60652633,
                lat: 29.80893013,
                alt: 19
            },
            onetime: 0,
      twoContent: '启动应急池的使用,将泄漏的化学原料引导至应急池中。',
      twoPointPosition: {
        lng: 115.6074303,
        lat: 29.80929992,
        alt: 17
      },
      twotime: 5000,
            twoContent: '启动应急池的使用,将泄漏的化学原料引导至应急池中。',
            twoPointPosition: {
                lng: 115.6074303,
                lat: 29.80929992,
                alt: 17
            },
            twotime: 5000,
      lineCenter: {
        lng: 115.60786813,
        lat: 29.80937902,
        alt: 30
      },
      linePosition: '115.60783535,29.80913790,30;115.60782622,29.80955698,30',
      lineTime: 5000,
      threeContent: '企业采取紧急措施后,还有部分松节油进入厂外雨水管网。',
      threePointPosition: {
        lng: 115.60782622,
        lat: 29.80955698,
        alt: 30
      },
      threetime: 15000,
            lineCenter: {
                lng: 115.60786813,
                lat: 29.80937902,
                alt: 30
            },
            linePosition: '115.60783535,29.80913790,30;115.60782622,29.80955698,30',
            lineTime: 5000,
            threeContent: '企业采取紧急措施后,还有部分松节油进入厂外雨水管网。',
            threePointPosition: {
                lng: 115.60782622,
                lat: 29.80955698,
                alt: 30
            },
            threetime: 15000,
      fourContent: '关闭园区闸坝,拦截污染水体。',
      fourPointPosition: {
        lng: 115.6269944,
        lat: 29.80695862,
        alt: 5
      },
      fourtime: 15000,
            fourContent: '关闭园区闸坝,拦截污染水体。',
            fourPointPosition: {
                lng: 115.6269944,
                lat: 29.80695862,
                alt: 5
            },
            fourtime: 15000,
      fiveContent: '应急指挥部指导企业处理受污染废水, 监测公共应急池水质 ,根据水质情况分批次进入生化系统处理。',
      fivePointPosition: {
        lng: 115.62761928,
        lat: 29.80836521,
        alt: 7
      },
      fivetime: 20000,
    },
            fiveContent: '应急指挥部指导企业处理受污染废水, 监测公共应急池水质 ,根据水质情况分批次进入生化系统处理。',
            fivePointPosition: {
                lng: 115.62761928,
                lat: 29.80836521,
                alt: 7
            },
            fivetime: 20000,
        },
    {
      type: 'custom',
      key: 2,
      title: '自定义案例',
      content: '自定义风险源:化工园区某企业发生化学原料危害品泄漏,如不采取措施,将造成污染事故,影响到长江下游水质',
    },
  ]
        {
            type: 'custom',
            key: 2,
            title: '自定义案例',
            content: '自定义风险源:化工园区某企业发生化学原料危害品泄漏,如不采取措施,将造成污染事故,影响到长江下游水质',
        },
    ]
})
let dynamicVectorLayer = new DC.VectorLayer('dynamicVectorLayer').addTo(window.$viewer)
let dynamicHtmlLayer = new DC.HtmlLayer('dynamicHtmlLayer').addTo(window.$viewer)
let dynamicLineVectorLayer = new DC.VectorLayer('dynamicLineVectorLayer').addTo(window.$viewer)
let qyWsLayer = new DC.VectorLayer('qyWsLayer').addTo(window.$viewer)
let modelPosition = [
  {
    lng: 115.10640155,
    lat: 27.28121605
  },
  {
    lng: 115.10641953,
    lat: 27.28084006
  },
  {
    lng: 115.10641886,
    lat: 27.28026147
  },
  {
    lng: 115.10642486,
    lat: 27.27994712,
  },
  {
    lng: 115.10640964,
    lat: 27.27928393,
  },
  {
    lng: 115.10639803,
    lat: 27.27848014
  }
    {
        lng: 115.10640155,
        lat: 27.28121605
    },
    {
        lng: 115.10641953,
        lat: 27.28084006
    },
    {
        lng: 115.10641886,
        lat: 27.28026147
    },
    {
        lng: 115.10642486,
        lat: 27.27994712,
    },
    {
        lng: 115.10640964,
        lat: 27.27928393,
    },
    {
        lng: 115.10639803,
        lat: 27.27848014
    }
]
let positions = modelPosition.map(i => [i.lng, i.lat, i.ele || 64].join(',')).join(';')
let tc = new DC.TrackController(window.$viewer)
let track = new DC.Track(positions, 5)
track.setModel(VITE_APP_BASE + 'gltf/car.gltf', {
  show: true,
  scale: 0.0025,
  // nodeTransformations: {
  //   rotation: window.$Cesium.Quaternion.fromHeadingPitchRoll(window.$Cesium.Math.toRadians(0), window.$Cesium.Math.toRadians(0), window.$Cesium.Math.toRadians(0)),
  // }
    show: true,
    scale: 0.0025,
    // nodeTransformations: {
    //   rotation: window.$Cesium.Quaternion.fromHeadingPitchRoll(window.$Cesium.Math.toRadians(0), window.$Cesium.Math.toRadians(0), window.$Cesium.Math.toRadians(0)),
    // }
})
tc.addTrack(track)
@@ -148,40 +149,40 @@
const synth = window.speechSynthesis
const speak = (msg, continueFun = () => { }) => {
  let u = new SpeechSynthesisUtterance()
  let voices = synth.getVoices()
  u.text = msg
  u.rate = 1.2
  let findObj = voices.some(voice => voice.lang == 'zh-CN')
    let u = new SpeechSynthesisUtterance()
    let voices = synth.getVoices()
    u.text = msg
    u.rate = 1.2
    let findObj = voices.some(voice => voice.lang == 'zh-CN')
  if (!findObj) {
    u.lang = 'zh-TW'
  }
    if (!findObj) {
        u.lang = 'zh-TW'
    }
  u.onend = () => {
    continueFun()
  }
  synth.speak(u)
    u.onend = () => {
        continueFun()
    }
    synth.speak(u)
}
const publicFun = (item) => {
  if (startClick) pointStore.updateSharedData(3)
    if (startClick) pointStore.updateSharedData(3)
  let fourCenter = DC.Position.fromObject(item.fourPointPosition)
  let fourCircle = new DC.Circle(fourCenter, 30)
  fourCircle.setStyle({
    material: new DC.CircleWaveMaterialProperty({
      color: DC.Color.fromRandom(),
      speed: 20,
      count: 5,
      gradient: 0.5
    let fourCenter = DC.Position.fromObject(item.fourPointPosition)
    let fourCircle = new DC.Circle(fourCenter, 30)
    fourCircle.setStyle({
        material: new DC.CircleWaveMaterialProperty({
            color: DC.Color.fromRandom(),
            speed: 20,
            count: 5,
            gradient: 0.5
        })
    })
  })
  dynamicVectorLayer.addOverlay(fourCircle)
    dynamicVectorLayer.addOverlay(fourCircle)
  let fourContent = new DC.DivIcon(
    new DC.Position(item.fourPointPosition.lng, item.fourPointPosition.lat, item.fourPointPosition.alt),
    `<div class="dynamic-map-popup">
    let fourContent = new DC.DivIcon(
        new DC.Position(item.fourPointPosition.lng, item.fourPointPosition.lat, item.fourPointPosition.alt),
        `<div class="dynamic-map-popup">
                  <div class="content-wrap">
                    <div class="content">
                      <p>${item.fourContent}</p>
@@ -189,27 +190,27 @@
                  </div>
                  <div class="arrow"></div>
                </div>`
  )
  dynamicHtmlLayer.addOverlay(fourContent)
    )
    dynamicHtmlLayer.addOverlay(fourContent)
  window.$viewer.flyToPosition(new DC.Position(item.fourPointPosition.lng, item.fourPointPosition.lat, 400, 0, -90, 0), () => {
    speak(item.fourContent, () => {
      if (item.fivePointPosition) {
        let fiveCenter = DC.Position.fromObject(item.fivePointPosition)
        let fiveCircle = new DC.Circle(fiveCenter, 10)
        fiveCircle.setStyle({
          material: new DC.CircleWaveMaterialProperty({
            color: DC.Color.fromRandom(),
            speed: 20,
            count: 5,
            gradient: 0.5
          })
        })
        dynamicVectorLayer.addOverlay(fiveCircle)
    window.$viewer.flyToPosition(new DC.Position(item.fourPointPosition.lng, item.fourPointPosition.lat, 400, 0, -90, 0), () => {
        speak(item.fourContent, () => {
            if (item.fivePointPosition) {
                let fiveCenter = DC.Position.fromObject(item.fivePointPosition)
                let fiveCircle = new DC.Circle(fiveCenter, 10)
                fiveCircle.setStyle({
                    material: new DC.CircleWaveMaterialProperty({
                        color: DC.Color.fromRandom(),
                        speed: 20,
                        count: 5,
                        gradient: 0.5
                    })
                })
                dynamicVectorLayer.addOverlay(fiveCircle)
        let fiveContent = new DC.DivIcon(
          new DC.Position(item.fivePointPosition.lng, item.fivePointPosition.lat, item.fivePointPosition.alt),
          `<div class="dynamic-event-profile-map-popup">
                let fiveContent = new DC.DivIcon(
                    new DC.Position(item.fivePointPosition.lng, item.fivePointPosition.lat, item.fivePointPosition.alt),
                    `<div class="dynamic-event-profile-map-popup">
                      <div class="content-wrap">
                        <div class="content">
                          <p>${item.fiveContent}</p>
@@ -217,27 +218,27 @@
                      </div>
                      <div class="arrow"></div>
                    </div>`
        )
        dynamicHtmlLayer.addOverlay(fiveContent)
        // 执行对应的事件函数
        window.$viewer.flyToPosition(new DC.Position(item.fivePointPosition.lng, item.fivePointPosition.lat, 400, 0, -90, 0), () => {
          speak(item.fiveContent, () => {
            if (item.sixPointPosition) {
              let sixCenter = DC.Position.fromObject(item.sixPointPosition)
              let sixCircle = new DC.Circle(sixCenter, 10)
              sixCircle.setStyle({
                material: new DC.CircleWaveMaterialProperty({
                  color: DC.Color.fromRandom(),
                  speed: 20,
                  count: 5,
                  gradient: 0.5
                })
              })
              dynamicVectorLayer.addOverlay(sixCircle)
                )
                dynamicHtmlLayer.addOverlay(fiveContent)
                // 执行对应的事件函数
                window.$viewer.flyToPosition(new DC.Position(item.fivePointPosition.lng, item.fivePointPosition.lat, 400, 0, -90, 0), () => {
                    speak(item.fiveContent, () => {
                        if (item.sixPointPosition) {
                            let sixCenter = DC.Position.fromObject(item.sixPointPosition)
                            let sixCircle = new DC.Circle(sixCenter, 10)
                            sixCircle.setStyle({
                                material: new DC.CircleWaveMaterialProperty({
                                    color: DC.Color.fromRandom(),
                                    speed: 20,
                                    count: 5,
                                    gradient: 0.5
                                })
                            })
                            dynamicVectorLayer.addOverlay(sixCircle)
              let sixContent = new DC.DivIcon(
                new DC.Position(item.sixPointPosition.lng, item.sixPointPosition.lat, 70),
                `<div class="dynamic-map-popup">
                            let sixContent = new DC.DivIcon(
                                new DC.Position(item.sixPointPosition.lng, item.sixPointPosition.lat, 70),
                                `<div class="dynamic-map-popup">
                              <div class="content-wrap">
                                <div class="content">
                                  <p>${item.sixContent}</p>
@@ -245,27 +246,27 @@
                              </div>
                              <div class="arrow"></div>
                          </div>`
              )
              dynamicHtmlLayer.addOverlay(sixContent)
              // 执行对应的事件函数
              window.$viewer.flyToPosition(new DC.Position(item.sixPointPosition.lng, item.sixPointPosition.lat, 400, 0, -90, 0), () => {
                speak(item.sixContent, () => {
                  if (item.sevenPointPosition) {
                    let sevenCenter = DC.Position.fromObject(item.sevenPointPosition)
                    let sevenCircle = new DC.Circle(sevenCenter, 10)
                    sevenCircle.setStyle({
                      material: new DC.CircleWaveMaterialProperty({
                        color: DC.Color.fromRandom(),
                        speed: 20,
                        count: 5,
                        gradient: 0.5
                      })
                    })
                    dynamicVectorLayer.addOverlay(sevenCircle)
                            )
                            dynamicHtmlLayer.addOverlay(sixContent)
                            // 执行对应的事件函数
                            window.$viewer.flyToPosition(new DC.Position(item.sixPointPosition.lng, item.sixPointPosition.lat, 400, 0, -90, 0), () => {
                                speak(item.sixContent, () => {
                                    if (item.sevenPointPosition) {
                                        let sevenCenter = DC.Position.fromObject(item.sevenPointPosition)
                                        let sevenCircle = new DC.Circle(sevenCenter, 10)
                                        sevenCircle.setStyle({
                                            material: new DC.CircleWaveMaterialProperty({
                                                color: DC.Color.fromRandom(),
                                                speed: 20,
                                                count: 5,
                                                gradient: 0.5
                                            })
                                        })
                                        dynamicVectorLayer.addOverlay(sevenCircle)
                    let sevenContent = new DC.DivIcon(
                      new DC.Position(item.sevenPointPosition.lng, item.sevenPointPosition.lat, 70),
                      `<div class="dynamic-event-profile-map-popup">
                                        let sevenContent = new DC.DivIcon(
                                            new DC.Position(item.sevenPointPosition.lng, item.sevenPointPosition.lat, 70),
                                            `<div class="dynamic-event-profile-map-popup">
                              <div class="content-wrap">
                                <div class="content">
                                  <p>${item.sevenContent}</p>
@@ -273,41 +274,41 @@
                              </div>
                              <div class="arrow"></div>
                          </div>`
                    )
                    dynamicHtmlLayer.addOverlay(sevenContent)
                    // 执行对应的事件函数
                    window.$viewer.flyToPosition(new DC.Position(item.sevenPointPosition.lng, item.sevenPointPosition.lat, 400, 0, -90, 0), () => {
                      speak(item.sevenContent)
                    }, 3)
                  }
                })
              }, 3)
                                        )
                                        dynamicHtmlLayer.addOverlay(sevenContent)
                                        // 执行对应的事件函数
                                        window.$viewer.flyToPosition(new DC.Position(item.sevenPointPosition.lng, item.sevenPointPosition.lat, 400, 0, -90, 0), () => {
                                            speak(item.sevenContent)
                                        }, 3)
                                    }
                                })
                            }, 3)
                        }
                    })
                }, 3)
            }
          })
        }, 3)
      }
    })
  }, 3)
        })
    }, 3)
}
const twoFun = (item, cb = () => { }) => {
  if (startClick) pointStore.updateSharedData(1)
    if (startClick) pointStore.updateSharedData(1)
  let twoCenter = DC.Position.fromObject(item.twoPointPosition)
  let twoCircle = new DC.Circle(twoCenter, 10)
  twoCircle.setStyle({
    material: new DC.CircleWaveMaterialProperty({
      color: DC.Color.fromRandom(),
      speed: 20,
      count: 5,
      gradient: 0.5
    let twoCenter = DC.Position.fromObject(item.twoPointPosition)
    let twoCircle = new DC.Circle(twoCenter, 10)
    twoCircle.setStyle({
        material: new DC.CircleWaveMaterialProperty({
            color: DC.Color.fromRandom(),
            speed: 20,
            count: 5,
            gradient: 0.5
        })
    })
  })
  dynamicVectorLayer.addOverlay(twoCircle)
    dynamicVectorLayer.addOverlay(twoCircle)
  let twoContent = new DC.DivIcon(
    new DC.Position(item.twoPointPosition.lng, item.twoPointPosition.lat, item.twoPointPosition.alt),
    `<div class="dynamic-event-profile-map-popup">
    let twoContent = new DC.DivIcon(
        new DC.Position(item.twoPointPosition.lng, item.twoPointPosition.lat, item.twoPointPosition.alt),
        `<div class="dynamic-event-profile-map-popup">
          <div class="content-wrap">
            <div class="content">
              <p>${item.twoContent}</p>
@@ -315,51 +316,51 @@
              </div>
              <div class="arrow"></div>
              </div>`
    // <p>特征污染物:${item.specificPollutant}</p>
  )
  dynamicHtmlLayer.addOverlay(twoContent)
  // 执行对应的事件函数
  window.$viewer.flyToPosition(new DC.Position(item.twoPointPosition.lng, item.twoPointPosition.lat, 400, 0, -90, 0), () => {
    speak(item.twoContent, () => {
      cb()
    })
  }, 3)
        // <p>特征污染物:${item.specificPollutant}</p>
    )
    dynamicHtmlLayer.addOverlay(twoContent)
    // 执行对应的事件函数
    window.$viewer.flyToPosition(new DC.Position(item.twoPointPosition.lng, item.twoPointPosition.lat, 400, 0, -90, 0), () => {
        speak(item.twoContent, () => {
            cb()
        })
    }, 3)
}
const createLinePath = (item, cb = () => { }) => {
  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
    })
    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)
  } else {
    if (startClick) pointStore.updateSharedData(2)
        dynamicLineVectorLayer.addOverlay(polyline)
    } else {
        if (startClick) pointStore.updateSharedData(2)
    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 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, item.threePointPosition.alt),
    `<div class="dynamic-event-profile-map-popup">
    let threeContent = new DC.DivIcon(
        new DC.Position(item.threePointPosition.lng, item.threePointPosition.lat, item.threePointPosition.alt),
        `<div class="dynamic-event-profile-map-popup">
          <div class="content-wrap">
            <div class="content">
              <p>${item.threeContent}</p>
@@ -367,130 +368,130 @@
              </div>
              <div class="arrow"></div>
              </div>`
    // <p>特征污染物:${item.specificPollutant}</p>
  )
  dynamicHtmlLayer.addOverlay(threeContent)
  // 执行对应的事件函数
        // <p>特征污染物:${item.specificPollutant}</p>
    )
    dynamicHtmlLayer.addOverlay(threeContent)
    // 执行对应的事件函数
  window.$viewer.flyToPosition(new DC.Position(item.threePointPosition.lng, item.threePointPosition.lat, 400, 0, -90, 0), () => {
    speak(item.threeContent, () => {
      cb()
    })
  }, 3)
    window.$viewer.flyToPosition(new DC.Position(item.threePointPosition.lng, item.threePointPosition.lat, 400, 0, -90, 0), () => {
        speak(item.threeContent, () => {
            cb()
        })
    }, 3)
}
const parseLineString = (lineString) => {
  // 移除 "LINESTRING(" 和 ")"
  const cleanedString = lineString.replace(/^LINESTRING\(/, '').replace(/\)$/, '')
    // 移除 "LINESTRING(" 和 ")"
    const cleanedString = lineString.replace(/^LINESTRING\(/, '').replace(/\)$/, '')
  // 使用逗号分割成坐标对字符串数组
  const coordinatePairsString = cleanedString.split(',')
    // 使用逗号分割成坐标对字符串数组
    const coordinatePairsString = cleanedString.split(',')
  // 将每个坐标对字符串转换为数组,并解析成浮点数
  const coordinatesArray = coordinatePairsString.map(pair => {
    const [lon, lat] = pair.trim().split(' ')
    return [parseFloat(lon), parseFloat(lat)]
  })
    // 将每个坐标对字符串转换为数组,并解析成浮点数
    const coordinatesArray = coordinatePairsString.map(pair => {
        const [lon, lat] = pair.trim().split(' ')
        return [parseFloat(lon), parseFloat(lat)]
    })
  return coordinatesArray
    return coordinatesArray
}
let publicEventHandle = {
  oneCentent: '某某年某某月某某日,企业发生化学原料危害品泄漏。',
  onePointPosition: {
    lng: null,
    lat: null,
    alt: null
  },
  onetime: 0,
    oneCentent: '某某年某某月某某日,企业发生化学原料危害品泄漏。',
    onePointPosition: {
        lng: null,
        lat: null,
        alt: null
    },
    onetime: 0,
  twoContent: '关闭所有可能外溢事故污水的外排口,利用企业自身的围堰、应急池等环境应急防控设施,将污水控制在企业厂区内部。',
  twoPointPosition: {
    lng: null,
    lat: null,
    alt: null
  },
  twotime: 5000,
    twoContent: '关闭所有可能外溢事故污水的外排口,利用企业自身的围堰、应急池等环境应急防控设施,将污水控制在企业厂区内部。',
    twoPointPosition: {
        lng: null,
        lat: null,
        alt: null
    },
    twotime: 5000,
  threeContent: '通过专用管道或临时转输措施,与相邻企业应急池、园区公共应急池等互联互通,拦截处置事故污水。',
  threePointPosition: {
    lng: null,
    lat: null,
    alt: null
  },
  threetime: 15000,
    threeContent: '通过专用管道或临时转输措施,与相邻企业应急池、园区公共应急池等互联互通,拦截处置事故污水。',
    threePointPosition: {
        lng: null,
        lat: null,
        alt: null
    },
    threetime: 15000,
  fourContent: '利用化工集中区内的坑塘、河道、沟渠以及周边水系等,构建环境应急防控空间,对进出园区的水体实施封闭或分段管控。',
  fourPointPosition: {
    lng: null,
    lat: null,
    alt: null
  },
  fourtime: 15000,
    fourContent: '利用化工集中区内的坑塘、河道、沟渠以及周边水系等,构建环境应急防控空间,对进出园区的水体实施封闭或分段管控。',
    fourPointPosition: {
        lng: null,
        lat: null,
        alt: null
    },
    fourtime: 15000,
}
const wxEntityClick = (e) => {
  const { attrParams } = e.overlay
  clearAll()
  pointStore.updateSharedData(1)
  mapStore.setShowPreLevel(true)
    const { attrParams } = e.overlay
    clearAll()
    pointStore.updateSharedData(1)
    mapStore.setShowPreLevel(true)
  spatialAnalysisPoint({
    lng: attrParams.lng,
    lat: attrParams.lat
  }).then(res => {
    let arr = res.data.data
    spatialAnalysisPoint({
        lng: attrParams.lng,
        lat: attrParams.lat
    }).then(res => {
        let arr = res.data.data
    publicEventHandle.onePointPosition = {
      lng: attrParams.lng,
      lat: attrParams.lat,
      alt: 16
    }
    arr.forEach(item => {
      if (item.preLevel == 1) {
        publicEventHandle.twoPointPosition = {
          lng: item.lng,
          lat: item.lat,
          alt: item.ele
        publicEventHandle.onePointPosition = {
            lng: attrParams.lng,
            lat: attrParams.lat,
            alt: 16
        }
      }
      if (item.preLevel == 2 && item.geom) {
        var line = window.$turf.lineString(parseLineString(item.geom))
        var pt = window.$turf.point([attrParams.lng, attrParams.lat])
        var snapped = window.$turf.nearestPointOnLine(line, pt, { units: "miles" })
        publicEventHandle.threePointPosition = {
          lng: snapped.geometry.coordinates[0],
          lat: snapped.geometry.coordinates[1],
          alt: 30
        }
      }
      if (item.preLevel == 3) {
        publicEventHandle.fourPointPosition = {
          lng: item.lng,
          lat: item.lat,
          alt: item.ele
        }
      }
    })
        arr.forEach(item => {
            if (item.preLevel == 1) {
                publicEventHandle.twoPointPosition = {
                    lng: item.lng,
                    lat: item.lat,
                    alt: item.ele
                }
            }
            if (item.preLevel == 2 && item.geom) {
                var line = window.$turf.lineString(parseLineString(item.geom))
                var pt = window.$turf.point([attrParams.lng, attrParams.lat])
                var snapped = window.$turf.nearestPointOnLine(line, pt, { units: "miles" })
                publicEventHandle.threePointPosition = {
                    lng: snapped.geometry.coordinates[0],
                    lat: snapped.geometry.coordinates[1],
                    alt: 30
                }
            }
    timeOne = setTimeout(() => {
      function oneLoad () {
        let oneCenter = DC.Position.fromObject(publicEventHandle.onePointPosition)
        let oneCircle = new DC.Circle(oneCenter, 20)
        oneCircle.setStyle({
          material: new DC.CircleWaveMaterialProperty({
            color: DC.Color.RED.withAlpha(0.9),
            speed: 20,
            count: 5,
            gradient: 0.5
          })
            if (item.preLevel == 3) {
                publicEventHandle.fourPointPosition = {
                    lng: item.lng,
                    lat: item.lat,
                    alt: item.ele
                }
            }
        })
        dynamicVectorLayer.addOverlay(oneCircle)
        let oneCentent = new DC.DivIcon(
          new DC.Position(publicEventHandle.onePointPosition.lng, publicEventHandle.onePointPosition.lat, publicEventHandle.onePointPosition.alt),
          `<div class="dynamic-map-popup">
        timeOne = setTimeout(() => {
            function oneLoad () {
                let oneCenter = DC.Position.fromObject(publicEventHandle.onePointPosition)
                let oneCircle = new DC.Circle(oneCenter, 20)
                oneCircle.setStyle({
                    material: new DC.CircleWaveMaterialProperty({
                        color: DC.Color.RED.withAlpha(0.9),
                        speed: 20,
                        count: 5,
                        gradient: 0.5
                    })
                })
                dynamicVectorLayer.addOverlay(oneCircle)
                let oneCentent = new DC.DivIcon(
                    new DC.Position(publicEventHandle.onePointPosition.lng, publicEventHandle.onePointPosition.lat, publicEventHandle.onePointPosition.alt),
                    `<div class="dynamic-map-popup">
          <div class="content-wrap">
            <div class="content">
              <p>${publicEventHandle.oneCentent}</p>
@@ -498,79 +499,92 @@
              </div>
              <div class="arrow"></div>
              </div>`
          // <p>特征污染物:${publicEventHandle.specificPollutant}</p>
        )
        dynamicHtmlLayer.addOverlay(oneCentent)
                    // <p>特征污染物:${publicEventHandle.specificPollutant}</p>
                )
                dynamicHtmlLayer.addOverlay(oneCentent)
        speak(publicEventHandle.oneCentent, () => {
          twoFun(publicEventHandle, () => {
            createLinePath(publicEventHandle, () => {
              publicFun(publicEventHandle)
            })
          })
        })
      }
      if (publicEventHandle.showModel) {
        oneLoad()
      } else {
        window.$viewer.flyToPosition(new DC.Position(publicEventHandle.onePointPosition.lng, publicEventHandle.onePointPosition.lat, 400, 0, -90, 0), () => {
          oneLoad()
        }, 3)
      }
    }, publicEventHandle.onetime)
  })
                speak(publicEventHandle.oneCentent, () => {
                    twoFun(publicEventHandle, () => {
                        createLinePath(publicEventHandle, () => {
                            publicFun(publicEventHandle)
                        })
                    })
                })
            }
            if (publicEventHandle.showModel) {
                oneLoad()
            } else {
                window.$viewer.flyToPosition(new DC.Position(publicEventHandle.onePointPosition.lng, publicEventHandle.onePointPosition.lat, 400, 0, -90, 0), () => {
                    oneLoad()
                }, 3)
            }
        }, publicEventHandle.onetime)
    })
}
EventBus.on('wxEntityClick', wxEntityClick)
const schemeStart = (item, type) => {
  emit('closePanel')
  clearAll()
    emit('closePanel')
    clearAll()
  if (type == 1) {
    if (startClick) {
      EventBus.emit('restHandleDelChange', `4-1`)
      EventBus.emit('restHandleDelChange', `4-2`)
      EventBus.emit('restHandleDelChange', `4-3`)
      EventBus.emit('restHandleDelChange', `4-9`)
    }
    if (type == 1) {
        if (startClick) {
            EventBus.emit('restHandleDelChange', `4-1`)
            EventBus.emit('restHandleDelChange', `4-2`)
            EventBus.emit('restHandleDelChange', `4-3`)
            EventBus.emit('restHandleDelChange', `4-9`)
        }
    if (item.showModel) {
      window.$viewer.flyToPosition("115.10587903,27.28374884,400,0,-90", () => {
        track.setModel(VITE_APP_BASE + 'gltf/car.gltf', {
          show: true,
          scale: 0.0025,
          // nodeTransformations: {
          //   rotation: window.$Cesium.Quaternion.fromHeadingPitchRoll(window.$Cesium.Math.toRadians(0), window.$Cesium.Math.toRadians(0), window.$Cesium.Math.toRadians(0)),
          // }
        })
        // let polyline = new DC.Polyline(qysgwslx.features[0].geometry.coordinates.join(';'))
        // polyline.setStyle({
        //     width: 5,
        //     material: new DC.PolylineTrailMaterialProperty({
        //         color: DC.Color.RED,
        //         speed: 10
        //     }),
        //     clampToGround: true
        // })
        // qyWsLayer.addOverlay(polyline)
        tc.play()
        tc.viewTrack(track, {
          mode: '2',
          pitch: -45,
          range: 400
        })
      })
    }
        if (item.showModel) {
            window.$viewer.flyToPosition("115.10587903,27.28374884,400,0,-90", () => {
                track.setModel(VITE_APP_BASE + 'gltf/car.gltf', {
                    show: true,
                    scale: 0.0025,
                    // nodeTransformations: {
                    //   rotation: window.$Cesium.Quaternion.fromHeadingPitchRoll(window.$Cesium.Math.toRadians(0), window.$Cesium.Math.toRadians(0), window.$Cesium.Math.toRadians(0)),
                    // }
                })
    timeOne = setTimeout(() => {
      function oneLoad () {
        let oneCenter = DC.Position.fromObject(item.onePointPosition)
        let oneCircle = new DC.Circle(oneCenter, 20)
        oneCircle.setStyle({
          material: new DC.CircleWaveMaterialProperty({
            color: DC.Color.RED.withAlpha(0.9),
            speed: 20,
            count: 5,
            gradient: 0.5
          })
        })
        dynamicVectorLayer.addOverlay(oneCircle)
                tc.play()
                tc.viewTrack(track, {
                    mode: '2',
                    pitch: -45,
                    range: 400
                })
            })
        }
        let oneCentent = new DC.DivIcon(
          new DC.Position(item.onePointPosition.lng, item.onePointPosition.lat, item.onePointPosition.alt),
          `<div class="dynamic-map-popup">
        timeOne = setTimeout(() => {
            function oneLoad () {
                let oneCenter = DC.Position.fromObject(item.onePointPosition)
                let oneCircle = new DC.Circle(oneCenter, 20)
                oneCircle.setStyle({
                    material: new DC.CircleWaveMaterialProperty({
                        color: DC.Color.RED.withAlpha(0.9),
                        speed: 20,
                        count: 5,
                        gradient: 0.5
                    })
                })
                dynamicVectorLayer.addOverlay(oneCircle)
                let oneCentent = new DC.DivIcon(
                    new DC.Position(item.onePointPosition.lng, item.onePointPosition.lat, item.onePointPosition.alt),
                    `<div class="dynamic-map-popup">
          <div class="content-wrap">
            <div class="content">
              <p>${item.oneCentent}</p>
@@ -578,302 +592,305 @@
              </div>
              <div class="arrow"></div>
              </div>`
          // <p>特征污染物:${item.specificPollutant}</p>
        )
        dynamicHtmlLayer.addOverlay(oneCentent)
                    // <p>特征污染物:${item.specificPollutant}</p>
                )
                dynamicHtmlLayer.addOverlay(oneCentent)
        speak(item.oneCentent, () => {
          if (item.key == 2) {
            twoFun(item, () => {
              createLinePath(item, () => {
                publicFun(item)
              })
            })
          } else if (item.key == 1) {
            twoFun(item, () => {
              createLinePath(item, () => {
                publicFun(item)
              })
            })
          } else {
            twoFun(item, () => {
              createLinePath(item, () => {
                publicFun(item)
              })
            })
          }
        })
      }
      if (item.showModel) {
        oneLoad()
      } else {
        window.$viewer.flyToPosition(new DC.Position(item.onePointPosition.lng, item.onePointPosition.lat, 400, 0, -90, 0), () => {
          oneLoad()
        }, 3)
      }
    }, item.onetime)
                speak(item.oneCentent, () => {
                    if (item.key == 2) {
                        twoFun(item, () => {
                            createLinePath(item, () => {
                                publicFun(item)
                            })
                        })
                    } else if (item.key == 1) {
                        twoFun(item, () => {
                            createLinePath(item, () => {
                                publicFun(item)
                            })
                        })
                    } else {
                        twoFun(item, () => {
                            createLinePath(item, () => {
                                publicFun(item)
                            })
                        })
                    }
                })
            }
            if (item.showModel) {
                oneLoad()
            } else {
                window.$viewer.flyToPosition(new DC.Position(item.onePointPosition.lng, item.onePointPosition.lat, 400, 0, -90, 0), () => {
                    oneLoad()
                }, 3)
            }
        }, item.onetime)
    startClick = false
    mapStore.setStartCustomWx(startClick)
  } else {
    startClick = true
    mapStore.setStartCustomWx(startClick)
    EventBus.emit('restHandleCheckChange', `4`)
  }
        startClick = false
        mapStore.setStartCustomWx(startClick)
    } else {
        startClick = true
        mapStore.setStartCustomWx(startClick)
        EventBus.emit('restHandleCheckChange', `4`)
    }
}
const clearAll = () => {
  mapStore.setShowPreLevel(false)
  window.speechSynthesis.cancel()
    mapStore.setShowPreLevel(false)
    window.speechSynthesis.cancel()
  lineTime && (clearTimeout(lineTime), lineTime = null)
  timeOne && (clearTimeout(timeOne), timeOne = null)
  timeTwo && (clearTimeout(timeTwo), timeTwo = null)
  timeThree && (clearTimeout(timeThree), timeThree = null)
  timeFour && (clearTimeout(timeFour), timeFour = null)
  timeFive && (clearTimeout(timeFive), timeFive = null)
  timeSix && (clearTimeout(timeSix), timeSix = null)
    lineTime && (clearTimeout(lineTime), lineTime = null)
    timeOne && (clearTimeout(timeOne), timeOne = null)
    timeTwo && (clearTimeout(timeTwo), timeTwo = null)
    timeThree && (clearTimeout(timeThree), timeThree = null)
    timeFour && (clearTimeout(timeFour), timeFour = null)
    timeFive && (clearTimeout(timeFive), timeFive = null)
    timeSix && (clearTimeout(timeSix), timeSix = null)
  track.setModel(VITE_APP_BASE + 'gltf/car.gltf', {
    show: false,
    scale: 0.0025,
    // nodeTransformations: {
    //   rotation: window.$Cesium.Quaternion.fromHeadingPitchRoll(window.$Cesium.Math.toRadians(0), window.$Cesium.Math.toRadians(0), window.$Cesium.Math.toRadians(0)),
    // }
  })
    track.setModel(VITE_APP_BASE + 'gltf/car.gltf', {
        show: false,
        scale: 0.0025,
        // nodeTransformations: {
        //   rotation: window.$Cesium.Quaternion.fromHeadingPitchRoll(window.$Cesium.Math.toRadians(0), window.$Cesium.Math.toRadians(0), window.$Cesium.Math.toRadians(0)),
        // }
    })
  dynamicVectorLayer.clear()
  dynamicHtmlLayer.clear()
  dynamicLineVectorLayer.clear()
    dynamicVectorLayer?.clear()
    dynamicHtmlLayer?.clear()
    dynamicLineVectorLayer?.clear()
    qyWsLayer?.clear()
}
onUnmounted(() => {
  if (startClick) {
    EventBus.emit('restHandleDelChange', `4-1`)
    EventBus.emit('restHandleDelChange', `4-2`)
    EventBus.emit('restHandleDelChange', `4-3`)
    EventBus.emit('restHandleDelChange', `4-9`)
  }
  mapStore.setStartCustomWx(false)
  EventBus.off('wxEntityClick', wxEntityClick)
    if (startClick) {
        EventBus.emit('restHandleDelChange', `4-1`)
        EventBus.emit('restHandleDelChange', `4-2`)
        EventBus.emit('restHandleDelChange', `4-3`)
        EventBus.emit('restHandleDelChange', `4-9`)
    }
    mapStore.setStartCustomWx(false)
    EventBus.off('wxEntityClick', wxEntityClick)
  clearAll()
    clearAll()
  tc.clear()
  dynamicVectorLayer && window.$viewer && window.$viewer.removeLayer(dynamicVectorLayer)
  dynamicHtmlLayer && window.$viewer && window.$viewer.removeLayer(dynamicHtmlLayer)
  dynamicLineVectorLayer && window.$viewer && window.$viewer.removeLayer(dynamicLineVectorLayer)
    tc.clear()
    dynamicVectorLayer && window.$viewer && window.$viewer.removeLayer(dynamicVectorLayer)
    dynamicHtmlLayer && window.$viewer && window.$viewer.removeLayer(dynamicHtmlLayer)
    dynamicLineVectorLayer && window.$viewer && window.$viewer.removeLayer(dynamicLineVectorLayer)
    qyWsLayer && window.$viewer && window.$viewer.removeLayer(qyWsLayer)
  tc = null
  track = null
  dynamicVectorLayer = null
  dynamicHtmlLayer = null
  dynamicLineVectorLayer = null
    tc = null
    track = null
    dynamicVectorLayer = null
    dynamicHtmlLayer = null
    dynamicLineVectorLayer = null
    qyWsLayer = null
})
</script>
<template>
  <div class="panel-container no-select">
    <el-carousel :autoplay="false" :interval="4000" type="card" height="360px">
      <el-carousel-item v-for="item, index in panelData.data" :key="index">
        <template #>
          <div class="content-box flex f-d-c">
            <div class="title">
              {{ item.title }}
            </div>
            <div class="content h0 flex-1">
              <div class="bg-box">
    <div class="panel-container no-select">
        <el-carousel :autoplay="false" :interval="4000" type="card" height="360px">
            <el-carousel-item v-for="item, index in panelData.data" :key="index">
                <template #>
                    <div class="content-box flex f-d-c">
                        <div class="title">
                            {{ item.title }}
                        </div>
                        <div class="content h0 flex-1">
                            <div class="bg-box">
              </div>
                            </div>
              <div class="describe-box">
                {{ item.content }}
              </div>
            </div>
                            <div class="describe-box">
                                {{ item.content }}
                            </div>
                        </div>
            <div class="footer-btn" v-show="item.type == 'demo'">
              <div class="start-btn" @click="schemeStart(item, 1)">
                开始模拟
              </div>
            </div>
                        <div class="footer-btn" v-show="item.type == 'demo'">
                            <div class="start-btn" @click="schemeStart(item, 1)">
                                开始模拟
                            </div>
                        </div>
            <div class="footer-btn" v-show="item.type != 'demo'">
              <div class="start-btn" @click="schemeStart(item, 2)">
                自定义风险源
              </div>
            </div>
          </div>
        </template>
      </el-carousel-item>
    </el-carousel>
  </div>
                        <div class="footer-btn" v-show="item.type != 'demo'">
                            <div class="start-btn" @click="schemeStart(item, 2)">
                                自定义风险源
                            </div>
                        </div>
                    </div>
                </template>
            </el-carousel-item>
        </el-carousel>
    </div>
</template>
<style scoped lang="scss">
.panel-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  width: 960px;
  height: 440px;
  pointer-events: all;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    width: 960px;
    height: 440px;
    pointer-events: all;
  ::v-deep(.el-carousel) {
    .el-carousel__item {
      background: #2E4274;
    ::v-deep(.el-carousel) {
        .el-carousel__item {
            background: #2E4274;
      .content-box {
        padding: 10px 0;
        width: 100%;
        height: 100%;
        color: #fff;
            .content-box {
                padding: 10px 0;
                width: 100%;
                height: 100%;
                color: #fff;
        .title {
          padding-left: 40px;
          height: 80px;
          line-height: 80px;
          font-size: 44px;
          font-weight: bold;
          font-style: initial;
          background: #3a7bd5;
          /* fallback for old browsers */
          background: -webkit-linear-gradient(to right, #3a7bd5, rgba(255, 255, 255, 0.1));
          /* Chrome 10-25, Safari 5.1-6 */
          background: linear-gradient(to right, #3a7bd5, rgba(255, 255, 255, 0.1));
          /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
                .title {
                    padding-left: 40px;
                    height: 80px;
                    line-height: 80px;
                    font-size: 44px;
                    font-weight: bold;
                    font-style: initial;
                    background: #3a7bd5;
                    /* fallback for old browsers */
                    background: -webkit-linear-gradient(to right, #3a7bd5, rgba(255, 255, 255, 0.1));
                    /* Chrome 10-25, Safari 5.1-6 */
                    background: linear-gradient(to right, #3a7bd5, rgba(255, 255, 255, 0.1));
                    /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
                }
                .content {
                    margin-top: 20px;
                    padding: 0 20px;
                    .describe-box {
                        line-height: 36px;
                    }
                }
                .footer-btn {
                    margin-bottom: 40px;
                    height: 40px;
                    line-height: 40px;
                    text-align: center;
                }
            }
        }
        .content {
          margin-top: 20px;
          padding: 0 20px;
          .describe-box {
            line-height: 36px;
          }
        }
        .footer-btn {
          margin-bottom: 40px;
          height: 40px;
          line-height: 40px;
          text-align: center;
        }
      }
    }
  }
}
.no-select {
  user-select: none;
  /* Standard syntax */
  -webkit-user-select: none;
  /* Safari/Chrome */
  -moz-user-select: none;
  /* Firefox */
  -ms-user-select: none;
  /* Internet Explorer/Edge */
    user-select: none;
    /* Standard syntax */
    -webkit-user-select: none;
    /* Safari/Chrome */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    /* Internet Explorer/Edge */
}
.start-btn,
.start-btn:focus,
.start-btn:hover {
  padding: 0 10px;
  display: inline-block;
  position: relative;
  min-width: 96px;
  border: none;
  border-radius: 8px;
  background: #491cc5;
  /* fallback for old browsers */
  background: -webkit-linear-gradient(to bottom, #491cc5, #5f80f5);
  /* Chrome 10-25, Safari 5.1-6 */
  background: linear-gradient(to bottom, #491cc5, #5f80f5);
  /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
    padding: 0 10px;
    display: inline-block;
    position: relative;
    min-width: 96px;
    border: none;
    border-radius: 8px;
    background: #491cc5;
    /* fallback for old browsers */
    background: -webkit-linear-gradient(to bottom, #491cc5, #5f80f5);
    /* Chrome 10-25, Safari 5.1-6 */
    background: linear-gradient(to bottom, #491cc5, #5f80f5);
    /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
  color: #fff;
  font-size: 1rem;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  transition: transform ease-in 0.1s, box-shadow ease-in 0.25s;
  transform: skewX(8deg);
    color: #fff;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transition: transform ease-in 0.1s, box-shadow ease-in 0.25s;
    transform: skewX(8deg);
}
.start-btn:before,
.start-btn:after {
  content: "";
  display: block;
  position: absolute;
  width: 140%;
  height: 100%;
  left: -20%;
  z-index: -1000;
  transition: all ease-in-out 0.5s;
  background-repeat: no-repeat;
    content: "";
    display: block;
    position: absolute;
    width: 140%;
    height: 100%;
    left: -20%;
    z-index: -1000;
    transition: all ease-in-out 0.5s;
    background-repeat: no-repeat;
}
.start-btn:before {
  display: none;
  top: -75%;
  background-image: radial-gradient(circle, #3E56B2 20%, transparent 20%), radial-gradient(circle, transparent 20%, #3E56B2 20%, transparent 30%), radial-gradient(circle, #3E56B2 20%, transparent 20%), radial-gradient(circle, #3E56B2 20%, transparent 20%), radial-gradient(circle, transparent 10%, #3E56B2 15%, transparent 20%), radial-gradient(circle, #3E56B2 20%, transparent 20%), radial-gradient(circle, #3E56B2 20%, transparent 20%), radial-gradient(circle, #3E56B2 20%, transparent 20%), radial-gradient(circle, #3E56B2 20%, transparent 20%);
  background-size: 10% 10%, 20% 20%, 15% 15%, 20% 20%, 18% 18%, 10% 10%, 15% 15%, 10% 10%, 18% 18%;
    display: none;
    top: -75%;
    background-image: radial-gradient(circle, #3E56B2 20%, transparent 20%), radial-gradient(circle, transparent 20%, #3E56B2 20%, transparent 30%), radial-gradient(circle, #3E56B2 20%, transparent 20%), radial-gradient(circle, #3E56B2 20%, transparent 20%), radial-gradient(circle, transparent 10%, #3E56B2 15%, transparent 20%), radial-gradient(circle, #3E56B2 20%, transparent 20%), radial-gradient(circle, #3E56B2 20%, transparent 20%), radial-gradient(circle, #3E56B2 20%, transparent 20%), radial-gradient(circle, #3E56B2 20%, transparent 20%);
    background-size: 10% 10%, 20% 20%, 15% 15%, 20% 20%, 18% 18%, 10% 10%, 15% 15%, 10% 10%, 18% 18%;
}
.start-btn:after {
  display: none;
  bottom: -75%;
  background-image: radial-gradient(circle, #3E56B2 20%, transparent 20%), radial-gradient(circle, #3E56B2 20%, transparent 20%), radial-gradient(circle, transparent 10%, #3E56B2 15%, transparent 20%), radial-gradient(circle, #3E56B2 20%, transparent 20%), radial-gradient(circle, #3E56B2 20%, transparent 20%), radial-gradient(circle, #3E56B2 20%, transparent 20%), radial-gradient(circle, #3E56B2 20%, transparent 20%);
  background-size: 15% 15%, 20% 20%, 18% 18%, 20% 20%, 15% 15%, 10% 10%, 20% 20%;
    display: none;
    bottom: -75%;
    background-image: radial-gradient(circle, #3E56B2 20%, transparent 20%), radial-gradient(circle, #3E56B2 20%, transparent 20%), radial-gradient(circle, transparent 10%, #3E56B2 15%, transparent 20%), radial-gradient(circle, #3E56B2 20%, transparent 20%), radial-gradient(circle, #3E56B2 20%, transparent 20%), radial-gradient(circle, #3E56B2 20%, transparent 20%), radial-gradient(circle, #3E56B2 20%, transparent 20%);
    background-size: 15% 15%, 20% 20%, 18% 18%, 20% 20%, 15% 15%, 10% 10%, 20% 20%;
}
.start-btn:active {
  transform: scale(0.9);
  background-color: #5e7ae9;
  box-shadow: 0 2px 25px rgba(94, 122, 233, .2);
    transform: scale(0.9);
    background-color: #5e7ae9;
    box-shadow: 0 2px 25px rgba(94, 122, 233, .2);
}
.start-btn:active:before {
  display: block;
  animation: anim-top ease-in-out 0.75s forwards;
    display: block;
    animation: anim-top ease-in-out 0.75s forwards;
}
.start-btn:active:after {
  display: block;
  animation: anim-bottom ease-in-out 0.75s forwards;
    display: block;
    animation: anim-bottom ease-in-out 0.75s forwards;
}
@keyframes anim-top {
  0% {
    background-position: 5% 90%, 10% 90%, 10% 90%, 15% 90%, 25% 90%, 25% 90%, 40% 90%, 55% 90%, 70% 90%;
  }
    0% {
        background-position: 5% 90%, 10% 90%, 10% 90%, 15% 90%, 25% 90%, 25% 90%, 40% 90%, 55% 90%, 70% 90%;
    }
  50% {
    background-position: 0% 80%, 0% 20%, 10% 40%, 20% 0%, 30% 30%, 22% 50%, 50% 50%, 65% 20%, 90% 30%;
  }
    50% {
        background-position: 0% 80%, 0% 20%, 10% 40%, 20% 0%, 30% 30%, 22% 50%, 50% 50%, 65% 20%, 90% 30%;
    }
  100% {
    background-position: 0% 70%, 0% 10%, 10% 30%, 20% -10%, 30% 20%, 22% 40%, 50% 40%, 65% 10%, 90% 20%;
    background-size: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%;
  }
    100% {
        background-position: 0% 70%, 0% 10%, 10% 30%, 20% -10%, 30% 20%, 22% 40%, 50% 40%, 65% 10%, 90% 20%;
        background-size: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%;
    }
}
@keyframes anim-bottom {
  0% {
    background-position: 10% -10%, 30% 10%, 55% -10%, 70% -10%, 85% -10%, 70% -10%, 70% 0%;
  }
    0% {
        background-position: 10% -10%, 30% 10%, 55% -10%, 70% -10%, 85% -10%, 70% -10%, 70% 0%;
    }
  50% {
    background-position: 0% 80%, 20% 80%, 45% 60%, 60% 100%, 75% 70%, 95% 60%, 105% 0%;
  }
    50% {
        background-position: 0% 80%, 20% 80%, 45% 60%, 60% 100%, 75% 70%, 95% 60%, 105% 0%;
    }
  100% {
    background-position: 0% 90%, 20% 90%, 45% 70%, 60% 110%, 75% 80%, 95% 70%, 110% 10%;
    background-size: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%;
  }
    100% {
        background-position: 0% 90%, 20% 90%, 45% 70%, 60% 110%, 75% 80%, 95% 70%, 110% 10%;
        background-size: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%;
    }
}
</style>
src/views/rim/components/box/dataContent.vue
New file
@@ -0,0 +1,369 @@
<!--
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2023-03-13 14:54:26
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2025-08-06 00:07:03
 * @FilePath: \jsProject\bigScreen\src\views\rim\components\box\dataContent.vue
 * @Description:
 *
 * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
-->
<script setup>
const { VITE_APP_BASE } = import.meta.env
import { Search, Refresh, Download } from '@element-plus/icons-vue'
import { useMap } from 'store/map'
import EventBus from 'utils/bus'
import { getEmePool, getNearbySupplies } from "@/api/base"
import { nextTick, onBeforeUnmount, onUnmounted, reactive, watch } from "vue"
const store = useMap()
const loading = ref(false)
const TableContent = ref(null)
const curTableHeight = ref(0)
const regionVal = ref(100)
const panoramaShow = ref(false)
const panoramaTitle = ref('')
const panoramaUrl = ref('')
const tableData = ref([])
const typeList = [
    {
        type: 1,
        backgroundIcon: VITE_APP_BASE + 'img/mapicon/yjc.png',
        className: 'yjc-box',
    },
    {
        type: 2,
        backgroundIcon: VITE_APP_BASE + 'img/mapicon/yjc.png',
        className: 'yjc-box',
    },
    {
        type: 3,
        backgroundIcon: VITE_APP_BASE + 'img/mapicon/ysf.png',
        className: 'ysf-box',
    },
    {
        type: 4,
        backgroundIcon: VITE_APP_BASE + 'img/mapicon/zb.png',
        className: 'sk-box',
    },
    {
        type: 5,
        backgroundIcon: VITE_APP_BASE + 'img/mapicon/sd.png',
        className: 'xfs-box',
    },
    {
        type: 6,
        backgroundIcon: VITE_APP_BASE + 'img/mapicon/kt.png',
        className: 'sk-box',
    },
    {
        type: 8,
        backgroundIcon: VITE_APP_BASE + 'img/mapicon/ql.png',
        className: 'xfs-box',
    },
]
let yjwzImg = VITE_APP_BASE + 'img/mapicon/yjwz.png'
onMounted(() => {
    curTableHeight.value = TableContent.value.offsetHeight
    EventBus.emit('flyToyqfw', 'flyToyqfw')
    EventBus.emit('destroyPop', 'destroyPop')
})
const searchClick = () => {
    getLists()
}
const tabList = ref([
    {
        ind: 0,
        title: '应急空间',
        select: false,
    },
    {
        ind: 1,
        title: '应急物资',
        select: false,
    }
])
const curTabInd = ref(0)
const tabClick = (item) => {
    tabList.value.forEach(i => i.select = false)
    item.select = true
    curTabInd.value = item.ind
    getLists()
}
let addTileLayers = null
// 查询分页数据
const getLists = () => {
    loading.value = true
    tableData.value = []
    if (!addTileLayers) {
        addTileLayers = new DC.HtmlLayer('addTileLayers')
        window.$viewer.addLayer(addTileLayers)
    } else {
        addTileLayers.clear()
    }
    if (curTabInd.value === 1) {
        getNearbySupplies({
            distance: regionVal.value,
            latitude: store.rimPosition.lat.toFixed(6),
            longitude: store.rimPosition.lng.toFixed(6)
        })
            .then((res) => {
                const data = res.data.data
                data.filter(i => i.lng && i.lng != '' && i.lat && i.lat != '').forEach(i => {
                    i.panoramicUrl = i.url
                    if (i.type === 2) {
                        let iconEl = `
                            <div class="map-name">${i.name}</div>
                                <div class="map-icon">
                                <img src="${yjwzImg}">
                            </div>
                            `
                        let divIcon = new DC.DivIcon(
                            new DC.Position(i.lng, i.lat, i.ele || 64),
                            `<div class="public-map-popup  qyfb-box yjwz-height-box ">
                                ${iconEl}
                            </div>`
                        )
                        divIcon.attrParams = i
                        let incident = (e) => {
                            const { attrParams } = e.overlay
                            if (
                                attrParams.panoramicUrl && attrParams.panoramicUrl.length > 0
                            ) {
                                panoramaTitle.value = attrParams.name
                                panoramaUrl.value = attrParams.panoramicUrl
                                panoramaShow.value = true
                                return
                            }
                        }
                        divIcon.on(DC.MouseEventType.CLICK, incident)
                        addTileLayers.addOverlay(divIcon)
                    }
                })
                tableData.value = data
                loading.value = false
            })
            .catch((err) => {
                loading.value = false
                console.log(err)
            })
    } else {
        getEmePool({
            distance: regionVal.value,
            latitude: store.rimPosition.lat.toFixed(6),
            longitude: store.rimPosition.lng.toFixed(6)
        })
            .then((res) => {
                const data = res.data.data
                data.filter(i => i.lng && i.lng != '' && i.lat && i.lat != '').forEach(i => {
                    i.firmName = i.firmName ? i.firmName : '瑞昌工业园'
                    let iconEl = ''
                    let divclassName = ''
                    let flag = typeList.find(l => l.type == i.type)
                    if (flag) {
                        divclassName = flag.className
                        if (flag.backgroundIcon) {
                            iconEl = `
                        <div class="map-name">${i.name}</div>
                        <div class="map-icon">
                            <img src="${flag.backgroundIcon}">
                        </div>
                        `
                        }
                        let divIcon = new DC.DivIcon(
                            new DC.Position(i.lng, i.lat, i.ele || 64),
                            `<div class="public-map-popup ${divclassName}">
                            ${iconEl}
                        </div>`
                        )
                        divIcon.attrParams = i
                        addTileLayers.addOverlay(divIcon)
                    }
                })
                tableData.value = data
                loading.value = false
            })
            .catch((err) => {
                loading.value = false
                console.log(err)
            })
    }
}
nextTick(() => {
    tabClick(tabList.value[0])
})
watch(() => store.rimPosition, () => {
    getLists()
})
const closePanoramaPopup = () => {
    panoramaShow.value = false
}
onBeforeUnmount(() => {
    if (addTileLayers) {
        addTileLayers.clear()
        window.$viewer && window.$viewer.removeLayer(addTileLayers)
        addTileLayers = null
    }
})
// 行点击
function rowClick (row, column, event) {
    if (row.lng && row.lat) {
        window.$viewer.flyToPosition(new DC.Position(row.lng, row.lat, 600, 0, -90, 0))
    }
}
</script>
<template>
    <div class="w100 h0 flex-1 flex f-d-c cur-container">
        <div class="location">
            <div class="point-box"><span>经度:</span><span>{{ store.rimPosition.lng.toFixed(6) }}</span></div>
            <div class="point-box"><span>纬度:</span><span>{{ store.rimPosition.lat.toFixed(6) }}</span></div>
            <div class="set-region">
                <span>范围:</span>
                <span>
                    <el-input v-model="regionVal" type="number" :size="'small'" placeholder="请输入范围" />m
                </span>
            </div>
            <div class="btn">
                <el-button :type="'primary'" :size="'small'" :icon="Search" @click="searchClick">
                </el-button>
            </div>
        </div>
        <div class="tab-list">
            <div :class="{ active: item.select }" v-for="item, index in tabList" :key="index" @click="tabClick(item)">{{
                item.title }}</div>
        </div>
        <!-- <global-search :options="options" @searchBtn="searchBtn" @resetBtn="resetBtn" ref="SeachBarCondition"></global-search> -->
        <div class="h0 flex-1 table-content" ref="TableContent" v-loading="loading"
            element-loading-background="rgba(46, 81, 136, 0.9)">
            <el-table empty-text="暂无数据" @row-click="rowClick" border :data="tableData" :height="curTableHeight"
                style="width: 100%">
                <el-table-column align="center" label="ID" width="42" prop="rank">
                    <template #default="{ $index, row }">
                        {{ $index + 1 }}
                    </template>
                </el-table-column>
                <el-table-column align="center" show-overflow-tooltip prop="firmName" label="企业名称" />
                <el-table-column align="center" show-overflow-tooltip prop="name" label="名称" />
            </el-table>
        </div>
        <panorama v-show="panoramaShow" :title="panoramaTitle" :url="panoramaUrl"
            @closePanoramaPopup="closePanoramaPopup">
        </panorama>
    </div>
</template>
<style lang="scss" scoped>
.el-form-item__label {
    color: #fff !important;
}
.table-content {
    flex-basis: auto;
    height: calc(100% - 40px);
}
.cur-container {
    color: #fff;
    .location {
        padding: 4px 6px;
        display: flex;
        gap: 4px;
        .point-box {
            flex: 1;
        }
        .set-region {
            display: flex;
            width: 112px;
            span {
                display: flex;
                white-space: nowrap;
            }
            ::v-deep(.el-input) {
                .el-input__wrapper {
                    background: rgba(135, 158, 199, 0.2);
                    box-shadow: inset 0px 3px 7px 0px rgba(42, 138, 236, 0.949);
                    border-radius: 4px 4px 4px 4px;
                    border: 1px solid #4081CB;
                }
                input {
                    color: #D4E8F8;
                }
            }
        }
        ::v-deep(.el-button) {
            background: #277DFF;
            border-color: #277DFF;
            &.reset-btn {
                color: #D4E8F8;
                background: #43779B;
                border-color: #43779B;
            }
        }
        div {
            display: flex;
        }
    }
    .tab-list {
        margin: 8px 6px;
        display: flex;
        >div {
            flex: 1;
            display: flex;
            justify-content: center;
            align-items: center;
            background: rgb(103, 135, 214) !important;
            line-height: 32px;
            cursor: pointer !important;
            &.active {
                background: #409eff !important;
            }
        }
    }
}
</style>
src/views/rim/components/leftContainer.vue
New file
@@ -0,0 +1,34 @@
<!--
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2023-03-10 15:27:59
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2025-07-31 20:22:33
 * @FilePath: \bigScreen\src\views\rim\components\leftContainer.vue
 * @Description:
 *
 * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
-->
<script setup>
import dataContent from './box/dataContent.vue'
</script>
<template>
    <div class="left-container">
        <div class="data box h0 flex-1">
            <title-box>
                <template #titleName>
                    周边检索
                </template>
            </title-box>
            <div class="content-box">
                <data-content></data-content>
            </div>
        </div>
    </div>
</template>
<style lang="scss" scoped>
.left-container {
    width: 444px;
}
</style>
src/views/rim/components/rightContainer.vue
New file
@@ -0,0 +1,107 @@
<!--
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2023-03-10 15:27:59
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2024-12-03 13:23:28
 * @FilePath: \bigScreen\src\views\rs\components\leftContainer.vue
 * @Description:
 *
 * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
-->
<script setup>
import EventBus from 'utils/bus'
import { getDictionary } from "@/api/dict/dict"
import { nextTick, onUnmounted, reactive } from 'vue'
const resData = reactive({
    data: [
        {
            label: '一般',
            value: 1
        },
        {
            label: '较大',
            value: 2
        },
        {
            label: '暂定',
            value: 9
        }
    ]
})
const curSelect = ref('')
const tabClick = (item) => {
    if (curSelect.value) EventBus.emit('restHandleDelChange', `4-${curSelect.value}`)
    curSelect.value = item.value
    EventBus.emit('restHandleCheckChange', `4-${item.value}`)
    EventBus.emit('rsTabChange', item.value)
}
nextTick(() => {
    tabClick(resData.data[0])
})
const showOn = computed(() => (item) => {
    if (curSelect.value == item.value) {
        return true
    }
    return false
})
onUnmounted(() => {
    if (curSelect.value) EventBus.emit('restHandleDelChange', `4-${curSelect.value}`)
})
</script>
<template>
    <div class="right-container cur-container">
        <div class="tablist h100">
            <div class="cursor-p" :class="{ on: showOn(item) }" v-for="item, index in resData.data" :key="index"
                @click="tabClick(item)">
                <div class="label-box">
                    {{ item.label }}
                </div>
            </div>
        </div>
    </div>
</template>
<style lang="scss" scoped>
.cur-container {
    background: transparent;
    pointer-events: none;
    .tablist {
        pointer-events: all;
        &>div {
            display: flex;
            align-items: center;
            justify-content: center;
            margin-top: 16px;
            padding: 10px;
            width: 64px;
            height: 64px;
            border-radius: 50%;
            box-shadow: inset 0 0 40px #409eff;
            color: #fff;
            box-sizing: content-box;
            &.on {
                position: relative;
                color: #75b1ff;
            }
            .label-box {
                line-height: 24px;
                text-align: center;
            }
        }
    }
}
</style>
src/views/rim/index.vue
New file
@@ -0,0 +1,29 @@
<!--
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2023-03-10 15:27:59
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2025-07-31 19:51:55
 * @FilePath: \bigScreen\src\views\rim\index.vue
 * @Description: 综合设计
 *
 * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
-->
<script setup>
import leftContainer from './components/leftContainer.vue'
import rightContainer from './components/rightContainer.vue'
</script>
<template>
    <div class="container page-container">
        <left-container></left-container>
        <!-- <right-container></right-container> -->
    </div>
</template>
<style lang="scss" scoped>
.container {
    position: absolute;
    width: 100%;
    height: 100%;
}
</style>