From 34fdfaff6e15c39938088af22e1771382d62576a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=BF=83=E5=AE=87?= Date: Tue, 13 Jun 2023 14:16:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=92=E8=A1=8C=E6=A6=9C=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/military/competition/rank/index.jsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/military/competition/rank/index.jsx b/src/military/competition/rank/index.jsx index ddbab158..a0dd28a1 100644 --- a/src/military/competition/rank/index.jsx +++ b/src/military/competition/rank/index.jsx @@ -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) } })