From 56cea30cf38d91cfd3b74c91b8cf73ac52499725 Mon Sep 17 00:00:00 2001 From: yaoyuhao Date: Mon, 29 Jul 2024 13:06:45 +0800 Subject: [PATCH] gx --- src/view/sy_map.vue | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/src/view/sy_map.vue b/src/view/sy_map.vue index 37f3401..7ac2bab 100644 --- a/src/view/sy_map.vue +++ b/src/view/sy_map.vue @@ -549,10 +549,9 @@ const addPolygonCounty = () => { let jdCenter = []; if (item.name == "溪口镇") { BMAP(); - if (choose.value.person == 0) { - getDatas("溪口镇", ""); - getDataBq(cfJd.value, ""); - } else if ( + getDatas("溪口镇", ""); + getDataBq(cfJd.value, ""); + if ( choose.value.person == "cjr" || choose.value.person == "dibian" || choose.value.person == "db" || @@ -709,7 +708,6 @@ const addPolygonCountyCs = () => { } }); title_choose.value = title_choose.value + `>${item.name}`; - console.log(item.name); cs_qk_arr.value.forEach((item, index) => { map.removeOverlay(cs_qk_arr.value[index]); }); @@ -719,15 +717,7 @@ const addPolygonCountyCs = () => { cs_number_name_arr.value.forEach((item, index) => { map.removeOverlay(cs_number_name_arr.value[index]); }); - 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); - }); - } + getDataBq(cfJd.value, cfCs.value); if ( choose.value.person == "cjr" || choose.value.person == "dibian" || @@ -737,7 +727,6 @@ const addPolygonCountyCs = () => { choose.value.person == "tyjr" || choose.value.person == "kjer" ) { - getDataBq(cfJd.value, cfCs.value); getDataBqs2(cfJd.value, cfCs.value, choose.value.person, false); } else { console.log(2, "溪口镇"); @@ -748,6 +737,15 @@ const addPolygonCountyCs = () => { } addCsChoose(); 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); }); } else { - // setTimeout(() => { - cs_dd_arr.value.map((item, index) => { - console.log("渲染", item); - DGcreateCs2(item, index); - }); - // }, 100); + setTimeout(() => { + cs_dd_arr.value.map((item, index) => { + console.log("渲染", item); + DGcreateCs2(item, index); + }); + }, 300); } addCsChoose(); addCsUnChoose(); @@ -936,7 +934,7 @@ const createCustomOverlayJd2 = (polygon, indexx) => { title.appendChild(document.createTextNode(this.properties.title)); content.appendChild(div); var number = document.createElement("div"); - number.style.fontSize = "9px"; + number.style.fontSize = "11px"; number.style.fontWeight = "600"; number.style.color = "#FEFF6C"; number.style.textShadow = "0px 2px 4px rgba(0,0,0,0.5)";