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

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