This commit is contained in:
汪汇 2024-07-26 15:30:37 +08:00
parent 6a13af1fbb
commit 97c11bf353
1 changed files with 133 additions and 110 deletions

View File

@ -11,13 +11,8 @@
<div class="title_line"></div>
</div>
<div class="content">
<div
class="content_item"
v-for="(item, index) in personTotal"
:class="{ choose: item.id == choose.person }"
@click="buten(item)"
:key="index"
>
<div class="content_item" v-for="(item, index) in personTotal" :class="{ choose: item.id == choose.person }"
@click="buten(item)" :key="index">
<div class="content_item_name">{{ item.ages }}</div>
<div class="content_item_value">{{ item.rksl }}</div>
</div>
@ -29,13 +24,8 @@
<div class="title_line"></div>
</div>
<div class="content">
<div
class="content_item"
v-for="(item, index) in tsbqTotal"
:class="{ choose: item.id == choose.person }"
@click="buten2(item)"
:key="index"
>
<div class="content_item" v-for="(item, index) in tsbqTotal" :class="{ choose: item.id == choose.person }"
@click="buten2(item)" :key="index">
<div class="content_item_name">{{ item.name }}</div>
<div class="content_item_value">{{ item.rksl }}</div>
</div>
@ -49,19 +39,11 @@
<div class="title_line"></div>
</div>
<div class="jbggfwq_content">
<div
class="jbggfwq_content_item"
v-for="(item, index) in jbfwqTotal"
:key="index"
>
<div class="jbggfwq_content_item" v-for="(item, index) in jbfwqTotal" :key="index">
<div class="jbggfwq_content_item_left">{{ item.name }}</div>
<div class="jbggfwq_content_item_right">
<div
class="jbggfwq_content_item_right_item"
v-for="itemm in item.child"
:class="{ choose: itemm.id == choose.fwq }"
@click="changeFwq(itemm.id, itemm.fwqList, itemm.center)"
>
<div class="jbggfwq_content_item_right_item" v-for="itemm in item.child"
:class="{ choose: itemm.id == choose.fwq }" @click="changeFwq(itemm.id, itemm.fwqList, itemm.center)">
{{ itemm.name }}
</div>
</div>
@ -74,13 +56,8 @@
<div class="title_line"></div>
</div>
<div class="zyys_content">
<div
class="zyys_content_item"
v-for="(item, index) in yaosuTotal"
:class="{ choose: item.id == choose.yaosu, wz: item.wz == true }"
@click="changeys(item.id)"
:key="index"
>
<div class="zyys_content_item" v-for="(item, index) in yaosuTotal"
:class="{ choose: item.id == choose.yaosu, wz: item.wz == true }" @click="changeys(item.id)" :key="index">
<img :src="item.img" class="zyys_content_item_left" />
<div class="zyys_content_item_right">{{ item.name }}</div>
</div>
@ -205,10 +182,14 @@ const tsbq_id_total = ref([
name: "糖尿病",
id: "tnb",
},
{
{
name: "退役军人",
id: "tyjr",
},
{
name: "困难儿童",
id: "kjer",
},
]);
//
const csh = () => {
@ -423,7 +404,6 @@ var map = null;
//
let currentMarker = null; //
const markera = (e) => {
// console.log(`${e.latlng.lng},${e.latlng.lat} `, "name");
//
if (currentMarker !== null) {
map.removeOverlay(currentMarker);
@ -522,7 +502,12 @@ const addPolygonCounty = () => {
if (choose.value.person == 0) {
getDatas("溪口镇", "");
getDataBq(cfJd.value, "");
} 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") {
getDataBq(cfJd.value, "");
getDataBqs2(cfJd.value, '', choose.value.person,);
console.log(3);
} else {
console.log(4);
getDatas("溪口镇", choose.value.person);
}
@ -597,12 +582,11 @@ const addJd = () => {
};
//2
const addJd2 = () => {
// if (center_now.value[0] == 119.178783) {
// goMapCenter([119.178783, 29.034581], 11);
// }
mapTownCount.map((item, index) => {
createCustomOverlayJd2(item, index);
});
nextTick(() => {
mapTownCount.map((item, index) => {
createCustomOverlayJd2(item, index);
});
})
// if (center_now.value[0] == 119.178783) {
// goMapCenter([119.178783, 29.034581], 11);
@ -684,7 +668,15 @@ const addPolygonCountyCs = () => {
DGcreateCs2(item, index);
});
}
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") {
console.log(1, '溪口镇');
getDataBqs2(cfJd.value, cfCs.value, '');
} else {
console.log(2, '溪口镇');
getDatas2('溪口镇', choose.value.person, cfCs.value);
}
addCsChoose();
addCsUnChoose();
});
@ -760,7 +752,6 @@ const addCsUnChoose = () => {
xkzCenter.forEach((a, b) => {
if (a.name == item.name) {
cs_dd_arr.value.push(a);
console.log("44444444444", a);
xuanzhongCs.value.push(a);
}
});
@ -889,10 +880,11 @@ const createCustomOverlayJd2 = (polygon, indexx) => {
}
let num = "";
if (choose.value.person == "6666") {
console.log(11111);
num = "swrs";
} 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") {
num = "numbers";
} else {
console.log(222222);
num = "number";
}
jdm_number_arr.value[indexx] = new BMapGL.CustomOverlay(createLabelDOM, {
@ -906,6 +898,7 @@ const createCustomOverlayJd2 = (polygon, indexx) => {
},
});
map.addOverlay(jdm_number_arr.value[indexx]);
};
//
const addCs = () => {
@ -970,6 +963,9 @@ const createCs2 = (polygon, indexx) => {
let num = "";
if (choose.value.person == "6666") {
num = "swrs";
} 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") {
num = "numbers";
} else {
num = "number";
}
@ -1147,6 +1143,9 @@ const DGcreateCs2 = (polygon, indexx) => {
let num = "";
if (choose.value.person == "6666") {
num = "swrs";
} 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") {
num = "numbers";
} else {
num = "number";
}
@ -1286,8 +1285,10 @@ const changeRs = (id) => {
jdm_number_arr.value.forEach((item, index) => {
map.removeOverlay(jdm_number_arr.value[index]);
});
console.log(1);
addJd();
} else {
console.log(2);
choose.value.person = id;
jdm_arr.value.forEach((item, index) => {
map.removeOverlay(jdm_arr.value[index]);
@ -1298,6 +1299,16 @@ const changeRs = (id) => {
addJd2();
}
};
const changeRs2 = (id) => {
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 changebq = (id) => {
if (choose.value.person == id) {
choose.value.person = "";
@ -2073,7 +2084,6 @@ const buten = async (item) => {
getDatas("溪口镇", item.age);
};
const buten2 = async (item) => {
console.log(item.id);
// getDataBq(item.id, item.age);
// getDatas("", item.age);
getDataBqs(cfJd.value, cfCs.value, item.id);
@ -2121,7 +2131,6 @@ const getData = async (i, e) => {
}
});
});
console.log(mapTownCount);
mapTownCount.map((item) => {
item.number = 0;
res.data.town.map((items) => {
@ -2186,7 +2195,6 @@ const getDatas = async (e, i) => {
}
});
});
console.log(xkzCenter);
xkzCenter.map((item) => {
item.number = 0;
@ -2237,6 +2245,9 @@ const getDatas = async (e, i) => {
});
};
const getDatas2 = async (e, i, cs) => {
if (i == "cjr" || i == "dibian" || i == "db" || i == "gxy" || i == "tnb" || i == "tyjr" || i == "kjer") {
i = ''
}
await http
.get(
`/api/ggfwyth/ysyzt/getCssrksl?town=${e}&age=${i || ""}&committee=${cs}`
@ -2286,45 +2297,67 @@ const getDataBq = async (jd, cs) => {
await http
.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;
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.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 + "",
// });
// });
tsbqTotal.value.push({
id: idd,
name: name,
rksl: res.data[name],
});
}
// mapTownCount.map((item) => {
// item.number = 0;
// res.data.town.map((items) => {
// if (items.town == item.name) {
// item.number = items.rksl;
// }
// });
// });
}
});
};
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) {
mapTownCount.map((item) => {
item.numbers = 0;
res.data.map((items) => {
if (items.xzjd == item.name) {
item.numbers = items.rs;
}
});
});
console.log(mapTownCount, 'mapTownCount');
changeRs2(bq);
if (jd) {
addCs2();
}
}
});
};
const getDataBqs2 = async (jd, cs, bq) => {
let data = {};
let vv = 0;
if (cs == "" && jd == "") {
@ -2358,17 +2391,17 @@ const getDataBqs = async (jd, cs, bq) => {
// });
// });
// }
if (vv == 1) {
mapTownCount.map((item) => {
item.number = 0;
res.data.map((items) => {
if (items.xzjd == item.name) {
item.number = items.rs;
}
});
xkzCenter.map((item) => {
item.numbers = 0;
res.data.map((items) => {
if (items.csq == item.name) {
item.numbers = items.rs;
}
});
}
changeRs(bq);
});
console.log(mapTownCount);
changeRs2(bq);
addCs2();
}
});
};
@ -2422,17 +2455,13 @@ onMounted(() => {
bottom: 0;
width: 520px;
height: 960px;
background: linear-gradient(
270deg,
background: linear-gradient(270deg,
rgba(0, 52, 131, 0.69) 0%,
rgba(0, 32, 83, 0.77) 50%,
rgba(0, 60, 131, 0.74) 100%
),
radial-gradient(
128% 99% at 100% 46%,
rgba(0, 60, 131, 0.74) 100%),
radial-gradient(128% 99% at 100% 46%,
rgba(0, 48, 125, 0.29) 0%,
rgba(0, 61, 134, 0.42) 100%
);
rgba(0, 61, 134, 0.42) 100%);
box-shadow: inset 0px 0px 56px 0px rgba(173, 221, 255, 0.5);
backdrop-filter: blur(3px);
padding: 30px 26px;
@ -2604,17 +2633,13 @@ onMounted(() => {
bottom: 0;
width: 520px;
height: 960px;
background: linear-gradient(
270deg,
background: linear-gradient(270deg,
rgba(0, 52, 131, 0.69) 0%,
rgba(0, 32, 83, 0.77) 50%,
rgba(0, 60, 131, 0.74) 100%
),
radial-gradient(
128% 99% at 100% 46%,
rgba(0, 60, 131, 0.74) 100%),
radial-gradient(128% 99% at 100% 46%,
rgba(0, 48, 125, 0.29) 0%,
rgba(0, 61, 134, 0.42) 100%
);
rgba(0, 61, 134, 0.42) 100%);
box-shadow: inset 0px 0px 56px 0px rgba(173, 221, 255, 0.5);
backdrop-filter: blur(3px);
padding: 30px 26px;
@ -2771,12 +2796,10 @@ onMounted(() => {
// line-height: 44px;
letter-spacing: 4px;
margin-bottom: 15px;
background: linear-gradient(
180deg,
#ffffff 0%,
#ffffff 40%,
#00ffff 100%
);
background: linear-gradient(180deg,
#ffffff 0%,
#ffffff 40%,
#00ffff 100%);
/* 使文字没有背景颜色的背景 */
background-clip: text;
/* 为了兼容性添加渐变背景到IE */