From fd3655a0953675045b92e2b63f0b4bc4a56ea07f Mon Sep 17 00:00:00 2001 From: yaoyuhao Date: Mon, 29 Jul 2024 13:46:02 +0800 Subject: [PATCH] gx --- src/view/sy_map.vue | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/src/view/sy_map.vue b/src/view/sy_map.vue index 483ab35..5fd9043 100644 --- a/src/view/sy_map.vue +++ b/src/view/sy_map.vue @@ -548,6 +548,7 @@ const addPolygonCounty = () => { cfJd.value = item.name; let jdCenter = []; if (item.name == "溪口镇") { + console.log(444444444, choose.value.person); BMAP(); getDatas("溪口镇", ""); getDataBq(cfJd.value, ""); @@ -561,9 +562,8 @@ const addPolygonCounty = () => { choose.value.person == "kjer" ) { console.log(5555555555555555); - // getDataBq(cfJd.value, ""); getDataBqs2(cfJd.value, cfCs.value, choose.value.person, false); - } else { + } else if (choose.value.person != "") { getDatas("溪口镇", choose.value.person); } @@ -729,12 +729,10 @@ const addPolygonCountyCs = () => { ) { getDataBqs2(cfJd.value, cfCs.value, choose.value.person, false); } else { - console.log(2, "溪口镇"); + // console.log(2, "溪口镇"); getDataBqs(cfJd.value, cfCs.value); - // getDatas2("溪口镇", choose.value.person, cfCs.value); - - // getDatas2("溪口镇", choose.value.person, cfCs.value); } + //这段注意 getDatas2(cfJd.value, choose.value.person, cfCs.value); addCsChoose(); addCsUnChoose(); @@ -834,7 +832,7 @@ const addCsUnChoose = () => { map.removeOverlay(cs_qk_arr.value[index]); }); getDataBqs(cfJd.value, cfCs.value); - getDataBq(cfJd.value, cfCs.value); + getDataBq(cfJd.value, cfCs.value); getDatas2(cfJd.value, choose.value.person, cfCs.value); if ( choose.value.person == "cjr" || @@ -1461,7 +1459,7 @@ const changeFwq = async (id, list, center, name, names) => { await getServiceCircle(names, name); choose.value.fwq = id; map.clearOverlays(); //清空地图上所有的覆盖物 - choose.value.person='' + choose.value.person = ""; addggfwq(); //创建公共服务圈 setTimeout(() => { goMapCenter(center, 16); //中心点缩放 @@ -2245,6 +2243,9 @@ const getServiceCircle = async (communityName, townName) => { //获取人口数 const getData = async (i, e) => { + if (e == "9999") { + e = ""; + } await http .get(`/api/ggfwyth/ysyzt/getXzjdrksl?age=${e || ""}`) .then((res) => { @@ -2252,7 +2253,7 @@ const getData = async (i, e) => { if (cfJd.value == "") { personTotal.value = [ { - id: "0", + id: "9999", ages: "总人口", age: "", value: "res.data.total", @@ -2301,6 +2302,9 @@ const getData = async (i, e) => { } }; const getDatas = async (e, i) => { + if (i == "9999") { + i = ""; + } await http .get(`/api/ggfwyth/ysyzt/getCssrksl?town=${e}&age=${i || ""}`) .then((res) => { @@ -2309,7 +2313,7 @@ const getDatas = async (e, i) => { } else if (cfJd.value !== "") { personTotal.value = [ { - id: "0", + id: "9999", ages: "总人口", age: "", value: "res.data.total", @@ -2422,7 +2426,7 @@ const getDatas2 = async (e, i, cs) => { if (res.code == 200) { personTotal.value = [ { - id: "0", + id: "9999", ages: "总人口", age: "", value: "res.data.total",