forked from Gitlink/forgeplus-react
issue
This commit is contained in:
parent
b23720e41d
commit
70e3b22873
|
@ -1,5 +1,5 @@
|
|||
import React, { Fragment, useEffect, useState } from 'react';
|
||||
import { Checkbox, Input, message, Modal, Table, Tooltip, Breadcrumb, Tabs, Button } from 'antd';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { Modal, Table, Tooltip, Breadcrumb, Tabs, Button } from 'antd';
|
||||
import { Link } from 'react-router-dom';
|
||||
import moment from 'moment';
|
||||
import './index.scss';
|
||||
|
@ -130,9 +130,9 @@ function Check({ current_user, showNotification, history }) {
|
|||
return (
|
||||
<div className='actionBox'>
|
||||
{/* 学生已入选并且锁定 */}
|
||||
{text && record.locked && <Tooltip title="恭喜,该学生已成功入选您的课题!"><Button disabled type="primary">已入选</Button></Tooltip>}
|
||||
{text && record.locked && <Tooltip title="恭喜,该学生已成功入选您的课题!"><Button disabled type="primary" className='greenColBor'>已入选</Button></Tooltip>}
|
||||
{/* 学生已经被其他导师锁定 */}
|
||||
{!text && record.locked && <Tooltip title="此学生已入选其他课题"><Button disabled type="primary">已被选</Button></Tooltip>}
|
||||
{!text && record.locked && <Tooltip title="此学生已入选其他课题"><Button disabled type="primary" className='redColBor'>已被选</Button></Tooltip>}
|
||||
{/* 学生未被锁定 */}
|
||||
{!record.locked && (text ? <Button disabled={disabledCheck} type="default" onClick={() => { checkStudent(record.id, 0) }}>撤销</Button> :
|
||||
<Button disabled={disabledCheck || havePass} type="primary" onClick={() => { checkStudent(record.id, 1) }}>通过</Button>)}
|
||||
|
@ -182,6 +182,12 @@ function Check({ current_user, showNotification, history }) {
|
|||
})
|
||||
}
|
||||
|
||||
// 数组元素置顶方法
|
||||
function toFirst(data, index){
|
||||
if(index != 0){
|
||||
data.unshift(data.splice(index,1)[0]);
|
||||
}
|
||||
}
|
||||
|
||||
const customExpandIcon = (props) => {
|
||||
if (props.expanded) {
|
||||
|
@ -264,7 +270,14 @@ function Check({ current_user, showNotification, history }) {
|
|||
}
|
||||
taskId && getStudentList(params).then(res => {
|
||||
if (res.data && Array.isArray(res.data.rows)) {
|
||||
setData(res.data.rows);
|
||||
const data = res.data.rows;
|
||||
// 已入选数据置顶
|
||||
data.map((item, index)=>{
|
||||
if(item.passStatus && item.locked){
|
||||
toFirst(data, index);
|
||||
}
|
||||
})
|
||||
setData(data);
|
||||
let isPass = res.data.rows.some((item) => { return item.passStatus });
|
||||
setHavePass(isPass);
|
||||
}
|
||||
|
|
|
@ -178,6 +178,14 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
.redColBor .ant-btn-primary[disabled]{
|
||||
border-color: #e44141;
|
||||
span{color: #e44141;}
|
||||
}
|
||||
.greenColBor .ant-btn-primary[disabled]{
|
||||
border-color: rgb(40, 190, 108);
|
||||
span{color: rgb(40, 190, 108);}
|
||||
}
|
||||
}
|
||||
tr:hover .actionColumns .cancelApply {
|
||||
visibility: visible;
|
||||
|
|
|
@ -84,7 +84,7 @@ export default (props) => {
|
|||
<span className="hover-none"><span className="til">查看项目</span> </span>
|
||||
{/* <span className="hover-show">项目报名已截止</span> */}
|
||||
</div>
|
||||
<div className="pt6">查看夏令营各项目,掌握项目课题详细信息</div>
|
||||
<div className="pt6">掌握项目课题详细信息</div>
|
||||
</Link>
|
||||
{/* 学生报名6.24结束第一次报名,6.29 1:00 - 6.30 24:00第二次报名 */}
|
||||
<div className="apply" onClick={goToStudent}>
|
||||
|
@ -92,7 +92,7 @@ export default (props) => {
|
|||
<img src={apply2} alt="" className="applyIcon" />
|
||||
<span className="til">学生报名</span>
|
||||
</div>
|
||||
<div className="pt6">选择感兴趣的课题,开启您的开源之旅</div>
|
||||
<div className="pt6">选择课题,开启您的开源之旅</div>
|
||||
</div>
|
||||
{/* 6.28.-7.1 审核结果仅对导师可见,7.1之后对所有用户可见*/}
|
||||
{((resultTime1 && hasRole) || resultTime2) && <div className="apply" onClick={goToCheckResult}>
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
}
|
||||
|
||||
.applyBox {
|
||||
width: 1200px;
|
||||
position: absolute;
|
||||
top: 21vw;
|
||||
left: 17.5vw;
|
||||
|
|
Loading…
Reference in New Issue