This commit is contained in:
姚宇浩 2024-07-25 13:23:19 +08:00
parent 281264d230
commit 67132c6da2
1 changed files with 11 additions and 5 deletions

View File

@ -367,7 +367,7 @@ const xkzCenter = reactive([
}, },
{ {
name: "大阳家村", name: "大阳家村",
center: [119.16442376733693, 29.89890581872806], center: [119.165141274073,28.89860048623702],
number: "50", number: "50",
}, },
{ {
@ -732,10 +732,18 @@ const addCsUnChoose = () => {
}); });
map.addOverlay(cs_un_choose_arr.value[index]); map.addOverlay(cs_un_choose_arr.value[index]);
cs_un_choose_arr.value[index].addEventListener("click", () => { cs_un_choose_arr.value[index].addEventListener("click", () => {
console.log(cfCs.value, cfCs.value.length);
title_choose.value = title_choose.value.slice(
0,
-(cfCs.value.length + 1)
);
console.log("删除后", title_choose.value);
cfCs.value = item.name; cfCs.value = item.name;
sfdd.value = true;
title_choose.value = title_choose.value.slice(0, -4);
title_choose.value = title_choose.value + `>${cfCs.value}`; title_choose.value = title_choose.value + `>${cfCs.value}`;
console.log("添加后", title_choose.value);
sfdd.value = true;
cs_dd_arr.value.forEach((item, index) => { cs_dd_arr.value.forEach((item, index) => {
map.removeOverlay(cs_dd_arr.value[index]); map.removeOverlay(cs_dd_arr.value[index]);
}); });
@ -745,7 +753,6 @@ const addCsUnChoose = () => {
cs_choose_arr.value.forEach((item, index) => { cs_choose_arr.value.forEach((item, index) => {
map.removeOverlay(cs_choose_arr.value[index]); map.removeOverlay(cs_choose_arr.value[index]);
}); });
title_choose.value = title_choose.value.slice(0, -4);
chooseCsList.value.length = 0; chooseCsList.value.length = 0;
unChooseList.value.length = 0; unChooseList.value.length = 0;
cs_dd_arr.value = []; cs_dd_arr.value = [];
@ -763,7 +770,6 @@ const addCsUnChoose = () => {
unChooseList.value.push(itemm); unChooseList.value.push(itemm);
} }
}); });
title_choose.value = title_choose.value + `>${item.name}`;
cs_un_choose_arr.value.forEach((item, index) => { cs_un_choose_arr.value.forEach((item, index) => {
map.removeOverlay(cs_qk_arr.value[index]); map.removeOverlay(cs_qk_arr.value[index]);
}); });