From ea1bd2290848d0372fbd688bba4ba33f1eb9b91c Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Sat, 24 Feb 2024 14:12:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/view/delivery/components/center.vue | 13 ++++++------- src/view/index/components/center.vue | 3 ++- src/view/indexc/components/center2.vue | 3 ++- 3 files changed, 10 insertions(+), 9 deletions(-) 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 );