forked from drone/command-center-dashboard

shuishen
2025-04-16 a7e6761ba0cfccdf33ed552eb2d3b783c8e4ab4a
src/hooks/useMapAggregation/useMapAggregation.js
@@ -4,8 +4,8 @@
import uavImg from '@/assets/images/home/useUavHome/uavImg.png'
import eventSingle from '@/assets/images/home/useEventOperate/eventSingle.png'
import DevicePopUpBox from '@/hooks/useMapAggregation/DevicePopUpBox.vue'
import EventPopUpBox from '@/hooks/useMapAggregation/EventPopUpBox.vue'
import DevicePopUpBox from '@/hooks/components/DevicePopUpBox.vue'
import EventPopUpBox from '@/hooks/components/EventPopUpBox.vue'
import { render } from 'vue'
import { useStore } from 'vuex'
@@ -137,14 +137,12 @@
      if (arr.length !== 0) {
        returnObj.childrens = arr
      }
      console.log(returnObj, '111111')
      return returnObj
    })
  }
  // 获取事件聚合
  function getMapEventCount (params) {
    console.log(5555555)
    return getMapEvents(params).then(res => {
      const resData = res?.data?.data
      if (resData?.data) {
@@ -185,7 +183,6 @@
    eventList = []
    if (!areaCode) return
    saveParams.area_code = areaCode
    console.log(type, '444')
    const list = type === 'device' ? await getDeviceCount(areaCode) : await getMapEventCount(saveParams)
    const splashedList = type === 'device'
      ? await getDeviceList(areaCode)
@@ -248,8 +245,6 @@
      return
    }
    handlerInit()
    if (newValue.eventTimeType) {
      saveParams = { area_code: newValue.selectedAreaCode, date_enum: store.state.home.eventTimeParams }
    }
@@ -260,6 +255,8 @@
    needFly = true
    if (!viewer) return
    handlerInit()
    viewer.scene.postRender.removeEventListener(determineScaling)
    initMapData(newValue.selectedAreaCode).then(() => {