diff --git a/public/react/src/modules/courses/members/teacherList.js b/public/react/src/modules/courses/members/teacherList.js index a3ff2d745..891225866 100644 --- a/public/react/src/modules/courses/members/teacherList.js +++ b/public/react/src/modules/courses/members/teacherList.js @@ -106,7 +106,7 @@ function buildColumns(that) { , }); const hasGraduationModule = that.hasGraduationModule() - if (hasGraduationModule { + if (hasGraduationModule) { columns.push({ title: '答辩组', key: 'graduation_group', @@ -216,14 +216,21 @@ 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) + isAdmin && off('updateNavSuccess', this.updateNavSuccess) + } + updateNavSuccess = () => { + this.getCourseGroups() } addTeacherSuccessListener = (e, data) => { // const params = JSON.parse(data)