| | |
| | | import { createPoint, removeEntities, addTileset } from "@/utils/map"; |
| | | import { deviceDictList, getDictName } from "@/constant/dict.js"; |
| | | import { useRoute } from "vue-router"; |
| | | import { loadAreaPolygon, clearAreaPolygon } from "@/utils/area"; |
| | | import { |
| | | loadAreaPolygon, |
| | | convertToGeoJson, |
| | | clearAreaPolygon, |
| | | } from "@/utils/area"; |
| | | import { checkedKeys } from "@/store/index"; |
| | | import { getDuanMainData } from "@/api/index.js"; |
| | | import { useSimStore } from "@/store/simulation"; |
| | | import { getSafePoint } from "@/api/hpApi"; |
| | | |
| | | const simStore = useSimStore(); |
| | | const route = useRoute(); |
| | |
| | | * 添加避险场所数据 |
| | | */ |
| | | function addTetrahedron() { |
| | | loadAreaPolygon("/json/emergency_area.geojson", true).then((entities) => { |
| | | entities.forEach((entity) => (entity.show = false)); |
| | | treeMap.set("避险场所", entities); |
| | | getSafePoint().then((res) => { |
| | | const geoJsonData = convertToGeoJson(res.data); // 转换为 GeoJSON |
| | | // 加载 GeoJSON 数据到地图 |
| | | loadAreaPolygon(geoJsonData, true).then((entities) => { |
| | | entities.forEach((entity) => (entity.show = false)); |
| | | treeMap.set("避险场所", entities); |
| | | }); |
| | | }); |
| | | } |
| | | |
| | |
| | | const defaultKeys = [...defaultSelectedKeys.value]; |
| | | const checkedKeys = |
| | | { |
| | | // 页面默认勾选显示在此处 |
| | | "/yhgl": [...defaultKeys, "孙胡沟隐患点"], |
| | | "/zhjc": [...defaultKeys, "综合监测设备信息"], |
| | | // "/mnfz": [...defaultKeys, "孙胡沟断面"], |