| | |
| | | import { loadAreaPolygon, clearAreaPolygon } from "@/utils/area"; |
| | | import { checkedKeys } from "@/store/index"; |
| | | import { getDuanMainData, getDistrictListData } from "@/api/index.js"; |
| | | import { getDeviceInfo, getDangerPoint } from "@/api/hpApi"; |
| | | import { getDeviceInfoShg, getDangerPoint } from "@/api/hpApi"; |
| | | |
| | | import { useSimStore } from "@/store/simulation"; |
| | | |
| | |
| | | |
| | | // 监测设备列表 |
| | | const getDevicetList = async () => { |
| | | const res = await getDeviceInfo(); // 调整getDeviceInfo以接受动态参数,如果需要的话 |
| | | const res = await getDeviceInfoShg(); // 调整getDeviceInfoShg以接受动态参数,如果需要的话 |
| | | devicetList.value = res.data.pageData.filter((item) => |
| | | item.deviceName?.includes("孙胡沟") |
| | | ); |
| | |
| | | } |
| | | |
| | | // 隐患点列表 |
| | | // watchEffect(() => { |
| | | // const dangerPoints = simStore.DangerPoint.filter((item) => |
| | | // item.position?.includes("孙胡沟") |
| | | // ); |
| | | watchEffect(() => { |
| | | const dangerPoints = simStore.DangerPoint.filter((item) => |
| | | item.position?.includes("孙胡沟") |
| | | ); |
| | | |
| | | // if (dangerPoints && dangerPoints.length > 0) { |
| | | // const list = []; |
| | | if (dangerPoints && dangerPoints.length > 0) { |
| | | const list = []; |
| | | |
| | | // dangerPoints.forEach((item) => { |
| | | // // console.log(item, "item"); |
| | | // item.id = item.hdId; |
| | | // item.name = item.hdName; |
| | | // item.latitude = item.lat; |
| | | // item.longitude = item.lon; |
| | | // item.showBillboard = true; |
| | | // item.type = item.disasterType; |
| | | // item.className = "district"; |
| | | // const entity = createPoint(item); |
| | | // entity.show = false; |
| | | // list.push(entity); |
| | | // }); |
| | | dangerPoints.forEach((item) => { |
| | | // console.log(item, "item"); |
| | | item.id = item.hdId; |
| | | item.name = item.hdName; |
| | | item.latitude = item.lat; |
| | | item.longitude = item.lon; |
| | | item.showBillboard = true; |
| | | item.type = item.disasterType; |
| | | item.className = "district"; |
| | | const entity = createPoint(item); |
| | | entity.show = false; |
| | | list.push(entity); |
| | | }); |
| | | |
| | | // treeMap.set("孙胡沟隐患点", list); |
| | | // } |
| | | // }); |
| | | treeMap.set("孙胡沟隐患点", list); |
| | | } |
| | | }); |
| | | |
| | | let divPointList = []; |
| | | /** |
| | |
| | | * 初始化所有数据 |
| | | */ |
| | | function getData() { |
| | | // initDevicePoint(); |
| | | initDevicePoint(); |
| | | // initDistrictPoint(); |
| | | initDuanmianPoint(); |
| | | addTetrahedron(); |