This commit is contained in:
姚宇浩 2024-10-15 15:43:02 +08:00
parent 56011c95af
commit 325eed58b2
1 changed files with 15 additions and 2 deletions

View File

@ -1853,6 +1853,7 @@ const clearyaosu = () => {
yaosuList.value.length = 0;
zyys_dk.value.length = 0;
zyys_center.value.length = 0;
zyys_choose_cs.value='';
}
};
//
@ -2722,12 +2723,23 @@ const changeRs = (id) => {
};
//----------------------
const zyys_choose_cs = ref("");
const changeys = (name) => {
if (yaosuList.value.includes(name)) {
yaosuList.value = yaosuList.value.filter((ch) => ch !== name);
yaosuIcon.value[name].sj.forEach((item, index) => {
map.removeOverlay(yaosuIcon.value[name].sj[index].overlay);
});
if (name == zyys_choose_cs.value) {
zyys_dk.value.forEach((item, index) => {
map.removeOverlay(item);
});
zyys_center.value.forEach((item, index) => {
map.removeOverlay(item);
});
zyys_dk.value.length = 0;
zyys_center.value.length = 0;
}
} else {
csh();
clearPerson();
@ -2872,6 +2884,7 @@ const createZyys = (polygon, indexx, name, tooltip) => {
case "汽车充电桩":
break;
default:
zyys_choose_cs.value=name;
if (zyys_dk.value.length) {
zyys_dk.value.forEach((item, index) => {
map.removeOverlay(item); //
@ -2891,10 +2904,10 @@ const createZyys = (polygon, indexx, name, tooltip) => {
ElMessage.warning({
message: "地图上未找到对应村社",
});
}else{
} else {
xr_dk_center_zyys();
}
break;
}
}