This commit is contained in:
姚宇浩 2024-07-24 23:10:12 +08:00
parent df3a04a234
commit 7e248dca71
1 changed files with 15 additions and 31 deletions

View File

@ -587,15 +587,15 @@ const addJd = () => {
};
//2
const addJd2 = () => {
if (center_now.value[0] == 119.178783) {
goMapCenter([119.178783, 29.034581], 11);
}
// if (center_now.value[0] == 119.178783) {
// goMapCenter([119.178783, 29.034581], 11);
// }
mapTownCount.map((item, index) => {
createCustomOverlayJd2(item, index);
});
if (center_now.value[0] == 119.178783) {
goMapCenter([119.178783, 29.034581], 11);
}
// if (center_now.value[0] == 119.178783) {
// goMapCenter([119.178783, 29.034581], 11);
// }
};
//
const loadCs = () => {
@ -1247,28 +1247,7 @@ const removeAllPolygon = (e) => {
//
//
const chooseArr = ref([]);
const xuanran = () => {
addPolygonCounty();
if (chooseArr.value.includes("person")) {
addJd2();
if (chooseArr.value.includes("jd_noNumber")) {
addPolygonCountyCs();
addCs2();
chooseArr.value = chooseArr.value.filter(
(item) => item !== "jd_noNumber"
);
chooseArr.value.push("jd_number");
}
} else {
addJd();
}
if (chooseArr.value.includes("fwq")) {
addggfwq();
}
// if (!chooseArr.value.includes("person")) {
// addJd();
// }
};
const choose = ref({
person: "",
bq: 9999,
@ -1277,6 +1256,7 @@ const choose = ref({
});
const changeRs = (id) => {
if (choose.value.person == id) {
console.log('重复');
// chooseArr.value = chooseArr.value.filter((item) => item !== "person");
choose.value.person = "";
jdm_number_arr.value.forEach((item, index) => {
@ -1307,10 +1287,14 @@ const changeRs = (id) => {
// chooseArr.value.push("jd_noNumber");
// }
// chooseArr.value.push("person");
console.log("new");
choose.value.person = id;
choose.value.bq = 9999;
jdm_arr.value.forEach((item, index) => {
map.removeOverlay(jdm_arr.value[index]);
});
jdm_number_arr.value.forEach((item, index) => {
map.removeOverlay(jdm_number_arr.value[index]);
});
// if (cs_name_arr.value?.length) {
// cs_name_arr.value.forEach((item, index) => {
@ -1325,9 +1309,9 @@ const changeRs = (id) => {
// });
// jdm_number_arr.value.length = 0;
// }
jdm_arr.value.forEach((item, index) => {
map.removeOverlay(jdm_arr.value[index]);
});
// jdm_arr.value.forEach((item, index) => {
// map.removeOverlay(jdm_arr.value[index]);
// });
addJd2();
// removeAllPolygon("person");
// xuanran();