This commit is contained in:
duanxiaohai 2024-07-26 00:09:31 +08:00
parent e0972e71ab
commit e24f117182
2 changed files with 67 additions and 98 deletions

BIN
dist.zip Normal file

Binary file not shown.

View File

@ -32,12 +32,12 @@
<div
class="content_item"
v-for="(item, index) in tsbqTotal"
:class="{ choose: item.id == choose.person }"
:class="{ choose: item.id == choose.bq }"
@click="changebq(item.id)"
:key="index"
>
<div class="content_item_name">{{ item.name }}</div>
<div class="content_item_value">{{ item.rksl }}</div>
<div class="content_item_value">{{ item.value }}</div>
</div>
</div>
</div>
@ -1292,25 +1292,26 @@ const changeRs = (id) => {
}
};
const changebq = (id) => {
if (choose.value.person == id) {
choose.value.person = "";
jdm_number_arr.value.forEach((item, index) => {
map.removeOverlay(jdm_number_arr.value[index]);
});
jdm_arr.value.forEach((item, index) => {
map.removeOverlay(jdm_arr.value[index]);
});
addJd();
// choose.value.bq = id;
// choose.value.person = "";
if (choose.value.bq == id) {
choose.value.bq = 999;
// jdm_number_arr.value.forEach((item, index) => {
// map.removeOverlay(jdm_number_arr.value[index]);
// });
// jdm_arr.value.forEach((item, index) => {
// map.removeOverlay(jdm_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();
addJd();
choose.value.bq = 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]);
// });
// addJd();
}
// choose.value.person = id;
};
@ -2083,18 +2084,9 @@ const getData = async (i, e) => {
age: "",
value: "res.data.total",
},
{
id: "6666",
name: "死亡总人口",
value: "5650",
ages: "死亡总人口",
age: "1000",
},
];
personTotal.value[0].rksl = res.data.total;
personTotal.value[0].ages = "总人口";
personTotal.value[1].rksl = res.data.swrs;
personTotal.value[1].ages = "死亡";
res.data.age.forEach((item, index) => {
personTotal.value.push({
id: index + 1,
@ -2242,6 +2234,24 @@ const getDataBq = async (i, e) => {
.then((res) => {
if (res.code == 200) {
if (cfJd.value == "") {
// personTotal.value = [
// {
// id: "0",
// ages: "",
// age: "",
// value: "res.data.total",
// },
// ];
// personTotal.value[0].rksl = res.data.total;
// personTotal.value[0].ages = "";
// res.data.age.forEach((item, index) => {
// personTotal.value.push({
// id: index + 1,
// rksl: item.rksl,
// age: item.age + "",
// ages: item.age + "",
// });
// });
tsbqTotal.value.length = 0;
for (let name in res.data) {
let idd = "";
@ -2277,48 +2287,6 @@ 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;
}
}
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;
// }
// });
// });
}
});
}
const reset_font = () => {
let width = document.documentElement.clientWidth || document.body.clientWidth;
let height =
@ -2339,7 +2307,7 @@ onMounted(() => {
reset_font();
initMap();
getData();
getDataBq();
// getDataBq();
BMAP();
});
</script>
@ -2428,19 +2396,19 @@ onMounted(() => {
background-size: 100% 100%;
margin-bottom: 12px;
}
.content_item:nth-child(2) {
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: space-between;
padding: 24px;
width: 100%;
height: 57px;
background-image: url(@/assets/images/map/unchoose.png);
background-repeat: no-repeat;
background-size: 100% 100%;
margin-bottom: 12px;
}
// .content_item:last-child {
// box-sizing: border-box;
// display: flex;
// align-items: center;
// justify-content: space-between;
// padding: 24px;
// width: 100%;
// height: 57px;
// background-image: url(@/assets/images/map/unchoose.png);
// background-repeat: no-repeat;
// background-size: 100% 100%;
// margin-bottom: 12px;
// }
.content_item_name {
position: relative;
@ -2499,19 +2467,19 @@ onMounted(() => {
margin-bottom: 12px;
}
.content_item:last-child {
box-sizing: border-box;
display: flex;
align-items: center;
justify-content: space-between;
padding: 24px;
width: 100%;
height: 57px;
background-image: url(@/assets/images/map/unchoose.png);
background-repeat: no-repeat;
background-size: 100% 100%;
margin-bottom: 12px;
}
// .content_item:last-child {
// box-sizing: border-box;
// display: flex;
// align-items: center;
// justify-content: space-between;
// padding: 24px;
// width: 100%;
// height: 57px;
// background-image: url(@/assets/images/map/unchoose.png);
// background-repeat: no-repeat;
// background-size: 100% 100%;
// margin-bottom: 12px;
// }
.content_item_name {
position: relative;
@ -2709,6 +2677,7 @@ onMounted(() => {
-webkit-text-fill-color: transparent;
span {
cursor: pointer;
display: block;
font-family: YouSheBiaoTiHei;
font-size: 34px;