flx:修改排序bug

This commit is contained in:
X_Rian 2024-07-31 11:30:47 +08:00
parent 79c6a59308
commit e34ae2467a
2 changed files with 5 additions and 9 deletions

View File

@ -309,15 +309,11 @@ const queryAttendanceOfEachCompany = async (showLoading: boolean) => {
showLoading
);
if (res.result) {
projectCompanyWorkTotalList.value = res.result.projectCompanyWorkTotalList;
xData.value = projectCompanyWorkTotalList.value
projectCompanyWorkTotalList.value = res.result.projectCompanyWorkTotalList
.filter((item: any) => item.attendancePersonNum > 0)
.sort((a: any, b: any) => b.attendancePersonNum - a.attendancePersonNum)
.map((item: any) => item.enterpriseName.substring(0, 4));
yData.value = projectCompanyWorkTotalList.value
.filter((item: any) => item.attendancePersonNum > 0)
.sort((a: any, b: any) => b.attendancePersonNum - a.attendancePersonNum)
.map((item: any) => item.attendancePersonNum);
.sort((a: any, b: any) => b.attendancePersonNum - a.attendancePersonNum);
xData.value = projectCompanyWorkTotalList.value.map((item: any) => item.enterpriseName.substring(0, 4));
yData.value = projectCompanyWorkTotalList.value.map((item: any) => item.attendancePersonNum);
if (projectCompanyWorkTotalList.value.length > 0) {
isFlag.value = true;
drawBar();

View File

@ -608,7 +608,7 @@ function drawEchart2() {
onMounted(async () => {
getEnterpriseStatusFn();
// getMemberJobStatusFn();
getPersonList();
// getPersonList();
});
</script>