This commit is contained in:
汪汇 2024-07-24 17:35:46 +08:00
parent c6ead9f002
commit f1b35c0be0
1 changed files with 24 additions and 6 deletions

View File

@ -116,7 +116,7 @@ const cs_qk_arr = ref([]);
const cs_name_arr = ref([]); const cs_name_arr = ref([]);
const cs_number_name_arr = ref([]); const cs_number_name_arr = ref([]);
// //
const jrcs=ref(false) const jrcs = ref(false)
const title_choose = ref("龙游县"); const title_choose = ref("龙游县");
// //
const colorList = [ const colorList = [
@ -389,16 +389,17 @@ const addPolygonCounty = () => {
map.addOverlay(polygon); map.addOverlay(polygon);
polygon.addEventListener("click", () => { polygon.addEventListener("click", () => {
console.log(item.name); console.log(item.name);
if(item.name !== "溪口镇"){ getDatas(item.name)
jrcs.value=false; if (item.name !== "溪口镇") {
console.log( jrcs.value,'000'); jrcs.value = false;
console.log(jrcs.value, '000');
} }
if (jrcs.value && item.name !== "溪口镇") { if (jrcs.value && item.name !== "溪口镇") {
console.log(1); console.log(1);
} else { } else {
console.log(2); console.log(2);
jrcs.value=true; jrcs.value = true;
let jdCenter = []; let jdCenter = [];
if (item.name == "溪口镇") { if (item.name == "溪口镇") {
if (!title_choose.value.includes("溪口镇")) { if (!title_choose.value.includes("溪口镇")) {
@ -411,7 +412,7 @@ const addPolygonCounty = () => {
jdCenter = item.center; jdCenter = item.center;
} }
}); });
console.log( jrcs.value); console.log(jrcs.value);
addCs(); addCs();
goMapCenter(jdCenter, 13); goMapCenter(jdCenter, 13);
} else { } else {
@ -1759,6 +1760,23 @@ const getData = async (i, e) => {
changeRs(i) changeRs(i)
} }
}; };
const getDatas = async (e) => {
await http.get(`/api/ggfwyth/ysyzt/getCssrksl?town=${e}`).then((res) => {
if (res.code == 200) {
res.data.committee.map((item) => {
xkzCenter.map((items) => {
if (item.committee == items.name) {
items.number = item.rksl
}
})
})
console.log(res);
}
});
};
const reset_font = () => { const reset_font = () => {
let width = document.documentElement.clientWidth || document.body.clientWidth; let width = document.documentElement.clientWidth || document.body.clientWidth;
let height = let height =