| | |
| | | import { initeWaterPrimitiveView } from "@/utils/water"; //相机flyTo函数,后续options列表中有对应经纬度后弃用 |
| | | import { useRoute, onBeforeRouteUpdate } from "vue-router"; |
| | | import { Loading } from "@element-plus/icons-vue"; |
| | | import { fetchAndLoadDangerPoints } from "@/api/hpApi.js"; |
| | | |
| | | const districtList = ref([]); |
| | | |
| | | const displayData = ref([]); |
| | | |
| | | const loadCallback = async (newData) => { |
| | | districtList.value = [...newData]; |
| | | console.log(districtList.value, "aaaaaaaaaaaaaaaaaaaaaaaaa"); |
| | | |
| | | await initializeDevicePoints(); |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | fetchAndLoadDangerPoints(loadCallback); |
| | | }); |
| | | |
| | | const simStore = useSimStore(); |
| | | // onBeforeRouteUpdate((to, from, next) => { |
| | |
| | | }, |
| | | ]); |
| | | |
| | | const districtList = ref([]); |
| | | const loading = ref(true); // 控制加载状态 |
| | | |
| | | function handleClick(district) { |
| | |
| | | }) |
| | | ); |
| | | }; |
| | | // 根据区域名称过滤数据 |
| | | |
| | | const filterDataByArea = async (areaName) => { |
| | | handleCleanup(); |
| | | if (!areaName || !simStore.DangerPoint || simStore.DangerPoint.length === 0) { |
| | |
| | | ); |
| | | |
| | | if (JSON.stringify(districtList.value) !== JSON.stringify(filteredData)) { |
| | | districtList.value = filteredData; |
| | | // districtList.value = filteredData; |
| | | |
| | | await initializeDevicePoints(); |
| | | } |
| | | }; |