forked from Gitlink/forgeplus-react
issue
This commit is contained in:
parent
bc37fa68af
commit
432b21bf32
|
@ -23,7 +23,7 @@ function Check({ current_user, showNotification, history }) {
|
|||
const [taskId, setTaskId] = useState();
|
||||
const [havePass, setHavePass] = useState(false);
|
||||
|
||||
const disabledCheck = new Date().getTime() > new Date('2022-07-01').getTime();
|
||||
const disabledCheck = new Date().getTime() > new Date('2022-07-01 00:00:00').getTime();
|
||||
|
||||
const columns = [
|
||||
{
|
||||
|
@ -130,11 +130,11 @@ function Check({ current_user, showNotification, history }) {
|
|||
return (
|
||||
<div className='actionBox'>
|
||||
{/* 学生已入选并且锁定 */}
|
||||
{text && record.locked && <Tooltip title="恭喜,该学生已成功入选您的课题!"><Button disabled type="primary" className='greenColBor'>已入选</Button></Tooltip>}
|
||||
{record.locked && !record.used && <Tooltip title="恭喜,该学生已成功入选您的课题!"><Button disabled type="primary" className='greenColBor'>已入选</Button></Tooltip>}
|
||||
{/* 学生已经被其他导师锁定 */}
|
||||
{!text && record.locked && <Tooltip title="此学生已入选其他课题"><Button disabled type="primary" className='redColBor'>已被选</Button></Tooltip>}
|
||||
{record.locked && record.used && <Tooltip title="此学生已入选其他课题"><Button disabled type="primary" className='redColBor'>已被选</Button></Tooltip>}
|
||||
{/* 学生未被锁定 */}
|
||||
{!record.locked && (text ? <Button disabled={disabledCheck} type="default" onClick={() => { checkStudent(record.id, 0) }}>撤销</Button> :
|
||||
{!record.locked && !record.used && (text ? <Button disabled={disabledCheck} type="default" onClick={() => { checkStudent(record.id, 0) }}>撤销</Button> :
|
||||
<Button disabled={disabledCheck || havePass} type="primary" onClick={() => { checkStudent(record.id, 1) }}>通过</Button>)}
|
||||
</div>
|
||||
)
|
||||
|
@ -143,7 +143,7 @@ function Check({ current_user, showNotification, history }) {
|
|||
];
|
||||
|
||||
useEffect(() => {
|
||||
if(new Date().getTime() > new Date('2022-07-01').getTime()){
|
||||
if(new Date().getTime() > new Date('2022-07-01 0:0').getTime()){
|
||||
history.push('/403');
|
||||
}
|
||||
if (!current_user.user_id) {
|
||||
|
@ -273,12 +273,12 @@ function Check({ current_user, showNotification, history }) {
|
|||
const data = res.data.rows;
|
||||
// 已入选数据置顶
|
||||
data.map((item, index)=>{
|
||||
if(item.passStatus && item.locked){
|
||||
if(item.locked && !item.used){
|
||||
toFirst(data, index);
|
||||
}
|
||||
})
|
||||
setData(data);
|
||||
let isPass = res.data.rows.some((item) => { return item.passStatus });
|
||||
let isPass = res.data.rows.some((item) => { return (item.passStatus && !(item.locked&&item.used)) || (item.locked && !item.used) });
|
||||
setHavePass(isPass);
|
||||
}
|
||||
setLoading(false);
|
||||
|
@ -297,8 +297,8 @@ function Check({ current_user, showNotification, history }) {
|
|||
<div className="head_content">1、欢迎进入导师审核页!各位导师可查看到您发布课题的全部学生报名信息</div>
|
||||
<div className="head_content">2、您可根据学生报名信息与学生进行邮箱或电话沟通了解学生详细情况,选择满意的学生</div>
|
||||
<div className="head_content">3、每个课题仅允许审核通过一个学生,在审核过程中,您可以随时调整各学生的审核状态,直到与学生匹配成功</div>
|
||||
<div className="head_content">4、6月28日后,各导师可访问 <a href='/glcc/result'>https://www.gitlink.org.cn/glcc/result</a> 查询匹配结果(需使用导师账号登录)</div>
|
||||
<div className="head_content">5、请各位导师在7月1日前完成课题申请的审核,7月1日凌晨1点平台将根据各导师审核信息,正式公布各课题学生入选名单</div>
|
||||
{/* <div className="head_content">4、6月28日后,各导师可访问 <a href='/glcc/result'>https://www.gitlink.org.cn/glcc/result</a> 查询匹配结果(需使用导师账号登录)</div> */}
|
||||
<div className="head_content">4、请各位导师在7月1日前完成课题申请的审核,7月1日凌晨1点平台将根据各导师审核信息,正式公布各课题学生入选名单</div>
|
||||
</div>
|
||||
|
||||
<Tabs className="task-tabs" onChange={(e) => { setTaskId(e) }} activeKey={taskId + ''}>
|
||||
|
|
|
@ -95,7 +95,7 @@ export default (props) => {
|
|||
<div className="pt6">选择课题,开启您的开源之旅</div>
|
||||
</div>
|
||||
{/* 6.28.-7.1 审核结果仅对导师可见,7.1之后对所有用户可见*/}
|
||||
{((resultTime1 && hasRole) || resultTime2) && <div className="apply" onClick={goToCheckResult}>
|
||||
{resultTime2 && <div className="apply" onClick={goToCheckResult}>
|
||||
<div>
|
||||
<img src={apply2} alt="" className="applyIcon" />
|
||||
<span className="til">名单{resultTime1 && '预'}公示</span>
|
||||
|
@ -103,7 +103,7 @@ export default (props) => {
|
|||
<div className="pt6">查看各课题入选学生名单</div>
|
||||
</div>}
|
||||
{/* 导师审核 */}
|
||||
{hasRole && new Date().getTime() < new Date('2022-07-01').getTime() && <div className="apply" onClick={goToCheck}>
|
||||
{hasRole && new Date().getTime() < new Date('2022-07-01 0:0').getTime() && <div className="apply" onClick={goToCheck}>
|
||||
<div>
|
||||
<img src={teacher} alt="" className="applyIcon" />
|
||||
<span className="til">导师审核</span>
|
||||
|
|
|
@ -69,7 +69,7 @@ const Glcc = (propsF) => {
|
|||
// 学生报名时间
|
||||
const studentApplyStart = new Date().getTime() > new Date('2022-05-26').getTime();
|
||||
const isStudentApplyDate = new Date().getTime() > new Date('2022-05-26').getTime() && new Date().getTime() < new Date('2022-06-25 0:0').getTime();
|
||||
const secondStudentApplyDate = new Date().getTime() > new Date('2022-06-29 1:0').getTime() && new Date().getTime() < new Date('2022-07-01 0:0').getTime();
|
||||
const secondStudentApplyDate = new Date().getTime() > new Date('2022-06-29 1:0').getTime() && new Date().getTime() < new Date('2022-06-30 0:0').getTime();
|
||||
|
||||
// 用户已报名课题id数组
|
||||
const [applyTaskId, setApplyTaskId] = useState({});
|
||||
|
|
Loading…
Reference in New Issue