This commit is contained in:
姚宇浩 2024-07-29 13:06:45 +08:00
parent 9e6c3be7c4
commit 56cea30cf3
1 changed files with 20 additions and 22 deletions

View File

@ -549,10 +549,9 @@ const addPolygonCounty = () => {
let jdCenter = []; let jdCenter = [];
if (item.name == "溪口镇") { if (item.name == "溪口镇") {
BMAP(); BMAP();
if (choose.value.person == 0) { getDatas("溪口镇", "");
getDatas("溪口镇", ""); getDataBq(cfJd.value, "");
getDataBq(cfJd.value, ""); if (
} else if (
choose.value.person == "cjr" || choose.value.person == "cjr" ||
choose.value.person == "dibian" || choose.value.person == "dibian" ||
choose.value.person == "db" || choose.value.person == "db" ||
@ -709,7 +708,6 @@ const addPolygonCountyCs = () => {
} }
}); });
title_choose.value = title_choose.value + `>${item.name}`; title_choose.value = title_choose.value + `>${item.name}`;
console.log(item.name);
cs_qk_arr.value.forEach((item, index) => { cs_qk_arr.value.forEach((item, index) => {
map.removeOverlay(cs_qk_arr.value[index]); map.removeOverlay(cs_qk_arr.value[index]);
}); });
@ -719,15 +717,7 @@ const addPolygonCountyCs = () => {
cs_number_name_arr.value.forEach((item, index) => { cs_number_name_arr.value.forEach((item, index) => {
map.removeOverlay(cs_number_name_arr.value[index]); map.removeOverlay(cs_number_name_arr.value[index]);
}); });
if (choose.value.person == "") { getDataBq(cfJd.value, cfCs.value);
cs_dd_arr.value.map((item, index) => {
DGcreateCs(item, index);
});
} else {
cs_dd_arr.value.map((item, index) => {
DGcreateCs2(item, index);
});
}
if ( if (
choose.value.person == "cjr" || choose.value.person == "cjr" ||
choose.value.person == "dibian" || choose.value.person == "dibian" ||
@ -737,7 +727,6 @@ const addPolygonCountyCs = () => {
choose.value.person == "tyjr" || choose.value.person == "tyjr" ||
choose.value.person == "kjer" choose.value.person == "kjer"
) { ) {
getDataBq(cfJd.value, cfCs.value);
getDataBqs2(cfJd.value, cfCs.value, choose.value.person, false); getDataBqs2(cfJd.value, cfCs.value, choose.value.person, false);
} else { } else {
console.log(2, "溪口镇"); console.log(2, "溪口镇");
@ -748,6 +737,15 @@ const addPolygonCountyCs = () => {
} }
addCsChoose(); addCsChoose();
addCsUnChoose(); addCsUnChoose();
if (choose.value.person == "") {
cs_dd_arr.value.map((item, index) => {
DGcreateCs(item, index);
});
} else {
cs_dd_arr.value.map((item, index) => {
DGcreateCs2(item, index);
});
}
}); });
} }
}); });
@ -853,12 +851,12 @@ const addCsUnChoose = () => {
DGcreateCs(item, index); DGcreateCs(item, index);
}); });
} else { } else {
// setTimeout(() => { setTimeout(() => {
cs_dd_arr.value.map((item, index) => { cs_dd_arr.value.map((item, index) => {
console.log("渲染", item); console.log("渲染", item);
DGcreateCs2(item, index); DGcreateCs2(item, index);
}); });
// }, 100); }, 300);
} }
addCsChoose(); addCsChoose();
addCsUnChoose(); addCsUnChoose();
@ -936,7 +934,7 @@ const createCustomOverlayJd2 = (polygon, indexx) => {
title.appendChild(document.createTextNode(this.properties.title)); title.appendChild(document.createTextNode(this.properties.title));
content.appendChild(div); content.appendChild(div);
var number = document.createElement("div"); var number = document.createElement("div");
number.style.fontSize = "9px"; number.style.fontSize = "11px";
number.style.fontWeight = "600"; number.style.fontWeight = "600";
number.style.color = "#FEFF6C"; number.style.color = "#FEFF6C";
number.style.textShadow = "0px 2px 4px rgba(0,0,0,0.5)"; number.style.textShadow = "0px 2px 4px rgba(0,0,0,0.5)";