This commit is contained in:
姚宇浩 2024-08-16 11:38:36 +08:00
parent 9de5dc3c06
commit 2914bf3727
1 changed files with 14 additions and 73 deletions

View File

@ -1353,6 +1353,7 @@ const getDatas2 = async (e, i, cs) => {
// //
// //
//
const getDataBq = async (jd, cs) => { const getDataBq = async (jd, cs) => {
await http await http
.get(`/api/ggfwyth/ysyzt/getBqRs?committee=${cs || ""}&town=${jd || ""}`) .get(`/api/ggfwyth/ysyzt/getBqRs?committee=${cs || ""}&town=${jd || ""}`)
@ -1396,7 +1397,6 @@ const getDataBqs = async (jd, cs, bq) => {
const getDataBqs2 = async (jd, cs, bq) => { const getDataBqs2 = async (jd, cs, bq) => {
//fchangeRs2 //fchangeRs2
let data = {}; let data = {};
let vv = 0;
let tagIdBq; let tagIdBq;
tsbq_id_total.value.forEach((item, index) => { tsbq_id_total.value.forEach((item, index) => {
if (bq == item.name) { if (bq == item.name) {
@ -1407,20 +1407,17 @@ const getDataBqs2 = async (jd, cs, bq) => {
data = { data = {
tagId: tagIdBq, tagId: tagIdBq,
}; };
vv = 1;
} else if (cs == "") { } else if (cs == "") {
data = { data = {
town: jd, town: jd,
tagId: tagIdBq, tagId: tagIdBq,
}; };
vv = 2;
} else { } else {
data = { data = {
town: jd, town: jd,
tagId: tagIdBq, tagId: tagIdBq,
committee: cs, committee: cs,
}; };
vv = 3;
} }
await http await http
.get(`/api/ggfwyth/ysyzt/getBqRsByTownAndCommittee`, data) .get(`/api/ggfwyth/ysyzt/getBqRsByTownAndCommittee`, data)
@ -1479,34 +1476,19 @@ const getDataBqs2 = async (jd, cs, bq) => {
}; };
// //
const getDataBqs3 = async (jd, cs, bq) => { const getDataBqs3 = async (jd, cs, bq) => {
//fchangeRs2
let data = {}; let data = {};
let vv = 0;
let tagIdBq; let tagIdBq;
tsbq_id_total.value.forEach((item, index) => { tsbq_id_total.value.forEach((item, index) => {
if (bq == item.name) { if (bq == item.name) {
tagIdBq = item.tagId; tagIdBq = item.tagId;
} }
}); });
if (cs == "" && jd == "") { data = {
data = { town: jd,
tagId: btagIdBqq, tagId: tagIdBq,
}; committee: cs,
vv = 1; };
} else if (cs == "") {
data = {
town: jd,
tagId: tagIdBq,
};
vv = 2;
} else {
data = {
town: jd,
tagId: tagIdBq,
committee: cs,
};
vv = 3;
}
await http await http
.get(`/api/ggfwyth/ysyzt/getBqRsByTownAndCommittee`, data) .get(`/api/ggfwyth/ysyzt/getBqRsByTownAndCommittee`, data)
.then((res) => { .then((res) => {
@ -1537,34 +1519,18 @@ const getDataBqs3 = async (jd, cs, bq) => {
}; };
//await //await
const getDataBqs4 = async (jd, cs, bq) => { const getDataBqs4 = async (jd, cs, bq) => {
//fchangeRs2
let data = {}; let data = {};
let vv = 0;
let tagIdBq; let tagIdBq;
tsbq_id_total.value.forEach((item, index) => { tsbq_id_total.value.forEach((item, index) => {
if (bq == item.name) { if (bq == item.name) {
tagIdBq = item.tagId; tagIdBq = item.tagId;
} }
}); });
if (cs == "" && jd == "") { data = {
data = { town: jd,
tagId: tagIdBq, tagId: tagIdBq,
}; };
vv = 1;
} else if (cs == "") {
data = {
town: jd,
tagId: tagIdBq,
};
vv = 2;
} else {
data = {
town: jd,
tagId: tagIdBq,
committee: cs,
};
vv = 3;
}
http.get(`/api/ggfwyth/ysyzt/getBqRsByTownAndCommittee`, data).then((res) => { http.get(`/api/ggfwyth/ysyzt/getBqRsByTownAndCommittee`, data).then((res) => {
if (res.code == 200) { if (res.code == 200) {
if (cfJd.value != "") { if (cfJd.value != "") {
@ -1643,19 +1609,12 @@ const getDataBqJD = async (bq) => {
}); });
}); });
} }
changeRs2(bq); changeRs(bq);
} }
}); });
}; };
// //
const changeRs = (id) => { 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; choose.value.person = id;
jdm_arr.value.forEach((item, index) => { jdm_arr.value.forEach((item, index) => {
map.removeOverlay(jdm_arr.value[index]); map.removeOverlay(jdm_arr.value[index]);
@ -1664,26 +1623,8 @@ const changeRs = (id) => {
map.removeOverlay(jdm_number_arr.value[index]); map.removeOverlay(jdm_number_arr.value[index]);
}); });
addJd2(); 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();
// }
}; };
//---------------------- //----------------------
const changeys = (name) => { const changeys = (name) => {
if (yaosuList.value.includes(name)) { if (yaosuList.value.includes(name)) {