This commit is contained in:
weipengfei 2024-02-24 14:12:14 +08:00
parent 2ad44878a5
commit ea1bd22908
3 changed files with 10 additions and 9 deletions

View File

@ -18,6 +18,7 @@ import longma_geo from "@/utils/longma_geo.js";
import gulin_geo from "@/utils/gulin_geo.js"; import gulin_geo from "@/utils/gulin_geo.js";
import hejiang_geo from "@/utils/hejiang_geo.js"; import hejiang_geo from "@/utils/hejiang_geo.js";
import naxi_geo from "@/utils/naxi_geo.js"; import naxi_geo from "@/utils/naxi_geo.js";
import { getStreet, getArea } from "@/api/index.js";
import { useAppStore } from "@/store/app.js"; import { useAppStore } from "@/store/app.js";
import geoJSON from "@/utils/geo.js"; import geoJSON from "@/utils/geo.js";
@ -495,7 +496,7 @@ const initMap = () => {
}); });
} }
const mapInfo = () => { const mapInfo = async () => {
let area = appStore.area.find( let area = appStore.area.find(
(item) => item.code == appStore.address.areaCode (item) => item.code == appStore.address.areaCode
); );
@ -513,9 +514,6 @@ const mapInfo = () => {
(item) => item.code == appStore.address.streetCode (item) => item.code == appStore.address.streetCode
); );
initStreetMap(street, map); initStreetMap(street, map);
// dataValue = dataValue.filter(
// (item) => item.street_code == appStore.address.streetCode
// );
} if (route.query.name) { } if (route.query.name) {
initStreetMap({name: route.query.name}, map); initStreetMap({name: route.query.name}, map);
} else { } else {
@ -532,6 +530,7 @@ const initStreetMap = (street, map) => {
}; };
const filterMap = () => { const filterMap = () => {
console.log('------==-------',geoJson);
geoJson.features = geoJson.features.filter((item) => { geoJson.features = geoJson.features.filter((item) => {
return item.properties.name == route.query.name return item.properties.name == route.query.name
}) })
@ -539,9 +538,9 @@ const filterMap = () => {
onMounted(() => { onMounted(() => {
if (route.query.name) { // if (route.query.name) {
filterMap() // filterMap()
} // }
// dataValue = props.list; // dataValue = props.list;
// dataValue[0] = { // dataValue[0] = {
// name: '', // name: '',

View File

@ -18,6 +18,7 @@ import longma_geo from "@/utils/longma_geo.js";
import gulin_geo from "@/utils/gulin_geo.js"; import gulin_geo from "@/utils/gulin_geo.js";
import hejiang_geo from "@/utils/hejiang_geo.js"; import hejiang_geo from "@/utils/hejiang_geo.js";
import naxi_geo from "@/utils/naxi_geo.js"; import naxi_geo from "@/utils/naxi_geo.js";
import { getStreet, getArea } from "@/api/index.js";
import { useAppStore } from "@/store/app.js"; import { useAppStore } from "@/store/app.js";
import { sendMsg } from "@/api/sendMsg.js"; import { sendMsg } from "@/api/sendMsg.js";
@ -524,7 +525,7 @@ const initMap = () => {
}); });
} }
const mapInfo = () => { const mapInfo = async () => {
let area = appStore.area.find( let area = appStore.area.find(
(item) => item.code == appStore.address.areaCode (item) => item.code == appStore.address.areaCode
); );

View File

@ -19,6 +19,7 @@ import longma_geo from "@/utils/longma_geo.js";
import gulin_geo from "@/utils/gulin_geo.js"; import gulin_geo from "@/utils/gulin_geo.js";
import hejiang_geo from "@/utils/hejiang_geo.js"; import hejiang_geo from "@/utils/hejiang_geo.js";
import naxi_geo from "@/utils/naxi_geo.js"; import naxi_geo from "@/utils/naxi_geo.js";
import { getStreet, getArea } from "@/api/index.js";
import { useAppStore } from "@/store/app.js"; import { useAppStore } from "@/store/app.js";
import geoJSON from "@/utils/geo.js"; import geoJSON from "@/utils/geo.js";
@ -508,7 +509,7 @@ const initMap = () => {
}); });
} }
const mapInfo = () => { const mapInfo = async () => {
let area = appStore.area.find( let area = appStore.area.find(
(item) => item.code == appStore.address.areaCode (item) => item.code == appStore.address.areaCode
); );