This commit is contained in:
duanxiaohai 2024-10-22 09:16:46 +08:00
commit 0c35155b79
1 changed files with 58 additions and 6 deletions

View File

@ -1180,6 +1180,8 @@ const getCssj = async () => {
.then((res) => {
if (res.code == 200) {
cssj = JSON.parse(res.data);
console.log(1111111111,cssj);
}
});
};
@ -2968,9 +2970,9 @@ const zyys_data = ref({
//(,)
const zyysCenter = reactive([]);
const zyysDk = reactive([]);
const loadCs_zyys = async (name) => {
const loadCs_zyys = async (jdname) => {
cssj.forEach((item, index) => {
if (item.name == name) {
if (item.name == jdname) {
csqk.value = item.sj;
}
});
@ -2998,6 +3000,7 @@ const loadCs_zyys = async (name) => {
zyysCenter.push({
id: v.id,
name: v.properties.name,
jdname:jdname,
center: v.properties.center,
});
}
@ -3017,9 +3020,11 @@ const get_dk_zyys = async (sj, xd, ssly) => {
zyys_jd.forEach((item) => {
loadCs_zyys(item);
});
sj.forEach((item, index) => {
zyysDk.forEach((dk) => {
let pdK = true; //sj0
sj.forEach((item, index) => {
if (item.committee == dk.name) {
pdK = false;
let a = {
...dk,
zt: item.zt,
@ -3027,8 +3032,19 @@ const get_dk_zyys = async (sj, xd, ssly) => {
zyys_data.value.point.push(a);
}
});
if (pdK) {
let a = {
...dk,
zt: 0,
};
zyys_data.value.point.push(a);
}
});
zyysCenter.forEach((center) => {
let pdK = true; //sj0
sj.forEach((item, index) => {
if (item.committee == center.name) {
pdK = false;
let b = {
...center,
num: item.num,
@ -3040,7 +3056,42 @@ const get_dk_zyys = async (sj, xd, ssly) => {
zyys_data.value.center.push(b);
}
});
if (pdK) {
let b = {
...center,
num: 0,
town: center.jdname,
committee: center.name,
ssly: ssly,
xd: xd,
};
zyys_data.value.center.push(b);
}
});
// sj.forEach((item, index) => {
// zyysDk.forEach((dk) => {
// if (item.committee == dk.name) {
// let a = {
// ...dk,
// zt: item.zt,
// };
// zyys_data.value.point.push(a);
// }
// });
// zyysCenter.forEach((center) => {
// if (item.committee == center.name) {
// let b = {
// ...center,
// num: item.num,
// town: item.town,
// committee: item.committee,
// ssly: ssly,
// xd: xd,
// };
// zyys_data.value.center.push(b);
// }
// });
// });
};
//()
const xr_dk_center_zyys = async () => {
@ -3097,7 +3148,8 @@ const Xr_zyysNum = (polygon, indexx) => {
div.style.minWidth = "60px";
div.style.borderRadius = "12px";
// div.style.background = `url(${xcbg}) no-repeat 0/100% 100%`;
div.style.background = "linear-gradient(90deg, rgba(146,151,217,1) 0%, rgba(236,236,236,1) 100%)";
div.style.background =
"linear-gradient(90deg, rgba(146,151,217,1) 0%, rgba(236,236,236,1) 100%)";
div.style.transform = "translate(50px, 26px)";
// div.style.transform = "translateY(50px)";
div.setAttribute("name", this.properties.title);