单点渲染DGcreateCs2

This commit is contained in:
姚宇浩 2024-08-01 17:08:44 +08:00
parent fa3202ad72
commit b5dc31baab
1 changed files with 34 additions and 21 deletions

View File

@ -1237,7 +1237,7 @@ const getDatas = async (e, i) => {
} }
if (cfJd.value != "") { if (cfJd.value != "") {
xkzCenter.map((item) => { xkzCenter.map((item) => {
// item.number = 0; item.swrs = 0;
res.data.committeeSwrs.map((items) => { res.data.committeeSwrs.map((items) => {
if (items.csq == item.name) { if (items.csq == item.name) {
item.swrs = items.swrs; item.swrs = items.swrs;
@ -1400,6 +1400,15 @@ const getDatas2 = async (e, i, cs) => {
} }
} }
}); });
if (choose.value.person == "") {
cs_dd_arr.value.map((item, index) => {
DGcreateCs(item, index);
});
} else {
cs_dd_arr.value.map((item, index) => {
DGcreateCs2(item, index);
});
}
}; };
// //
// //
@ -2220,15 +2229,15 @@ const addPolygonCountyCs = () => {
getDatas2(cfJd.value, choose.value.person, cfCs.value); getDatas2(cfJd.value, choose.value.person, cfCs.value);
addCsChoose(); addCsChoose();
addCsUnChoose(); addCsUnChoose();
if (choose.value.person == "") { // if (choose.value.person == "") {
cs_dd_arr.value.map((item, index) => { // cs_dd_arr.value.map((item, index) => {
DGcreateCs(item, index); // DGcreateCs(item, index);
}); // });
} else { // } else {
cs_dd_arr.value.map((item, index) => { // cs_dd_arr.value.map((item, index) => {
DGcreateCs2(item, index); // DGcreateCs2(item, index);
}); // });
} // }
}); });
} }
}); });
@ -2322,11 +2331,12 @@ const addCsUnChoose = () => {
// ) { // ) {
// getDataBqs2(cfJd.value, cfCs.value, choose.value.person, false); // getDataBqs2(cfJd.value, cfCs.value, choose.value.person, false);
// } // }
if (choose.value.person == "") { // if (choose.value.person == "") {
cs_dd_arr.value.map((item, index) => { // cs_dd_arr.value.map((item, index) => {
DGcreateCs(item, index); // DGcreateCs(item, index);
}); // });
} else if ( // } else
if (
choose.value.person == "cjr" || choose.value.person == "cjr" ||
choose.value.person == "dibian" || choose.value.person == "dibian" ||
choose.value.person == "db" || choose.value.person == "db" ||
@ -2336,13 +2346,16 @@ const addCsUnChoose = () => {
choose.value.person == "kjer" choose.value.person == "kjer"
) { ) {
getDataBqs2(cfJd.value, cfCs.value, choose.value.person, false); getDataBqs2(cfJd.value, cfCs.value, choose.value.person, false);
} else {
setTimeout(() => {
cs_dd_arr.value.map((item, index) => {
DGcreateCs2(item, index);
});
}, 600);
} }
// if (choose.value.person == "") {
// cs_dd_arr.value.map((item, index) => {
// DGcreateCs(item, index);
// });
// } else {
// cs_dd_arr.value.map((item, index) => {
// DGcreateCs2(item, index);
// });
// }
addCsChoose(); addCsChoose();
addCsUnChoose(); addCsUnChoose();
}); });