This commit is contained in:
duanxiaohai 2024-07-26 18:00:43 +08:00
commit c7acd8d501
1 changed files with 66 additions and 50 deletions

View File

@ -264,6 +264,7 @@ const csh = () => {
}
goMapCenter([119.178783, 29.034583], 11);
getData();
getDataBq()
};
//
const chooseCsList = ref([]);
@ -573,7 +574,7 @@ const addPolygonCounty = () => {
choose.value.person == "kjer"
) {
getDataBq(cfJd.value, "");
getDataBqs2(cfJd.value, "", choose.value.person);
getDataBqs2(cfJd.value, cfCs.value, choose.value.person,);
console.log(3);
} else {
console.log(4);
@ -634,6 +635,8 @@ const addPolygonCounty = () => {
cs_un_choose_arr.value = [];
cs_dd_arr.value = [];
getData();
getDataBq()
}
}
@ -738,19 +741,13 @@ const addPolygonCountyCs = () => {
DGcreateCs2(item, index);
});
}
if (
choose.value.person == "cjr" ||
choose.value.person == "dibian" ||
choose.value.person == "db" ||
choose.value.person == "gxy" ||
choose.value.person == "tnb" ||
choose.value.person == "tyjr" ||
choose.value.person == "kjer"
) {
console.log(1, "溪口镇");
getDataBqs2(cfJd.value, cfCs.value, "");
if (choose.value.person == "cjr" || choose.value.person == "dibian" || choose.value.person == "db" || choose.value.person == "gxy" || choose.value.person == "tnb" || choose.value.person == "tyjr" || choose.value.person == "kjer") {
getDataBq(cfJd.value, cfCs.value)
getDataBqs2(cfJd.value, cfCs.value, choose.value.person);
} else {
console.log(2, "溪口镇");
console.log(2, '溪口镇');
getDataBqs(cfJd.value, cfCs.value)
getDatas2('溪口镇', choose.value.person, cfCs.value);
getDatas2("溪口镇", choose.value.person, cfCs.value);
}
@ -842,6 +839,7 @@ const addCsUnChoose = () => {
cs_un_choose_arr.value.forEach((item, index) => {
map.removeOverlay(cs_qk_arr.value[index]);
});
getDataBqs(cfJd.value, cfCs.value)
getDatas2(cfJd.value, choose.value.person, cfCs.value);
if (choose.value.person == "") {
cs_dd_arr.value.map((item, index) => {
@ -957,17 +955,9 @@ const createCustomOverlayJd2 = (polygon, indexx) => {
}
let num = "";
if (choose.value.person == "6666") {
console.log(1);
num = "swrs";
}
if (
choose.value.person == "cjr" ||
choose.value.person == "dibian" ||
choose.value.person == "db" ||
choose.value.person == "gxy" ||
choose.value.person == "tnb" ||
choose.value.person == "tyjr" ||
choose.value.person == "kjer"
) {
} else if (choose.value.person == "cjr" || choose.value.person == "dibian" || choose.value.person == "db" || choose.value.person == "gxy" || choose.value.person == "tnb" || choose.value.person == "tyjr" || choose.value.person == "kjer") {
num = "numbers";
} else {
num = "number";
@ -1047,16 +1037,7 @@ const createCs2 = (polygon, indexx) => {
let num = "";
if (choose.value.person == "6666") {
num = "swrs";
}
if (
choose.value.person == "cjr" ||
choose.value.person == "dibian" ||
choose.value.person == "db" ||
choose.value.person == "gxy" ||
choose.value.person == "tnb" ||
choose.value.person == "tyjr" ||
choose.value.person == "kjer"
) {
} else if (choose.value.person == "cjr" || choose.value.person == "dibian" || choose.value.person == "db" || choose.value.person == "gxy" || choose.value.person == "tnb" || choose.value.person == "tyjr" || choose.value.person == "kjer") {
num = "numbers";
} else {
num = "number";
@ -1235,21 +1216,11 @@ const DGcreateCs2 = (polygon, indexx) => {
let num = "";
if (choose.value.person == "6666") {
num = "swrs";
}
if (
choose.value.person == "cjr" ||
choose.value.person == "dibian" ||
choose.value.person == "db" ||
choose.value.person == "gxy" ||
choose.value.person == "tnb" ||
choose.value.person == "tyjr" ||
choose.value.person == "kjer"
) {
} else if (choose.value.person == "cjr" || choose.value.person == "dibian" || choose.value.person == "db" || choose.value.person == "gxy" || choose.value.person == "tnb" || choose.value.person == "tyjr" || choose.value.person == "kjer") {
num = "numbers";
} else {
num = "number";
}
console.log("单个", num);
cs_dd_arr.value[indexx] = new BMapGL.CustomOverlay(createLabelDOM, {
point: new BMapGL.Point(...polygon.center),
opacity: 0.5,
@ -2352,6 +2323,9 @@ const getDatas = async (e, i) => {
cs_number_name_arr.value.forEach((item, index) => {
map.removeOverlay(cs_number_name_arr.value[index]);
});
cs_dd_arr.value.forEach((item, index) => {
map.removeOverlay(cs_dd_arr.value[index]);
});
if (title_choose.value == "") {
} else {
@ -2377,7 +2351,9 @@ const getDatas = async (e, i) => {
console.log("hhhhh", xkzCenter);
if (choose.value.person == "") {
addCs();
console.log(1, '222222222');
} else {
console.log(2, '222222222');
addCs2();
}
}
@ -2496,11 +2472,12 @@ const getDataBqs = async (jd, cs, bq) => {
}
});
});
console.log(mapTownCount, "mapTownCount");
changeRs2(bq);
if (jd) {
addCs2();
}
console.log(mapTownCount, 'mapTownCount');
// changeRs2(bq);
choose.value.person = bq
// if (jd) {
getDataBqs2(cfJd.value, cfCs.value, choose.value.person,);
// }
}
});
};
@ -2548,8 +2525,47 @@ const getDataBqs2 = async (jd, cs, bq) => {
});
console.log(mapTownCount);
changeRs2(bq);
cs_name_arr.value.forEach((item, index) => {
map.removeOverlay(cs_name_arr.value[index]);
});
cs_number_name_arr.value.forEach((item, index) => {
map.removeOverlay(cs_number_name_arr.value[index]);
});
cs_dd_arr.value.forEach((item, index) => {
map.removeOverlay(cs_dd_arr.value[index]);
});
if (title_choose.value == "") {
} else {
if (sfdd.value) {
if (choose.value.person == "") {
cs_dd_arr.value.forEach((item, index) => {
map.removeOverlay(cs_dd_arr.value[index]);
});
cs_dd_arr.value = [...xuanzhongCs.value];
cs_dd_arr.value.map((item, index) => {
DGcreateCs(item, index);
});
} else {
cs_dd_arr.value.forEach((item, index) => {
map.removeOverlay(cs_dd_arr.value[index]);
});
cs_dd_arr.value = [...xuanzhongCs.value];
cs_dd_arr.value.map((item, index) => {
DGcreateCs2(item, index);
});
}
} else {
console.log("hhhhh", xkzCenter);
if (choose.value.person == "") {
addCs();
} else {
addCs2();
}
}
}
}
});
};
const reset_font = () => {