isCourseEnd

dev_hjm_a
hjm 5 years ago
parent 96f5a89576
commit 35893a5c68

@ -8,7 +8,7 @@ class WordsBtn extends Component {
} }
render() { render() {
let{to, href,targets, style2, style, ...others }=this.props let{to, href,targets, style2, style, className, ...others }=this.props
return( return(
<React.Fragment> <React.Fragment>
{ {

@ -27,7 +27,7 @@ import './studentsList.css'
角色数组, CREATOR: 创建者, PROFESSOR: 教师, ASSISTANT_PROFESSOR: 助教, STUDENT: 学生 角色数组, CREATOR: 创建者, PROFESSOR: 教师, ASSISTANT_PROFESSOR: 助教, STUDENT: 学生
*/ */
function CourseGroupList(props) { function CourseGroupList(props) {
const [serachValue, setSerachValue] = useState('') const [searchValue, setSearchValue] = useState('')
const [DownloadType, setDownloadType] = useState() const [DownloadType, setDownloadType] = useState()
const [DownloadMessageval, setDownloadMessageval] = useState() const [DownloadMessageval, setDownloadMessageval] = useState()
@ -70,13 +70,10 @@ function CourseGroupList(props) {
} }
function onPressEnter() { function onPressEnter() {
fetchAll()
}
function onInputSearchChange() {
} }
function onInputSearchChange(e) { function onInputSearchChange(e) {
setSerachValue(e.target.value) setSearchValue(e.target.value)
} }
function Downloadcal() { function Downloadcal() {
@ -109,8 +106,9 @@ function CourseGroupList(props) {
const isAdmin = props.isAdmin(); const isAdmin = props.isAdmin();
const isSuperAdmin = props.isSuperAdmin(); const isSuperAdmin = props.isSuperAdmin();
const isParent = true; const isParent = true;
const searchValue = ''; // const searchValue = '';
const isCourseEnd= ''; const isCourseEnd= props.isCourseEnd();
const course_group_id= ''; const course_group_id= '';

@ -124,7 +124,7 @@ function CourseGroupListTable(props) {
className:"color-grey-6", className:"color-grey-6",
render: (none, record, index) => { render: (none, record, index) => {
return <React.Fragment> return <React.Fragment>
{isAdmin && <WordsBtn style2={{ marginRight: '12px' }} onClick={() => onDelete(record)} style={'grey'}>删除</WordsBtn>} {!isCourseEnd && isAdmin && <WordsBtn style2={{ marginRight: '12px' }} onClick={() => onDelete(record)} style={'grey'}>删除</WordsBtn>}
{isAdmin && <WordsBtn style2={{ marginRight: '12px' }} data-clipboard-text={record.invite_code} {isAdmin && <WordsBtn style2={{ marginRight: '12px' }} data-clipboard-text={record.invite_code}
className={`copyBtn_${record.id}`} style={''}>复制邀请码</WordsBtn> } className={`copyBtn_${record.id}`} style={''}>复制邀请码</WordsBtn> }
{isStudent && <WordsBtn style2={{ marginRight: '12px' }} onClick={() => addToDir(record)} style={''}>加入分班</WordsBtn>} {isStudent && <WordsBtn style2={{ marginRight: '12px' }} onClick={() => addToDir(record)} style={''}>加入分班</WordsBtn>}
@ -182,7 +182,7 @@ function CourseGroupListTable(props) {
const isStudent = props.isStudent() const isStudent = props.isStudent()
const isParent = true; const isParent = true;
const isCourseEnd= ''; const isCourseEnd= props.isCourseEnd();
const course_groups = props.course_groups const course_groups = props.course_groups
const columns = buildColumns() const columns = buildColumns()

@ -833,7 +833,7 @@ class studentsList extends Component{
</div> </div>
<Spin size="large" spinning={this.state.isSpin}> <Spin size="large" spinning={this.state.isSpin}>
<div className="clearfix stu_table"> <div className="clearfix stu_table">
{students && students.length && <Checkbox.Group style={{ width: '100%' }} onChange={this.onCheckBoxChange} value={checkBoxValues}> {students && !!students.length && <Checkbox.Group style={{ width: '100%' }} onChange={this.onCheckBoxChange} value={checkBoxValues}>
<Table columns={buildColumns(this,isParent)} dataSource={students} onChange={this.onTableChange} pagination={false}></Table> <Table columns={buildColumns(this,isParent)} dataSource={students} onChange={this.onTableChange} pagination={false}></Table>
</Checkbox.Group> } </Checkbox.Group> }
</div> </div>

Loading…
Cancel
Save