This commit is contained in:
姚宇浩 2024-08-13 10:04:32 +08:00
parent b57bd7e75d
commit 8373cc7404
1 changed files with 170 additions and 243 deletions

View File

@ -759,7 +759,7 @@ const tableType = reactive({
label: "序号", label: "序号",
property: "index", property: "index",
width: "50", width: "50",
type: "index", type: "index",
align: "center", align: "center",
}, },
{ {
@ -904,8 +904,40 @@ const markera = (e) => {
}; };
// //
const buten = async (item) => { const buten = async (item) => {
getData(item.age); if (choose.value.person == item.id) {
getDatas(cfJd.value, item.age); choose.value.person = "";
jdm_number_arr.value.forEach((item, index) => {
map.removeOverlay(jdm_number_arr.value[index]);
});
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]);
});
addJd();
if (title_jd.value == "") {
} else {
if (sfdd.value) {
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 {
addCs();
}
}
} else {
getData(item.age);
getDatas(cfJd.value, item.age);
}
}; };
// //
const buten2 = async (item) => { const buten2 = async (item) => {
@ -1194,15 +1226,15 @@ const getDatas = async (e, i, y = true) => {
const getDatas2 = async (e, i, cs) => { const getDatas2 = async (e, i, cs) => {
let i1 = i; let i1 = i;
if ( if (
i == "cjr" || i == "残疾人" ||
i == "dibian" || i == "低边" ||
i == "db" || i == "低保" ||
i == "gxy" || i == "高血压" ||
i == "tnb" || i == "糖尿病" ||
i == "tyjr" || i == "退役军人" ||
i == "kjer" || i == "困境儿童" ||
i == "ge" || i == "孤儿" ||
i == "tk" i == "特困"
) { ) {
i = ""; i = "";
} }
@ -1233,54 +1265,8 @@ const getDatas2 = async (e, i, cs) => {
personTotal.value[1].rksl = res.data.swrs; personTotal.value[1].rksl = res.data.swrs;
personTotal.value[1].ages = "近一年死亡"; personTotal.value[1].ages = "近一年死亡";
personTotal.value[1].percent = res.data.swrsPercent; personTotal.value[1].percent = res.data.swrsPercent;
// res.data.age.forEach((item, index) => {
// personTotal.value.push({
// id: index + 1,
// rksl: item.rksl,
// age: item.age + "",
// ages: item.age + "",
// percent: item.percent,
// });
// });
let before_age = ""; let before_age = "";
res.data.age.forEach((item, index) => { res.data.age.forEach((item, index) => {
// if (index == 0) {
// personTotal.value.push({
// rksl: item.rksl,
// age: item.age + "",
// ages: item.age + "",
// percent: item.percent,
// });
// before_age = item.age;
// console.log("111", before_age);
// } else {
// if (item.age - before_age == 1) {
// personTotal.value.push({
// rksl: item.rksl,
// age: item.age + "",
// ages: item.age + "",
// percent: item.percent,
// });
// before_age = item.age;
// } else {
// for (let i = 0; i < item.age - before_age - 1; i++) {
// ++before_age;
// personTotal.value.push({
// rksl: 0,
// age: before_age + "",
// ages: before_age + "",
// percent: 0.0,
// });
// }
// personTotal.value.push({
// rksl: item.rksl,
// age: item.age + "",
// ages: item.age + "",
// percent: item.percent,
// });
// before_age = item.age;
// }
// }
if (index == 0 && item.age == 0) { if (index == 0 && item.age == 0) {
personTotal.value.push({ personTotal.value.push({
rksl: item.rksl, rksl: item.rksl,
@ -1351,15 +1337,15 @@ const getDatas2 = async (e, i, cs) => {
} }
}); });
if ( if (
i1 == "cjr" || i1 == "残疾人" ||
i1 == "dibian" || i1 == "低边" ||
i1 == "db" || i1 == "低保" ||
i1 == "gxy" || i1 == "高血压" ||
i1 == "tnb" || i1 == "糖尿病" ||
i1 == "tyjr" || i1 == "退役军人" ||
i1 == "kjer" || i1 == "困境儿童" ||
i1 == "ge" || i1 == "孤儿" ||
i1 == "tk" i1 == "特困"
) { ) {
} else { } else {
if (choose.value.person == "") { if (choose.value.person == "") {
@ -1383,32 +1369,20 @@ const getDataBq = async (jd, cs) => {
if (res.code == 200) { if (res.code == 200) {
tsbqTotal.value.length = 0; tsbqTotal.value.length = 0;
res.data.forEach((item, index) => { res.data.forEach((item, index) => {
let idd = ""; // let idd = "";
tsbq_id_total.value.forEach((itemm, indexx) => { // tsbq_id_total.value.forEach((itemm, indexx) => {
if (item.bq == itemm.name) { // if (item.bq == itemm.name) {
idd = itemm.id; // idd = itemm.id;
} // }
}); // });
tsbqTotal.value.push({ tsbqTotal.value.push({
id: idd, id: item.bq,
name: item.bq, name: item.bq,
rksl: item.rs || 0, rksl: item.rs || 0,
tagId: item.tagId, 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,
// });
// }
} }
}); });
}; };
@ -1423,7 +1397,7 @@ const getDataBqs2 = async (jd, cs, bq, f = true) => {
let vv = 0; let vv = 0;
let tagIdBq; let tagIdBq;
tsbq_id_total.value.forEach((item, index) => { tsbq_id_total.value.forEach((item, index) => {
if (bq == item.id) { if (bq == item.name) {
tagIdBq = item.tagId; tagIdBq = item.tagId;
} }
}); });
@ -1512,13 +1486,13 @@ const getDataBqs3 = async (jd, cs, bq) => {
let vv = 0; let vv = 0;
let tagIdBq; let tagIdBq;
tsbq_id_total.value.forEach((item, index) => { tsbq_id_total.value.forEach((item, index) => {
if (bq == item.id) { if (bq == item.name) {
tagIdBq = item.tagId; tagIdBq = item.tagId;
} }
}); });
if (cs == "" && jd == "") { if (cs == "" && jd == "") {
data = { data = {
tagId: btagIdBqq, tagId: tagIdBq,
}; };
vv = 1; vv = 1;
} else if (cs == "") { } else if (cs == "") {
@ -1567,7 +1541,7 @@ const getDataBqs3 = async (jd, cs, bq) => {
const getDataBqJD = async (bq) => { const getDataBqJD = async (bq) => {
let data = {}; let data = {};
tsbq_id_total.value.forEach((item, index) => { tsbq_id_total.value.forEach((item, index) => {
if (bq == item.id) { if (bq == item.name) {
data = { data = {
tagId: item.tagId, tagId: item.tagId,
}; };
@ -1592,40 +1566,24 @@ const getDataBqJD = async (bq) => {
}; };
// //
const changeRs = (id) => { const changeRs = (id) => {
if (choose.value.person == id) { choose.value.person = id;
choose.value.person = ""; jdm_arr.value.forEach((item, index) => {
jdm_number_arr.value.forEach((item, index) => { map.removeOverlay(jdm_arr.value[index]);
map.removeOverlay(jdm_number_arr.value[index]); });
}); jdm_number_arr.value.forEach((item, index) => {
addJd(); map.removeOverlay(jdm_number_arr.value[index]);
} else { });
choose.value.person = id; addJd2();
jdm_arr.value.forEach((item, index) => {
map.removeOverlay(jdm_arr.value[index]);
});
jdm_number_arr.value.forEach((item, index) => {
map.removeOverlay(jdm_number_arr.value[index]);
});
addJd2();
}
}; };
const changeRs2 = (id) => { const changeRs2 = (id) => {
if (choose.value.person == id) { choose.value.person = id;
choose.value.person = ""; jdm_arr.value.forEach((item, index) => {
jdm_number_arr.value.forEach((item, index) => { map.removeOverlay(jdm_arr.value[index]);
map.removeOverlay(jdm_number_arr.value[index]); });
}); jdm_number_arr.value.forEach((item, index) => {
addJd(); map.removeOverlay(jdm_number_arr.value[index]);
} else { });
choose.value.person = id; addJd2();
jdm_arr.value.forEach((item, index) => {
map.removeOverlay(jdm_arr.value[index]);
});
jdm_number_arr.value.forEach((item, index) => {
map.removeOverlay(jdm_number_arr.value[index]);
});
addJd2();
}
}; };
//---------------------- //----------------------
// //
@ -1711,15 +1669,15 @@ const to_jd = (item_name) => {
getDatas(cfJd.value, ""); getDatas(cfJd.value, "");
} }
if ( if (
choose.value.person == "cjr" || choose.value.person == "残疾人" ||
choose.value.person == "dibian" || choose.value.person == "低边" ||
choose.value.person == "db" || choose.value.person == "低保" ||
choose.value.person == "gxy" || choose.value.person == "高血压" ||
choose.value.person == "tnb" || choose.value.person == "糖尿病" ||
choose.value.person == "tyjr" || choose.value.person == "退役军人" ||
choose.value.person == "kjer" || choose.value.person == "困境儿童" ||
choose.value.person == "ge" || choose.value.person == "孤儿" ||
choose.value.person == "tk" choose.value.person == "特困"
) { ) {
getDataBqs2(cfJd.value, cfCs.value, choose.value.person, false); getDataBqs2(cfJd.value, cfCs.value, choose.value.person, false);
getDatas(cfJd.value, "", false); getDatas(cfJd.value, "", false);
@ -1760,20 +1718,19 @@ const open_detail = () => {
} else if (choose.value.person == "6666") { } else if (choose.value.person == "6666") {
age = ""; age = "";
} else if ( } else if (
choose.value.person == "cjr" || choose.value.person == "残疾人" ||
choose.value.person == "dibian" || choose.value.person == "低边" ||
choose.value.person == "db" || choose.value.person == "低保" ||
choose.value.person == "gxy" || choose.value.person == "高血压" ||
choose.value.person == "tnb" || choose.value.person == "糖尿病" ||
choose.value.person == "tyjr" || choose.value.person == "退役军人" ||
choose.value.person == "kjer" || choose.value.person == "困境儿童" ||
choose.value.person == "ge" || choose.value.person == "孤儿" ||
choose.value.person == "tk" choose.value.person == "特困"
) { ) {
console.log(88888);
age = ""; age = "";
tsbq_id_total.value.forEach((item, index) => { tsbq_id_total.value.forEach((item, index) => {
if (choose.value.person == item.id) { if (choose.value.person == item.name) {
tagId = item.tagId; tagId = item.tagId;
} }
}); });
@ -1812,19 +1769,19 @@ const handlePagination = (current) => {
} else if (choose.value.person == "6666") { } else if (choose.value.person == "6666") {
age = ""; age = "";
} else if ( } else if (
choose.value.person == "cjr" || choose.value.person == "残疾人" ||
choose.value.person == "dibian" || choose.value.person == "低边" ||
choose.value.person == "db" || choose.value.person == "低保" ||
choose.value.person == "gxy" || choose.value.person == "高血压" ||
choose.value.person == "tnb" || choose.value.person == "糖尿病" ||
choose.value.person == "tyjr" || choose.value.person == "退役军人" ||
choose.value.person == "kjer" || choose.value.person == "困境儿童" ||
choose.value.person == "ge" || choose.value.person == "孤儿" ||
choose.value.person == "tk" choose.value.person == "特困"
) { ) {
age = ""; age = "";
tsbq_id_total.value.forEach((item, index) => { tsbq_id_total.value.forEach((item, index) => {
if (choose.value.person == item.id) { if (choose.value.person == item.name) {
tagId = item.tagId; tagId = item.tagId;
} }
}); });
@ -1861,7 +1818,8 @@ const person_detail = (age, tagId) => {
if (res.code == 200) { if (res.code == 200) {
tableType.data = res.data; tableType.data = res.data;
res.data.forEach((item, index) => { res.data.forEach((item, index) => {
item.index = index + 1 + (pagination.currentPage - 1) * pagination.pageSize; item.index =
index + 1 + (pagination.currentPage - 1) * pagination.pageSize;
}); });
pagination.total = res.count; pagination.total = res.count;
} }
@ -2273,15 +2231,15 @@ const addPolygonCounty = () => {
getDatas(cfJd.value, ""); getDatas(cfJd.value, "");
} }
if ( if (
choose.value.person == "cjr" || choose.value.person == "残疾人" ||
choose.value.person == "dibian" || choose.value.person == "低边" ||
choose.value.person == "db" || choose.value.person == "低保" ||
choose.value.person == "gxy" || choose.value.person == "高血压" ||
choose.value.person == "tnb" || choose.value.person == "糖尿病" ||
choose.value.person == "tyjr" || choose.value.person == "退役军人" ||
choose.value.person == "kjer" || choose.value.person == "困境儿童" ||
choose.value.person == "ge" || choose.value.person == "孤儿" ||
choose.value.person == "tk" choose.value.person == "特困"
) { ) {
getDataBqs2(cfJd.value, cfCs.value, choose.value.person, false); getDataBqs2(cfJd.value, cfCs.value, choose.value.person, false);
getDatas(cfJd.value, "", false); getDatas(cfJd.value, "", false);
@ -2435,15 +2393,15 @@ const createCustomOverlayJd2 = (polygon, indexx) => {
if (choose.value.person == "6666") { if (choose.value.person == "6666") {
num = "swrs"; num = "swrs";
} else if ( } else if (
choose.value.person == "cjr" || choose.value.person == "残疾人" ||
choose.value.person == "dibian" || choose.value.person == "低边" ||
choose.value.person == "db" || choose.value.person == "低保" ||
choose.value.person == "gxy" || choose.value.person == "高血压" ||
choose.value.person == "tnb" || choose.value.person == "糖尿病" ||
choose.value.person == "tyjr" || choose.value.person == "退役军人" ||
choose.value.person == "kjer" || choose.value.person == "困境儿童" ||
choose.value.person == "ge" || choose.value.person == "孤儿" ||
choose.value.person == "tk" choose.value.person == "特困"
) { ) {
num = "numbers"; num = "numbers";
} else { } else {
@ -2549,15 +2507,15 @@ const addPolygonCountyCs = () => {
}); });
getDataBq(cfJd.value, cfCs.value); getDataBq(cfJd.value, cfCs.value);
if ( if (
choose.value.person == "cjr" || choose.value.person == "残疾人" ||
choose.value.person == "dibian" || choose.value.person == "低边" ||
choose.value.person == "db" || choose.value.person == "低保" ||
choose.value.person == "gxy" || choose.value.person == "高血压" ||
choose.value.person == "tnb" || choose.value.person == "糖尿病" ||
choose.value.person == "tyjr" || choose.value.person == "退役军人" ||
choose.value.person == "kjer" || choose.value.person == "困境儿童" ||
choose.value.person == "ge" || choose.value.person == "孤儿" ||
choose.value.person == "tk" choose.value.person == "特困"
) { ) {
getDataBqs3(cfJd.value, cfCs.value, choose.value.person); getDataBqs3(cfJd.value, cfCs.value, choose.value.person);
} else { } else {
@ -2658,56 +2616,25 @@ const addCsUnChoose = () => {
unChooseList.value.push(itemm); unChooseList.value.push(itemm);
} }
}); });
// cs_un_choose_arr.value.forEach((item, index) => {
// map.removeOverlay(cs_qk_arr.value[index]);
// });
// getDataBqs(cfJd.value, cfCs.value);
getDataBq(cfJd.value, cfCs.value); getDataBq(cfJd.value, cfCs.value);
// if (choose.value.person == 1) {
// getDatas2(cfJd.value, "0", cfCs.value); //0
// } else {
// getDatas2(cfJd.value, choose.value.person - 1, cfCs.value);
// }
getDatas2(cfJd.value, choose.value.person, cfCs.value); getDatas2(cfJd.value, choose.value.person, cfCs.value);
// getDatas2(cfJd.value, choose.value.person, 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"
// ) {
// getDataBqs2(cfJd.value, cfCs.value, choose.value.person, false);
// }
// if (choose.value.person == "") {
// cs_dd_arr.value.map((item, index) => {
// DGcreateCs(item, index);
// });
// } else
if ( if (
choose.value.person == "cjr" || choose.value.person == "残疾人" ||
choose.value.person == "dibian" || choose.value.person == "低边" ||
choose.value.person == "db" || choose.value.person == "低保" ||
choose.value.person == "gxy" || choose.value.person == "高血压" ||
choose.value.person == "tnb" || choose.value.person == "糖尿病" ||
choose.value.person == "tyjr" || choose.value.person == "退役军人" ||
choose.value.person == "kjer" || choose.value.person == "困境儿童" ||
choose.value.person == "ge" || choose.value.person == "孤儿" ||
choose.value.person == "tk" choose.value.person == "特困"
) { ) {
getDataBqs3(cfJd.value, cfCs.value, choose.value.person); getDataBqs3(cfJd.value, cfCs.value, choose.value.person);
} }
// if (choose.value.person == "") {
// cs_dd_arr.value.map((item, index) => {
// DGcreateCs(item, index);
// });
// } else {
// cs_dd_arr.value.map((item, index) => {
// DGcreateCs2(item, index);
// });
// }
addCsChoose(); addCsChoose();
addCsUnChoose(); addCsUnChoose();
}); });
@ -2831,15 +2758,15 @@ const createCs2 = (polygon, indexx) => {
if (choose.value.person == "6666") { if (choose.value.person == "6666") {
num = "swrs"; num = "swrs";
} else if ( } else if (
choose.value.person == "cjr" || choose.value.person == "残疾人" ||
choose.value.person == "dibian" || choose.value.person == "低边" ||
choose.value.person == "db" || choose.value.person == "低保" ||
choose.value.person == "gxy" || choose.value.person == "高血压" ||
choose.value.person == "tnb" || choose.value.person == "糖尿病" ||
choose.value.person == "tyjr" || choose.value.person == "退役军人" ||
choose.value.person == "kjer" || choose.value.person == "困境儿童" ||
choose.value.person == "ge" || choose.value.person == "孤儿" ||
choose.value.person == "tk" choose.value.person == "特困"
) { ) {
num = "numbers"; num = "numbers";
} else { } else {
@ -2979,15 +2906,15 @@ const DGcreateCs2 = (polygon, indexx) => {
if (choose.value.person == "6666") { if (choose.value.person == "6666") {
num = "swrs"; num = "swrs";
} else if ( } else if (
choose.value.person == "cjr" || choose.value.person == "残疾人" ||
choose.value.person == "dibian" || choose.value.person == "低边" ||
choose.value.person == "db" || choose.value.person == "低保" ||
choose.value.person == "gxy" || choose.value.person == "高血压" ||
choose.value.person == "tnb" || choose.value.person == "糖尿病" ||
choose.value.person == "tyjr" || choose.value.person == "退役军人" ||
choose.value.person == "kjer" || choose.value.person == "困境儿童" ||
choose.value.person == "ge" || choose.value.person == "孤儿" ||
choose.value.person == "tk" choose.value.person == "特困"
) { ) {
num = "numbers"; num = "numbers";
} else { } else {