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