From 4e8bd3fb74b51490a1a7bb6c411f97d7eb77d318 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Mon, 24 Jun 2019 09:27:49 +0800 Subject: [PATCH] getCourseGroups --- public/react/src/modules/courses/members/teacherList.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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)