guonan
2025-06-18 1188387a47e55590a87c161cb43b2db0729b0146
src/views/Home.vue
@@ -60,6 +60,7 @@
import { showDeviceDetail } from "@/store";
import { setupTokenRefresh, getDangerPoint } from "@/api/hpApi.js";
import { convertToWKT } from "@/utils/wktUtils";
import { getDeviceInfo, getSafePoint } from "@/api/hpApi";
const route = useRoute();
const simStore = useSimStore();
@@ -99,6 +100,7 @@
// 计算属性
const showDetail = computed(() => showDeviceDetail.value);
onMounted(async () => {
  setupTokenRefresh(); // 获取宏图token
  // getSimData(); //测试tr后端
@@ -106,6 +108,10 @@
  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');