diff --git a/src/view/delivery/components/center.vue b/src/view/delivery/components/center.vue index 2821de5..c8bf920 100644 --- a/src/view/delivery/components/center.vue +++ b/src/view/delivery/components/center.vue @@ -18,6 +18,7 @@ import longma_geo from "@/utils/longma_geo.js"; import gulin_geo from "@/utils/gulin_geo.js"; import hejiang_geo from "@/utils/hejiang_geo.js"; import naxi_geo from "@/utils/naxi_geo.js"; +import { getStreet, getArea } from "@/api/index.js"; import { useAppStore } from "@/store/app.js"; import geoJSON from "@/utils/geo.js"; @@ -495,7 +496,7 @@ const initMap = () => { }); } -const mapInfo = () => { +const mapInfo = async () => { let area = appStore.area.find( (item) => item.code == appStore.address.areaCode ); @@ -513,9 +514,6 @@ const mapInfo = () => { (item) => item.code == appStore.address.streetCode ); initStreetMap(street, map); - // dataValue = dataValue.filter( - // (item) => item.street_code == appStore.address.streetCode - // ); } if (route.query.name) { initStreetMap({name: route.query.name}, map); } else { @@ -532,6 +530,7 @@ const initStreetMap = (street, map) => { }; const filterMap = () => { + console.log('------==-------',geoJson); geoJson.features = geoJson.features.filter((item) => { return item.properties.name == route.query.name }) @@ -539,9 +538,9 @@ const filterMap = () => { onMounted(() => { - if (route.query.name) { - filterMap() - } + // if (route.query.name) { + // filterMap() + // } // dataValue = props.list; // dataValue[0] = { // name: '福集镇养殖基地', diff --git a/src/view/index/components/center.vue b/src/view/index/components/center.vue index 51b11a2..2544f96 100644 --- a/src/view/index/components/center.vue +++ b/src/view/index/components/center.vue @@ -18,6 +18,7 @@ import longma_geo from "@/utils/longma_geo.js"; import gulin_geo from "@/utils/gulin_geo.js"; import hejiang_geo from "@/utils/hejiang_geo.js"; import naxi_geo from "@/utils/naxi_geo.js"; +import { getStreet, getArea } from "@/api/index.js"; import { useAppStore } from "@/store/app.js"; import { sendMsg } from "@/api/sendMsg.js"; @@ -524,7 +525,7 @@ const initMap = () => { }); } -const mapInfo = () => { +const mapInfo = async () => { let area = appStore.area.find( (item) => item.code == appStore.address.areaCode ); diff --git a/src/view/indexc/components/center2.vue b/src/view/indexc/components/center2.vue index ef7cf8d..62b7200 100644 --- a/src/view/indexc/components/center2.vue +++ b/src/view/indexc/components/center2.vue @@ -19,6 +19,7 @@ import longma_geo from "@/utils/longma_geo.js"; import gulin_geo from "@/utils/gulin_geo.js"; import hejiang_geo from "@/utils/hejiang_geo.js"; import naxi_geo from "@/utils/naxi_geo.js"; +import { getStreet, getArea } from "@/api/index.js"; import { useAppStore } from "@/store/app.js"; import geoJSON from "@/utils/geo.js"; @@ -508,7 +509,7 @@ const initMap = () => { }); } -const mapInfo = () => { +const mapInfo = async () => { let area = appStore.area.find( (item) => item.code == appStore.address.areaCode );