This commit is contained in:
姚宇浩 2024-07-25 13:00:37 +08:00
parent 8f52a5c27d
commit 042a7962d7
1 changed files with 30 additions and 21 deletions

View File

@ -154,6 +154,8 @@ const sfdd = ref(false);
const xuanzhongCs = ref([]);
//
const cfJd = ref("");
//
const cfCs = ref("");
//
const colorList = [
{
@ -189,7 +191,8 @@ const csh = () => {
xuanzhongCs.value = [];
sfdd.value = false;
title_choose.value = "";
cfjiedao.value = "";
cfJd.value = "";
cfCs.value = "";
cs_un_choose_arr.value.forEach((item, index) => {
map.removeOverlay(cs_un_choose_arr.value[index]);
});
@ -364,7 +367,7 @@ const xkzCenter = reactive([
},
{
name: "大阳家村",
center: [119.16442376733693, 28.89890581872806],
center: [119.16442376733693, 29.89890581872806],
number: "50",
},
{
@ -478,14 +481,15 @@ const addPolygonCounty = () => {
//   console.log(2);
// jrcs.value=true;
if (item.name == cfjiedao.value) {
if (item.name == cfJd.value) {
// console.log(2222);
} else {
// console.log(111);
cfjiedao.value = item.name;
cfJd.value = item.name;
let jdCenter = [];
if (item.name == "溪口镇") {
BMAP();
getDatas("溪口镇", choose.value.person);
if (!title_choose.value.includes("溪口镇")) {
title_choose.value = title_choose.value + `>${item.name}`;
}
@ -536,10 +540,10 @@ const addPolygonCounty = () => {
// cs_un_choose_arr.value = [];
// cs_dd_arr.value = [];
cfJd.value = "";
cfCs.value = "";
xuanzhongCs.value = [];
sfdd.value = false;
title_choose.value = "";
cfjiedao.value = "";
cs_un_choose_arr.value.forEach((item, index) => {
map.removeOverlay(cs_un_choose_arr.value[index]);
});
@ -636,9 +640,9 @@ const addPolygonCountyCs = () => {
});
map.addOverlay(cs_qk_arr.value[index]);
cs_qk_arr.value[index].addEventListener("click", () => {
cfCs.value = item.name;
console.log("cfCs.value", cfCs.value);
sfdd.value = true;
console.log(66666666, item.name);
console.log(111, xkzDk);
xkzCenter.forEach((a, b) => {
if (a.name == item.name) {
cs_dd_arr.value.push(a);
@ -673,7 +677,7 @@ const addPolygonCountyCs = () => {
DGcreateCs2(item, index);
});
}
getDatas2(cfJd.value, choose.value.person, cfCs.value);
console.log("chooseCsList.value", chooseCsList.value);
console.log("unChooseList.value", unChooseList.value);
addCsChoose();
@ -726,6 +730,7 @@ const addCsUnChoose = () => {
});
map.addOverlay(cs_un_choose_arr.value[index]);
cs_un_choose_arr.value[index].addEventListener("click", () => {
cfCs.value = item.name;
sfdd.value = true;
cs_dd_arr.value.forEach((item, index) => {
map.removeOverlay(cs_dd_arr.value[index]);
@ -768,6 +773,7 @@ const addCsUnChoose = () => {
DGcreateCs2(item, index);
});
}
getDatas2(cfJd.value, choose.value.person, cfCs.value);
addCsChoose();
addCsUnChoose();
});
@ -901,8 +907,8 @@ const createCs2 = (polygon, indexx) => {
content.style.flexDirection = "column";
content.style.alignItems = "center";
content.style.zIndex = BMapGL.Overlay.getZIndex(this.point.lat);
content.style.height = "45px";
content.style.width = "45px";
content.style.height = "60px";
content.style.width = "60px";
var div = document.createElement("div");
div.style.color = "#333";
div.style.whiteSpace = "nowrap";
@ -962,8 +968,8 @@ const createCs = (polygon, indexx) => {
content.style.display = "flex";
content.style.flexDirection = "column";
content.style.alignItems = "center";
content.style.height = "45px";
content.style.width = "45px";
content.style.height = "60px";
content.style.width = "60px";
content.style.zIndex = BMapGL.Overlay.getZIndex(this.point.lat);
var div = document.createElement("div");
@ -1016,8 +1022,8 @@ const DGcreateCs = (polygon, indexx) => {
content.style.display = "flex";
content.style.flexDirection = "column";
content.style.alignItems = "center";
content.style.height = "40px";
content.style.width = "40px";
content.style.height = "60px";
content.style.width = "60px";
content.style.zIndex = BMapGL.Overlay.getZIndex(this.point.lat);
var div = document.createElement("div");
@ -1069,8 +1075,8 @@ const DGcreateCs2 = (polygon, indexx) => {
content.style.display = "flex";
content.style.flexDirection = "column";
content.style.alignItems = "center";
content.style.height = "40px";
content.style.width = "40px";
content.style.height = "60px";
content.style.width = "60px";
content.style.zIndex = BMapGL.Overlay.getZIndex(this.point.lat);
var div = document.createElement("div");
@ -2099,7 +2105,8 @@ const getDatas = async (e, i) => {
.get(`/api/ggfwyth/ysyzt/getCssrksl?town=${e}&age=${i || ""}`)
.then((res) => {
if (res.code == 200) {
if (cfJd.value !== "") {
if (cfCs.value != "") {
} else if (cfJd.value !== "") {
personTotal.value = [
{
id: "0",
@ -2171,9 +2178,11 @@ const getDatas = async (e, i) => {
}
});
};
const getDatas2 = async (e, i) => {
const getDatas2 = async (e, i, cs) => {
await http
.get(`/api/ggfwyth/ysyzt/getCssrksl?town=${e}&age=${i || ""}`)
.get(
`/api/ggfwyth/ysyzt/getCssrksl?town=${e}&age=${i || ""}&committee=${cs}`
)
.then((res) => {
if (res.code == 200) {
personTotal.value = [