This commit is contained in:
parent
2ad44878a5
commit
ea1bd22908
|
@ -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: '福集镇养殖基地',
|
||||||
|
|
|
@ -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
|
||||||
);
|
);
|
||||||
|
|
|
@ -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
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue