Merge pull request 'ccks2023' (#566) from Eeeros/forgeplus-react:pre_dev_military into pre_dev_military

This commit is contained in:
Eeeros 2023-07-20 11:35:46 +08:00
commit b69bd2faab
7 changed files with 1856 additions and 1787 deletions

3560
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -264,7 +264,7 @@ const Competition = (props) => {
</li>} */}
{
['ccks', 'zstp2022'].includes(competitionId) && <li className={active === "rank" ? "active" : ""}>
['ccks', 'zstp2022', 'zstp2023'].includes(competitionId) && <li className={active === "rank" ? "active" : ""}>
<Link to={{ pathname: `/competition/${competitionId}/rank` }}>排行榜</Link>
</li>
}

View File

@ -102,6 +102,7 @@ export async function focusCompetitionList(params) {
return axios.get(`/competition_infos.json`, { params });
}
// 集群突击竞赛
// 用户id md5加密
export function encryptionuserId(userId){
@ -168,4 +169,4 @@ export function matchReplay(data) {
method: 'post',
data: data
});
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -48,14 +48,64 @@ function Rank({ isLocal, match }) {
},
]
const columns2023 = [
{
title: '排名',
dataIndex: 'rank_num',
className: 'ranking-num',
render: (text, record, i) => {
return text < 4 ? <div className={`rank-icon rank${text}`}></div> : text
}
},
{
title: '参赛单位',
dataIndex: 'org_name',
width: '30%',
render: (text, record) => {
return <Tooltip title={text} placement="topLeft">{text}</Tooltip>;
}
},
{
title: '参赛队长',
dataIndex: 'leader',
},
{
title: 'F1',
dataIndex: 'f1',
className: 'textCenter',
defaultSortOrder: 'descend',
sorter: (a, b) => a.f1 - b.f1
},
{
title: 'P',
dataIndex: 'precision',
className: 'textCenter',
sorter: (a, b) => a.precision - b.precision
},
{
title: 'R',
dataIndex: 'recall',
className: 'textCenter',
sorter: (a, b) => a.recall - b.recall
},
]
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)
}
})
@ -73,7 +123,8 @@ function Rank({ isLocal, match }) {
</div>
<div className="rank-list">
<img className="ccks_start" src={rank_start} />
{ competitionId === 'zstp2023' ? <span className="ccks-round">{ Date.now() < 1689350400000 ? '训练验证阶段' : '测试排榜阶段'}</span> : <img className="ccks_start" src={rank_start} /> }
<div className="rank-search">
<Search
placeholder='参赛单位/参赛队长姓名'
@ -91,7 +142,7 @@ function Rank({ isLocal, match }) {
<PaginationTable
loading={loading}
dataSource={list}
columns={columns}
columns={competitionId === 'zstp2023' ? columns2023 : columns}
total={total}
setCurPage={(page) => setCurPage(page)}
current={curPage}

View File

@ -135,6 +135,23 @@
left: -19px;
}
.ccks-round {
position: absolute;
width: 187px;
height: 70px;
color: #e37f27;
font-size: 20px;
font-weight: bold;
padding-left: 25px;
line-height: 65px;
top: -10px;
left: -19px;
background-image: url('../image/rank-title-bg.png');
background-repeat: no-repeat;
background-size: 100% 100%;
}
.ranking-num {
text-align: center;
}

View File

@ -128,7 +128,7 @@ function Introduce({ form, showNotification, match, history, enrollStatus, curre
<div className="refer_tit">上传作品</div>
{upload ? <div className="refer_content">
<img src={ccks_upload} className="refer_img mb20" alt="" />
<div className="refer_tip">请上传小于50M的作品</div>
<div className="refer_tip">请上传小于50M的result.json文件</div>
<Upload
// accept=".csv"
// action?debug=admin