|
|
|
@ -32,13 +32,6 @@ function buildColumns(that) {
|
|
|
|
|
const isAdminOrTeacher = that.props.isAdminOrTeacher()
|
|
|
|
|
const { course_groups } = that.state
|
|
|
|
|
const columns = [{
|
|
|
|
|
title: '',
|
|
|
|
|
dataIndex: 'course_member_id',
|
|
|
|
|
key: 'course_member_id',
|
|
|
|
|
render: (content, item, index) => {
|
|
|
|
|
return <Checkbox value={content}></Checkbox>
|
|
|
|
|
}
|
|
|
|
|
},{
|
|
|
|
|
title: '序号',
|
|
|
|
|
// dataIndex: 'name',
|
|
|
|
|
key: 'index',
|
|
|
|
@ -112,7 +105,8 @@ function buildColumns(that) {
|
|
|
|
|
}
|
|
|
|
|
,
|
|
|
|
|
});
|
|
|
|
|
if (that.hasGraduationModule()) {
|
|
|
|
|
const hasGraduationModule = that.hasGraduationModule()
|
|
|
|
|
if (hasGraduationModule) {
|
|
|
|
|
columns.push({
|
|
|
|
|
title: '答辩组',
|
|
|
|
|
key: 'graduation_group',
|
|
|
|
@ -152,6 +146,16 @@ function buildColumns(that) {
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
if(isAdmin && hasGraduationModule) {
|
|
|
|
|
columns.unshift({
|
|
|
|
|
title: '',
|
|
|
|
|
dataIndex: 'course_member_id',
|
|
|
|
|
key: 'course_member_id',
|
|
|
|
|
render: (content, item, index) => {
|
|
|
|
|
return <Checkbox value={content}></Checkbox>
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
return columns
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -181,7 +185,7 @@ class studentsList extends Component{
|
|
|
|
|
searchValue:e.target.value
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// approval 2 - 拒绝
|
|
|
|
|
onAgree = (record, approval = 1) => {
|
|
|
|
|
const courseId = this.props.match.params.coursesId
|
|
|
|
|
|
|
|
|
@ -194,7 +198,7 @@ class studentsList extends Component{
|
|
|
|
|
})
|
|
|
|
|
.then((response) => {
|
|
|
|
|
if (response.data.status == 0) {
|
|
|
|
|
this.props.showNotification(`已${approval ? '同意' : '拒绝'}`)
|
|
|
|
|
this.props.showNotification(`已${approval == 1? '同意' : '拒绝'}`)
|
|
|
|
|
this.fetchAll(1)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
@ -212,14 +216,22 @@ class studentsList extends Component{
|
|
|
|
|
})
|
|
|
|
|
this.fetchAll(1);
|
|
|
|
|
const isAdminOrTeacher = this.props.isAdminOrTeacher()
|
|
|
|
|
const isAdmin = this.props.isAdmin()
|
|
|
|
|
|
|
|
|
|
isAdminOrTeacher && this.getGroupList();
|
|
|
|
|
this.getCourseGroups();
|
|
|
|
|
|
|
|
|
|
on('addTeacherSuccess', this.addTeacherSuccessListener)
|
|
|
|
|
isAdmin && on('updateNavSuccess', this.updateNavSuccess)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
componentWillUnmount() {
|
|
|
|
|
off('addTeacherSuccess', this.addTeacherSuccessListener)
|
|
|
|
|
const isAdmin = this.props.isAdmin()
|
|
|
|
|
isAdmin && off('updateNavSuccess', this.updateNavSuccess)
|
|
|
|
|
}
|
|
|
|
|
updateNavSuccess = () => {
|
|
|
|
|
this.getCourseGroups()
|
|
|
|
|
}
|
|
|
|
|
addTeacherSuccessListener = (e, data) => {
|
|
|
|
|
// const params = JSON.parse(data)
|
|
|
|
@ -495,6 +507,7 @@ class studentsList extends Component{
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
const isAdminOrTeacher = this.props.isAdminOrTeacher()
|
|
|
|
|
const hasGraduationModule = this.hasGraduationModule()
|
|
|
|
|
|
|
|
|
|
return(
|
|
|
|
|
<React.Fragment>
|
|
|
|
@ -540,9 +553,9 @@ class studentsList extends Component{
|
|
|
|
|
`}</style>
|
|
|
|
|
<div className="mt20 edu-back-white padding20 teacherList">
|
|
|
|
|
<div className="clearfix stu_head" style={{paddingLeft: '15px'}}>
|
|
|
|
|
<Checkbox className="fl" onChange={this.onCheckAll} checked={checkAllValue} >已选 {checkBoxValues.length} 个</Checkbox>
|
|
|
|
|
{ isAdmin && hasGraduationModule && <Checkbox className="fl" onChange={this.onCheckAll} checked={checkAllValue} >已选 {checkBoxValues.length} 个</Checkbox> }
|
|
|
|
|
{ <div className="studentList_operation_ul">
|
|
|
|
|
{ this.hasGraduationModule() && isAdminOrTeacher && <li className="li_line drop_down">
|
|
|
|
|
{ hasGraduationModule && isAdminOrTeacher && <li className="li_line drop_down">
|
|
|
|
|
加入答辩组<i className="iconfont icon-xiajiantou font-12 ml2"></i>
|
|
|
|
|
<ul className="drop_down_menu" style={{"right":"0px","left":"unset", minWidth: '222px'}}>
|
|
|
|
|
|
|
|
|
|