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 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: '',

View File

@ -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
);

View File

@ -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
);