无奖金课题结果

This commit is contained in:
namezlx 2023-11-23 13:55:17 +08:00
parent 1a085c7e08
commit 2c05e5e82c
5 changed files with 263 additions and 3 deletions

View File

@ -294,4 +294,13 @@ export function hasFinalExam(data) {
method: 'get',
data
});
}
// 无奖金结果列表
export function getExamineInfoListFor0In(params) {
return fetch({
url: `/api/examineMaterial/getExamineInfoListFor0In2023`,
method: 'get',
params
});
}

View File

@ -87,12 +87,20 @@ export default (props) => {
</Link>}
{/* 0元项目 */}
<Link to={`/glcc/freeproject`} className="apply project" >
{/* <Link to={`/glcc/freeproject`} className="apply project" >
<div>
<img src={apply1} alt="" className="applyIcon" />
<span className="hover-none"><span className="til">无奖金项目</span> </span>
</div>
<div className="pt6">欢迎广大学生踊跃参与</div>
</Link> */}
{/* 无奖金课题结果公示 */}
<Link to={`/glcc/${id}/free-result`} className="apply project" >
<div>
<img src={apply1} alt="" className="applyIcon" />
<span className="hover-none"><span className="til">无奖金课题结果公示</span> </span>
</div>
<div className="pt6">查看各课题入选学生名单</div>
</Link>
{/* 学生报名6.24结束第一次报名6.29 1:00 - 6.30 24:00第二次报名 */}

BIN
src/glcc/img/freeBanner.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 894 KiB

View File

@ -52,6 +52,11 @@ const FreeProject = Loadable({
loader: () => import("./freeProject"),
loading: Loading,
});
// -
const FreeResult = Loadable({
loader: () => import("./interimReview/freeResult"),
loading: Loading,
});
//
const TaskDetail = Loadable({
loader: () => import("./project/taskDetail"),
@ -302,13 +307,19 @@ const Glcc = (propsF) => {
)}
></Route>
<Route
{/* <Route
path="/glcc/freeproject"
render={(props) => (
<FreeProject {...propsF} {...props}/>
)}
></Route> */}
{/* 无奖金课题结果公示 */}
<Route
path="/glcc/:id/free-result"
render={(props) => (
<FreeResult id={id} round={round} period={period} current_user={current_user} history={props.history}/>
)}
></Route>
{/* openmmlab列表 */}
<Route
path="/glcc/openmmlab"

View File

@ -0,0 +1,232 @@
import React, { useEffect, useState } from "react";
import { Input, Table, Tooltip, Checkbox } from "antd";
import { getExamineInfoListFor0In } from "../api";
import ProjectDetail from "../project/component/projectDetail";
import freeBanner from "../img/freeBanner.png";
import bgPng from "../img/bgPng.png";
import "./index.scss";
import "../checkResult/index.scss";
import "../project/taskList/index.scss";
import "../project/index.scss";
const { Search } = Input;
//
function FreeResult({ round, id, period }) {
//
const [keyword, setKeyword] = useState(undefined);
const [data, setData] = useState([]);
// table
const [current, setCurrent] = useState(1);
const [total, setTotal] = useState(0);
const [pageSize, setPageSize] = useState(20);
const [loading, setLoading] = useState(false);
const [expandedRowKeys, setExpandedRowKeys] = useState([]);
useEffect(() => {
setLoading(true);
setExpandedRowKeys([]);
const params = {
curPage: current,
keyword,
pageSize,
term: period === "mediumExamine3" ? 1 : 2,
round,
};
getExamineInfoListFor0In(params).then((response) => {
if (response && response.message === "success") {
response.data.rows.map((item, index)=>{
item.id = (current-1)*pageSize+index + 1;
})
setData(response.data.rows);
setTotal(response.data.total);
}
setLoading(false);
});
}, [keyword, current, pageSize]);
const columns = [
{
title: "序号",
dataIndex: "index",
align: "center",
className: "columnsResult",
width: "8%",
render: (text, item, index) => (
<span>{(current - 1) * pageSize + index + 1}</span>
),
},
{
title: "入选学生",
dataIndex: "studentName",
className: "columnsResult taskName",
width: "12%",
ellipsis: true,
},
{
title: "课题导师",
dataIndex: "tutorName",
className: "columnsResult",
width: "12%",
ellipsis: true,
},
{
title: "课题名称",
dataIndex: "taskName",
className: "columnsResult",
width: "22%",
ellipsis: true,
render: (text, item) => (
<Tooltip title={text} placement="topLeft">
<span
className="toolTipSpan link"
onClick={() => {
window.open(`/glcc/${id}/subjects/detail/${item.taskId}`);
}}
>
{text}
</span>
</Tooltip>
),
},
{
title: "项目名称",
dataIndex: "projectName",
className: "columnsResult",
ellipsis: true,
width: "16%",
render: (text) => (
<Tooltip title={text} placement="topLeft">
<span className="toolTipSpan">{text}</span>
</Tooltip>
),
},
{
title: "项目简介",
dataIndex: "introduce",
className: "columnsResult",
width: "16%",
ellipsis: true,
},
{
title: "考核结果",
dataIndex: "totalityEvaluation",
align: "center",
className: "columnsResult actionBox",
},
];
const customExpandIcon = (props) => {
if (props.expanded) {
return (
<a
className="toolTipSpan link"
style={{ marginRight: 8 }}
onClick={(e) => {
props.onExpand(props.record, e);
}}
>
<i className="iconfont icon-ketixiangqingicon mr5"></i>项目简介
<i className="iconfont icon-changyongtubiao-xianxingdaochu-zhuanqu- font-12 ml5 down mr10"></i>
</a>
);
} else {
return (
<a
className="toolTipSpan link"
style={{ marginRight: 8 }}
onClick={(e) => {
props.onExpand(props.record, e);
}}
>
<i className="iconfont icon-ketixiangqingicon mr5"></i>项目简介
<i className="iconfont icon-jiantou9 font-12 ml5 down mr10"></i>
</a>
);
}
};
const expandRow = (record) => {
return (
<ProjectDetail
detail={null}
projectId={record.projectIntro}
showTask={false}
/>
);
};
//
function onExpand(expanded, record) {
const keys = new Set(expandedRowKeys);
if (expanded) {
keys.add(record.id);
} else {
keys.delete(record.id);
}
setExpandedRowKeys(Array.from(keys));
}
// pagesize
function onShowSizeChange(current, pageSize) {
window.scrollTo(0, 0);
setCurrent(1);
setPageSize(pageSize);
}
//
function changePage(page, pageSize) {
window.scrollTo(0, 0);
setCurrent(page);
}
return (
<div className="interimBox taskList resultListBox">
<img className="bannerInterim" src={freeBanner} alt=""></img>
<div className="bgBox">
<div className="resultList">
<div className="goBackBox">
<a href={`/glcc/${id}`}>开源夏令营 / </a>无奖金课题考核结果公示
</div>
<div className="searchBox">
<Search
className="search"
placeholder="请输入学生姓名或课题名称进行搜索"
allowClear
enterButton
onSearch={(value) => {
setCurrent(1);
setKeyword(value);
}}
/>
<div style={{ width: 100 }}></div>
</div>
<Table
loading={loading}
columns={columns}
dataSource={data}
expandedRowRender={expandRow}
expandIconColumnIndex={5}
expandIconAsCell={false}
expandIcon={customExpandIcon}
rowKey={"id"}
expandedRowKeys={expandedRowKeys}
onExpand={onExpand}
pagination={{
current: current,
pageSize: pageSize,
total: total,
showSizeChanger: true,
onShowSizeChange: onShowSizeChange,
showQuickJumper: true,
onChange: changePage,
}}
className="resultListTable pb30"
/>
</div>
<img src={bgPng} alt="" className="bgPng3" />
<img src={bgPng} alt="" className="bgPng4" />
</div>
</div>
);
}
export default FreeResult;