排行榜优化

This commit is contained in:
黄心宇 2023-06-13 14:16:52 +08:00
parent 56a983c4c0
commit 34fdfaff6e
1 changed files with 11 additions and 2 deletions

View File

@ -73,6 +73,7 @@ function Rank({ isLocal, match }) {
title: '得分F1',
dataIndex: 'f1',
className: 'textCenter',
defaultSortOrder: 'descend',
sorter: (a, b) => a.f1 - b.f1
},
{
@ -92,11 +93,19 @@ function Rank({ isLocal, match }) {
useEffect(() => {
rankingList(competitionId, {
page: curPage,
limit: 20,
limit: 1000,
keyword,
}).then(res => {
if (res && res.data && res.data.message == "success") {
setList(res.data.data);
const list = res.data.data;
list.forEach(e => {
if (e.other_score_json) {
e.f1 = e.other_score_json.f1;
e.precision = e.other_score_json.precision;
e.recall = e.other_score_json.recall;
}
});
setList(list);
setTotal(res.data.count)
}
})