diff --git a/src/view/sy_map.vue b/src/view/sy_map.vue index d1fbafb..6e98b7d 100644 --- a/src/view/sy_map.vue +++ b/src/view/sy_map.vue @@ -1353,6 +1353,7 @@ const getDatas2 = async (e, i, cs) => { //特殊标签 //获取特殊标签 +//左侧列表数据 const getDataBq = async (jd, cs) => { await http .get(`/api/ggfwyth/ysyzt/getBqRs?committee=${cs || ""}&town=${jd || ""}`) @@ -1396,7 +1397,6 @@ const getDataBqs = async (jd, cs, bq) => { const getDataBqs2 = async (jd, cs, bq) => { //f用来判断执不执行changeRs2 let data = {}; - let vv = 0; let tagIdBq; tsbq_id_total.value.forEach((item, index) => { if (bq == item.name) { @@ -1407,20 +1407,17 @@ const getDataBqs2 = async (jd, cs, bq) => { data = { tagId: tagIdBq, }; - vv = 1; } else if (cs == "") { data = { town: jd, tagId: tagIdBq, }; - vv = 2; } else { data = { town: jd, tagId: tagIdBq, committee: cs, }; - vv = 3; } await http .get(`/api/ggfwyth/ysyzt/getBqRsByTownAndCommittee`, data) @@ -1479,34 +1476,19 @@ const getDataBqs2 = async (jd, cs, bq) => { }; //单点选择区域获取特殊标签 const getDataBqs3 = async (jd, cs, bq) => { - //f用来判断执不执行changeRs2 let data = {}; - let vv = 0; let tagIdBq; tsbq_id_total.value.forEach((item, index) => { if (bq == item.name) { tagIdBq = item.tagId; } }); - if (cs == "" && jd == "") { - data = { - tagId: btagIdBqq, - }; - vv = 1; - } else if (cs == "") { - data = { - town: jd, - tagId: tagIdBq, - }; - vv = 2; - } else { - data = { - town: jd, - tagId: tagIdBq, - committee: cs, - }; - vv = 3; - } + data = { + town: jd, + tagId: tagIdBq, + committee: cs, + }; + await http .get(`/api/ggfwyth/ysyzt/getBqRsByTownAndCommittee`, data) .then((res) => { @@ -1537,34 +1519,18 @@ const getDataBqs3 = async (jd, cs, bq) => { }; //点击地图区块进入社区取消await的影响 const getDataBqs4 = async (jd, cs, bq) => { - //f用来判断执不执行changeRs2 let data = {}; - let vv = 0; let tagIdBq; tsbq_id_total.value.forEach((item, index) => { if (bq == item.name) { tagIdBq = item.tagId; } }); - if (cs == "" && jd == "") { - data = { - tagId: tagIdBq, - }; - vv = 1; - } else if (cs == "") { - data = { - town: jd, - tagId: tagIdBq, - }; - vv = 2; - } else { - data = { - town: jd, - tagId: tagIdBq, - committee: cs, - }; - vv = 3; - } + data = { + town: jd, + tagId: tagIdBq, + }; + http.get(`/api/ggfwyth/ysyzt/getBqRsByTownAndCommittee`, data).then((res) => { if (res.code == 200) { if (cfJd.value != "") { @@ -1643,19 +1609,12 @@ const getDataBqJD = async (bq) => { }); }); } - changeRs2(bq); + changeRs(bq); } }); }; //人口,标签切换执行 const changeRs = (id) => { - // if (choose.value.person == id) { - // choose.value.person = ""; - // jdm_number_arr.value.forEach((item, index) => { - // map.removeOverlay(jdm_number_arr.value[index]); - // }); - // addJd(); - // } else { choose.value.person = id; jdm_arr.value.forEach((item, index) => { map.removeOverlay(jdm_arr.value[index]); @@ -1664,26 +1623,8 @@ const changeRs = (id) => { map.removeOverlay(jdm_number_arr.value[index]); }); addJd2(); - // } -}; -const changeRs2 = (id) => { - // if (choose.value.person == id) { - // choose.value.person = ""; - // jdm_number_arr.value.forEach((item, index) => { - // map.removeOverlay(jdm_number_arr.value[index]); - // }); - // addJd(); - // } else { - choose.value.person = id; - 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]); - }); - addJd2(); - // } }; + //----------资源要素------------ const changeys = (name) => { if (yaosuList.value.includes(name)) {