This commit is contained in:
姚宇浩 2024-07-25 17:31:02 +08:00
parent 6ed1237a8a
commit cb971efb1f
1 changed files with 54 additions and 44 deletions

View File

@ -33,7 +33,7 @@
class="content_item"
v-for="(item, index) in tsbqTotal"
:class="{ choose: item.id == choose.person }"
@click="changebq(item.id)"
@click="buten2(item)"
:key="index"
>
<div class="content_item_name">{{ item.name }}</div>
@ -517,6 +517,7 @@ const addPolygonCounty = () => {
BMAP();
if (choose.value.person == 0) {
getDatas("溪口镇", "");
getDataBq(cfJd.value,'')
} else {
getDatas("溪口镇", choose.value.person);
}
@ -2059,8 +2060,10 @@ const buten = async (item) => {
getDatas("溪口镇", item.age);
};
const buten2 = async (item) => {
getDataBq(item.id, item.age);
console.log(item.id);
// getDataBq(item.id, item.age);
// getDatas("", item.age);
getDataBqs(cfJd.value, cfCs.value, item.id);
};
//
const getData = async (i, e) => {
@ -2219,10 +2222,11 @@ const getDatas2 = async (e, i, cs) => {
});
};
//
const getDataBq = async (i, e) => {
const getDataBq = async (jd, cs) => {
await http
.get(`/api/ggfwyth/ysyzt/getTsbq?csq=${e || ""}&xzjd=${i || ""}`)
.get(`/api/ggfwyth/ysyzt/getTsbq?csq=${cs || ""}&xzjd=${jd || ""}`)
.then((res) => {
console.log(66666666666);
if (res.code == 200) {
if (cfJd.value == "") {
tsbqTotal.value.length = 0;
@ -2260,48 +2264,54 @@ const getDataBq = async (i, e) => {
}
});
};
const getDataBqs= async(i,e,v)=>{
await http
.get(`/api/ggfwyth/ysyzt/getTsbqByXzjdOrCsq?csq=${e || ""}&xzjd=${i || ""}&tsbq=${i || ""}`)
.then((res) => {
if (res.code == 200) {
if (cfJd.value == "") {
tsbqTotal.value.length = 0;
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;
}
const getDataBqs = async (jd, cs, bq) => {
let data = {};
let vv = 0;
if (cs == "" && jd == "") {
data = {
tsbq: bq,
};
vv = 1;
} else if (cs == "") {
data = {
xzjd: jd,
tsbq: bq,
};
vv = 2;
} else {
data = {
xzjd: jd,
tsbq: bq,
csq: cs,
};
vv = 3;
}
await http.get(`/api/ggfwyth/ysyzt/getTsbqByXzjdOrCsq`, data).then((res) => {
if (res.code == 200) {
// if (cfJd.value == "") {
// res.data.forEach((item, index) => {
// tsbqTotal.value.push({
// id: index + 1,
// rksl: item.rksl,
// age: item.age + "",
// ages: item.age + "",
// });
// });
// }
if (vv == 1) {
mapTownCount.map((item) => {
item.number = 0;
res.data.map((items) => {
if (items.xzjd == item.name) {
item.number = items.rs;
}
tsbqTotal.value.push({
id: idd,
name: name,
rksl: res.data[name],
});
}
console.log(1111111111, tsbqTotal.value);
// res.data.forEach((item, index) => {
// tsbqTotal.value.push({
// id: index + 1,
// rksl: item.rksl,
// age: item.age + "",
// ages: item.age + "",
// });
// });
}
// mapTownCount.map((item) => {
// item.number = 0;
// res.data.town.map((items) => {
// if (items.town == item.name) {
// item.number = items.rksl;
// }
// });
// });
});
});
}
});
}
changeRs(bq)
}
});
};
const reset_font = () => {
let width = document.documentElement.clientWidth || document.body.clientWidth;
let height =