Compare commits

...

2 Commits

Author SHA1 Message Date
姚宇浩 218fb927d9 Merge branch 'main' of https://git.cityme.com.cn/xiangshan/ggfwjsc 2024-10-22 09:10:14 +08:00
姚宇浩 814b8b7c5f 显示0 2024-10-21 16:14:06 +08:00
1 changed files with 58 additions and 6 deletions

View File

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