getCourseGroups

dev_forum
hjm 6 years ago
parent 88cebdbb0c
commit 4e8bd3fb74

@ -106,7 +106,7 @@ function buildColumns(that) {
, ,
}); });
const hasGraduationModule = that.hasGraduationModule() const hasGraduationModule = that.hasGraduationModule()
if (hasGraduationModule { if (hasGraduationModule) {
columns.push({ columns.push({
title: '答辩组', title: '答辩组',
key: 'graduation_group', key: 'graduation_group',
@ -216,14 +216,21 @@ class studentsList extends Component{
}) })
this.fetchAll(1); this.fetchAll(1);
const isAdminOrTeacher = this.props.isAdminOrTeacher() const isAdminOrTeacher = this.props.isAdminOrTeacher()
const isAdmin = this.props.isAdmin()
isAdminOrTeacher && this.getGroupList(); isAdminOrTeacher && this.getGroupList();
this.getCourseGroups(); this.getCourseGroups();
on('addTeacherSuccess', this.addTeacherSuccessListener) on('addTeacherSuccess', this.addTeacherSuccessListener)
isAdmin && on('updateNavSuccess', this.updateNavSuccess)
} }
componentWillUnmount() { componentWillUnmount() {
off('addTeacherSuccess', this.addTeacherSuccessListener) off('addTeacherSuccess', this.addTeacherSuccessListener)
isAdmin && off('updateNavSuccess', this.updateNavSuccess)
}
updateNavSuccess = () => {
this.getCourseGroups()
} }
addTeacherSuccessListener = (e, data) => { addTeacherSuccessListener = (e, data) => {
// const params = JSON.parse(data) // const params = JSON.parse(data)

Loading…
Cancel
Save