From 7e248dca71c2c3253ff32216e2036d679f4e22f6 Mon Sep 17 00:00:00 2001 From: yaoyuhao Date: Wed, 24 Jul 2024 23:10:12 +0800 Subject: [PATCH 1/2] gx --- src/view/sy_map.vue | 46 +++++++++++++++------------------------------ 1 file changed, 15 insertions(+), 31 deletions(-) diff --git a/src/view/sy_map.vue b/src/view/sy_map.vue index aa75e9c..17855f2 100644 --- a/src/view/sy_map.vue +++ b/src/view/sy_map.vue @@ -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(); From c3773ead5d84f09cb97059f0adadf59522583b26 Mon Sep 17 00:00:00 2001 From: yaoyuhao Date: Thu, 25 Jul 2024 08:59:21 +0800 Subject: [PATCH 2/2] gx --- src/view/sy_map.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/view/sy_map.vue b/src/view/sy_map.vue index 17855f2..4b43084 100644 --- a/src/view/sy_map.vue +++ b/src/view/sy_map.vue @@ -872,7 +872,8 @@ const createCustomOverlayJd2 = (polygon, indexx) => { var number = document.createElement("div"); number.style.fontSize = "9px"; number.style.fontWeight = "600"; - number.style.color = "rgba(0, 255, 189, 1)"; + number.style.color = "#FEFF6C"; + number.style.textShadow='0px 2px 4px rgba(0,0,0,0.5)'; div.appendChild(number); number.appendChild(document.createTextNode(this.properties.number)); content.appendChild(div); @@ -2340,7 +2341,7 @@ onMounted(() => { position: absolute; width: 3px; height: 3px; - background: #ffe229; + background: rgb(255, 226, 41); border: 3px solid rgba(255, 226, 41, 0.31); border-radius: 6px; top: 7.5px;