From 024a1a78c4c5ab0475b911f26ab69a3f66009af2 Mon Sep 17 00:00:00 2001 From: yaoyuhao Date: Thu, 10 Oct 2024 13:44:17 +0800 Subject: [PATCH 1/2] zyys --- src/view/sy_map.vue | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/view/sy_map.vue b/src/view/sy_map.vue index 7d8fc0b..9c52a01 100644 --- a/src/view/sy_map.vue +++ b/src/view/sy_map.vue @@ -1818,6 +1818,29 @@ const clear = () => { xkzCenter.length = 0; xkzDk.length = 0; }; +//清空选中年龄及标签(街道级别) +const clearPerson=()=>{ + if(choose.value.person){ + choose.value.person=''; + jdm_number_arr.value.forEach((item, index) => { + map.removeOverlay(jdm_number_arr.value[index]); + }); + addJd(); + } +} +//清空要素 +const clearyaosu=()=>{ + + if(yaosuList.value.length!=0){ + yaosuList.value.forEach((name,index)=>{ + yaosuIcon.value[name].sj.forEach((item, index) => { + map.removeOverlay(yaosuIcon.value[name].sj[index].overlay); + }); + }) + yaosuList.value.length=0; + } + +} //定义地图中点 const goMapCenter = (point, zoom) => { map.centerAndZoom(new BMapGL.Point(point[0], point[1]), zoom); @@ -1898,6 +1921,7 @@ const buten = async (item) => { } } else { loadingss.value = true; + clearyaosu(); await getData(item.age); await getDatasL(cfJd.value, item.age); loadingss.value = false; @@ -1938,6 +1962,7 @@ const buten2 = async (item) => { } } else { loadingss.value = true; + clearyaosu(); await getDataBqs(cfJd.value, cfCs.value, item.id); loadingss.value = false; } @@ -2690,6 +2715,8 @@ const changeys = (name) => { map.removeOverlay(yaosuIcon.value[name].sj[index].overlay); }); } else { + csh(); + clearPerson(); yaosuList.value.push(name); let url; let img; @@ -3097,6 +3124,7 @@ const changeFwq = async (id, name, names) => { // circle = null; } else { csh(); + clearPerson(); await loadCs(name); await getServiceCircle(names, name); if (fwqList.value.length !== 0) { @@ -3662,6 +3690,9 @@ const addPolygonCounty = () => { // townName.value = item.name; if (item.name == cfJd.value) { } else { + if(yaosuList.value.length!=0){ + return + } loadingss.value = true; clear(); xkzDk.length = 0; From 1335d40a906eb378e268a9416570926db24efcc0 Mon Sep 17 00:00:00 2001 From: yaoyuhao Date: Thu, 10 Oct 2024 14:08:11 +0800 Subject: [PATCH 2/2] 11111 --- src/view/person/index.vue | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/src/view/person/index.vue b/src/view/person/index.vue index f34df6c..6a6e065 100644 --- a/src/view/person/index.vue +++ b/src/view/person/index.vue @@ -352,7 +352,7 @@ :class=" item.label == '学校' || item.label == '班级' ? 'widu' : '' " - v-if="rightList?.length != 0" + v-if="rightList?.length != 0 && item.show==true" > {{ item.label }} @@ -902,6 +902,21 @@ const getTable = (url, csh) => { } else { // 如果数据不为空,则将数据赋值给列表 rightList.value = tableType.data[0]; + for(const key in tableType.data[0]){ + if(tableType.data[0][key] == null){ + tableType.columns.forEach((item) => { + if(item.property == key){ + item.show=false + } + }) + }else{ + tableType.columns.forEach((item) => { + if(item.property == key){ + item.show=true + } + }) + } + } rightTypeShow.value = false; // if (res.data[0].gzsj === null) { // rightTypeShow.value = true;