This commit is contained in:
谢思 2022-06-27 22:48:53 +08:00
parent bc37fa68af
commit 432b21bf32
3 changed files with 12 additions and 12 deletions

View File

@ -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">46月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 + ''}>

View File

@ -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>

View File

@ -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({});