This commit is contained in:
littleeewolf 2024-08-10 16:07:58 +08:00
parent fa8fce9798
commit ae1277651b
1 changed files with 248 additions and 177 deletions

View File

@ -406,6 +406,16 @@ const tsbq_id_total = ref([
id: "kjer",
tagId: 3,
},
{
name: "孤儿",
id: "ge",
tagId: 4,
},
{
name: "特困",
id: "tk",
tagId: 6,
},
]);
//
const chooseCsList = ref([]);
@ -981,7 +991,8 @@ const getData = async (e) => {
changeRs(e1);
}
};
const getDatas = async (e, i) => {
const getDatas = async (e, i, y = true) => {
//y
if (i == "9999") {
i = "";
}
@ -1104,6 +1115,7 @@ const getDatas = async (e, i) => {
});
}
} else {
if (y) {
if (choose.value.person == "") {
addCs();
} else {
@ -1111,6 +1123,7 @@ const getDatas = async (e, i) => {
}
}
}
}
//
const agename = [
@ -1146,7 +1159,9 @@ const getDatas2 = async (e, i, cs) => {
i == "gxy" ||
i == "tnb" ||
i == "tyjr" ||
i == "kjer"
i == "kjer" ||
i == "ge" ||
i == "tk"
) {
i = "";
}
@ -1301,7 +1316,9 @@ const getDatas2 = async (e, i, cs) => {
i1 == "gxy" ||
i1 == "tnb" ||
i1 == "tyjr" ||
i1 == "kjer"
i1 == "kjer" ||
i1 == "ge" ||
i1 == "tk"
) {
} else {
if (choose.value.person == "") {
@ -1315,28 +1332,51 @@ const getDatas2 = async (e, i, cs) => {
}
}
};
//
//
//
const changeTagId = (bq) => {
tsbq_id_total.value.forEach((item, index) => {
if (bq == item.id) {
console.log(item.tagId);
return item.tagId;
}
});
};
const getDataBq = async (jd, cs) => {
await http
.get(`/api/ggfwyth/ysyzt/getTsbq?csq=${cs || ""}&xzjd=${jd || ""}`)
.get(`/api/ggfwyth/ysyzt/getBqRs?committee=${cs || ""}&town=${jd || ""}`)
.then((res) => {
if (res.code == 200) {
tsbqTotal.value.length = 0;
for (let name in res.data) {
res.data.forEach((item, index) => {
let idd = "";
for (let v = 0; v < tsbq_id_total.value.length; v++) {
if (tsbq_id_total.value[v].name == name) {
idd = tsbq_id_total.value[v].id;
}
tsbq_id_total.value.forEach((itemm, indexx) => {
if (item.bq == itemm.name) {
idd = itemm.id;
}
});
tsbqTotal.value.push({
id: idd,
name: name,
rksl: res.data[name] || 0,
name: item.bq,
rksl: item.rs || 0,
tagId: item.tagId,
});
}
});
// for (let name in res.data) {
// let idd = "";
// for (let v = 0; v < tsbq_id_total.value.length; v++) {
// if (tsbq_id_total.value[v].name == name) {
// idd = tsbq_id_total.value[v].id;
// }
// }
// tsbqTotal.value.push({
// id: idd,
// name: name,
// rksl: res.data[name] || 0,
// });
// }
}
});
};
@ -1361,32 +1401,40 @@ const getDataBqs2 = async (jd, cs, bq, f = true) => {
//fchangeRs2
let data = {};
let vv = 0;
let tagIdBq;
tsbq_id_total.value.forEach((item, index) => {
if (bq == item.id) {
tagIdBq = item.tagId;
}
});
if (cs == "" && jd == "") {
data = {
tsbq: bq,
tagId: tagIdBq,
};
vv = 1;
} else if (cs == "") {
data = {
xzjd: jd,
tsbq: bq,
town: jd,
tagId: tagIdBq,
};
vv = 2;
} else {
data = {
xzjd: jd,
tsbq: bq,
csq: cs,
town: jd,
tagId: tagIdBq,
committee: cs,
};
vv = 3;
}
await http.get(`/api/ggfwyth/ysyzt/getTsbqByXzjdOrCsq`, data).then((res) => {
await http
.get(`/api/ggfwyth/ysyzt/getBqRsByTownAndCommittee`, data)
.then((res) => {
if (res.code == 200) {
if (cfJd.value != "") {
xkzCenter.map((item) => {
item.numbers = 0;
res.data.map((items) => {
if (items.csq == item.name) {
if (items.committee == item.name) {
item.numbers = items.rs;
}
});
@ -1442,32 +1490,40 @@ const getDataBqs3 = async (jd, cs, bq) => {
//fchangeRs2
let data = {};
let vv = 0;
let tagIdBq;
tsbq_id_total.value.forEach((item, index) => {
if (bq == item.id) {
tagIdBq = item.tagId;
}
});
if (cs == "" && jd == "") {
data = {
tsbq: bq,
tagId: btagIdBqq,
};
vv = 1;
} else if (cs == "") {
data = {
xzjd: jd,
tsbq: bq,
town: jd,
tagId: tagIdBq,
};
vv = 2;
} else {
data = {
xzjd: jd,
tsbq: bq,
csq: cs,
town: jd,
tagId: tagIdBq,
committee: cs,
};
vv = 3;
}
await http.get(`/api/ggfwyth/ysyzt/getTsbqByXzjdOrCsq`, data).then((res) => {
await http
.get(`/api/ggfwyth/ysyzt/getBqRsByTownAndCommittee`, data)
.then((res) => {
if (res.code == 200) {
// if (cfJd.value != "") {
xkzCenter.map((item) => {
item.numbers = 0;
res.data.map((items) => {
if (items.csq == item.name) {
if (items.committee == item.name) {
item.numbers = items.rs;
}
});
@ -1515,17 +1571,22 @@ const getDataBqs3 = async (jd, cs, bq) => {
//
const getDataBqJD = async (bq) => {
let data = {};
tsbq_id_total.value.forEach((item, index) => {
if (bq == item.id) {
data = {
tsbq: bq,
tagId: item.tagId,
};
await http.get(`/api/ggfwyth/ysyzt/getTsbqByXzjdOrCsq`, data).then((res) => {
}
});
await http
.get(`/api/ggfwyth/ysyzt/getBqRsByTownAndCommittee`, data)
.then((res) => {
if (res.code == 200) {
if (res?.data) {
mapTownCount.map((item) => {
item.numbers = 0;
res.data.map((items) => {
if (items.xzjd == item.name) {
if (items.town == item.name) {
item.numbers = items.rs;
}
});
@ -1661,10 +1722,12 @@ const to_jd = (item_name) => {
choose.value.person == "gxy" ||
choose.value.person == "tnb" ||
choose.value.person == "tyjr" ||
choose.value.person == "kjer"
choose.value.person == "kjer" ||
choose.value.person == "ge" ||
choose.value.person == "tk"
) {
getDataBqs2(cfJd.value, cfCs.value, choose.value.person, false);
getDatas(cfJd.value, "");
getDatas(cfJd.value, "",false);
} else if (choose.value.person != "") {
if (choose.value.person == "9999") {
getDatas(cfJd.value, "");
@ -1708,7 +1771,9 @@ const open_detail = () => {
choose.value.person == "gxy" ||
choose.value.person == "tnb" ||
choose.value.person == "tyjr" ||
choose.value.person == "kjer"
choose.value.person == "kjer" ||
choose.value.person == "ge" ||
choose.value.person == "tk"
) {
console.log(88888);
age = "";
@ -1716,7 +1781,7 @@ const open_detail = () => {
if (choose.value.person == item.id) {
tagId = item.tagId;
}
})
});
person_detail(age, tagId);
dialogShow.value = true;
} else {
@ -1726,6 +1791,7 @@ const open_detail = () => {
}
};
const close = () => {
cfCsZs.value = "";
dialogShow.value = false;
pagination.total = 100;
pagination.currentPage = 1;
@ -1757,20 +1823,21 @@ const handlePagination = (current) => {
choose.value.person == "gxy" ||
choose.value.person == "tnb" ||
choose.value.person == "tyjr" ||
choose.value.person == "kjer"
choose.value.person == "kjer" ||
choose.value.person == "ge" ||
choose.value.person == "tk"
) {
age = "";
tsbq_id_total.value.forEach((item, index) => {
if (choose.value.person == item.id) {
tagId = item.tagId;
}
})
});
person_detail(age, tagId);
} else {
age = choose.value.person;
person_detail(age);
}
};
//
const openMessage = (e) => {
@ -1793,9 +1860,7 @@ const person_detail = (age, tagId) => {
pagination.pageSize
}&age=${age || ""}&committee=${cfCsZs.value || ""}&town=${
cfJd.value || ""
}&tagId=${
tagId || ""
}`
}&tagId=${tagId || ""}`
)
.then((res) => {
if (res.code == 200) {
@ -2216,20 +2281,16 @@ const addPolygonCounty = () => {
choose.value.person == "gxy" ||
choose.value.person == "tnb" ||
choose.value.person == "tyjr" ||
choose.value.person == "kjer"
choose.value.person == "kjer" ||
choose.value.person == "ge" ||
choose.value.person == "tk"
) {
getDataBqs2(cfJd.value, cfCs.value, choose.value.person, false);
getDatas(cfJd.value, "");
getDatas(cfJd.value, "", false);
} else if (choose.value.person != "") {
if (choose.value.person == "9999") {
getDatas(cfJd.value, "");
} else {
// if (choose.value.person == 1) {
// getDatas(cfJd.value, "0"); //0
// } else {
// getDatas(cfJd.value, choose.value.person - 1);
// }
getDatas(cfJd.value, choose.value.person);
}
}
@ -2382,7 +2443,9 @@ const createCustomOverlayJd2 = (polygon, indexx) => {
choose.value.person == "gxy" ||
choose.value.person == "tnb" ||
choose.value.person == "tyjr" ||
choose.value.person == "kjer"
choose.value.person == "kjer" ||
choose.value.person == "ge" ||
choose.value.person == "tk"
) {
num = "numbers";
} else {
@ -2494,7 +2557,9 @@ const addPolygonCountyCs = () => {
choose.value.person == "gxy" ||
choose.value.person == "tnb" ||
choose.value.person == "tyjr" ||
choose.value.person == "kjer"
choose.value.person == "kjer" ||
choose.value.person == "ge" ||
choose.value.person == "tk"
) {
getDataBqs3(cfJd.value, cfCs.value, choose.value.person);
} else {
@ -2630,7 +2695,9 @@ const addCsUnChoose = () => {
choose.value.person == "gxy" ||
choose.value.person == "tnb" ||
choose.value.person == "tyjr" ||
choose.value.person == "kjer"
choose.value.person == "kjer" ||
choose.value.person == "ge" ||
choose.value.person == "tk"
) {
getDataBqs3(cfJd.value, cfCs.value, choose.value.person);
}
@ -2772,7 +2839,9 @@ const createCs2 = (polygon, indexx) => {
choose.value.person == "gxy" ||
choose.value.person == "tnb" ||
choose.value.person == "tyjr" ||
choose.value.person == "kjer"
choose.value.person == "kjer" ||
choose.value.person == "ge" ||
choose.value.person == "tk"
) {
num = "numbers";
} else {
@ -2918,7 +2987,9 @@ const DGcreateCs2 = (polygon, indexx) => {
choose.value.person == "gxy" ||
choose.value.person == "tnb" ||
choose.value.person == "tyjr" ||
choose.value.person == "kjer"
choose.value.person == "kjer" ||
choose.value.person == "ge" ||
choose.value.person == "tk"
) {
num = "numbers";
} else {