guonan
2025-06-12 b23bc4d88ed6215fdda94dc94a15dd62e9f4a5cc
src/views/Home.vue
@@ -59,12 +59,11 @@
// import DangerAssess from "@/components/monifangzhen/DangerAssess.vue";
import { showDeviceDetail } from "@/store";
import { setupTokenRefresh, getDangerPoint } from "@/api/hpApi.js";
import { getSimData, fetchWaterSimulationData } from "@/api/trApi.js";
import { convertToWKT } from "@/utils/wktUtils";
import { getDeviceInfo } from "@/api/hpApi";
const route = useRoute();
const simStore = useSimStore();
const backHome = ref(false);
// 接收来自 ComponentA 的事件,并更新 isFlying
function handleBackToHome() {
@@ -103,11 +102,15 @@
onMounted(async () => {
  setupTokenRefresh(); // 获取宏图token
  getSimData(); //测试tr后端
  // getSimData(); //测试tr后端
  // 获取隐患点列表(因为中科软后端接口获取加载时间较长)
  getDangerPoint().then((res) => {
  getDangerPoint("110116110000").then((res) => {
    simStore.DangerPoint = res.data.pageData;
  });
  getDeviceInfo(null,"110116110000").then((res) => {
    simStore.devices = res.data.pageData;
  });
  try {
    const wktResult = convertToWKT(multiPolygonCoordinates);
    // console.log(wktResult,'a');