forked from drone/command-center-dashboard

chenyao
2025-04-03 8b92f8cb5763eaf8a8a5d93a4690c923c2de1a85
src/views/Home/useMapAggregation/useMapAggregation.js
@@ -128,11 +128,11 @@
  const findFun = (featItem, numItem) => Number(featItem.region_code.slice(0, 6)) === numItem.properties.adcode;
  const { VITE_APP_BASE,VITE_APP_ENV } = import.meta.env;
  const defaultDir =  `${VITE_APP_BASE}${VITE_APP_ENV === 'development' ? 'public' : ''}/geoJson/100000/`;
  const defaultDir =  `${VITE_APP_BASE}${VITE_APP_ENV === 'development' ? 'public/' : ''}geoJson/100000/`;
  const getFiler = async url => {
    const gJson = await import(/* @vite-ignore */ url);
    return JSON.parse(JSON.stringify(gJson));
    const res = await fetch(url);
    return  await res.json()
  };
  const getOutLine = async (jsonPathPre, hierarchy) => {
    const parentGJson = await getFiler(`${defaultDir}${jsonPathPre}/index.json`);