From 90b4a039c2d61d6cc9a4ed3dfdbb466b291b2b92 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Wed, 3 Jul 2019 16:03:56 +0800 Subject: [PATCH] params --- .../modules/courses/members/studentsList.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/members/studentsList.js b/public/react/src/modules/courses/members/studentsList.js index 500cbd2a3..ca5e859b9 100644 --- a/public/react/src/modules/courses/members/studentsList.js +++ b/public/react/src/modules/courses/members/studentsList.js @@ -468,7 +468,22 @@ class studentsList extends Component{ const { course_group_name, invite_code } = this.state; const courseId = this.props.match.params.coursesId - + let exportUrl = "/api/courses/${courseId}/export_member_scores_excel.xlsx?" + const params = {} + if (course_group_id) { + params.group_id = course_group_id + } + if (searchValue) { + searchValue = searchValue.trim() + if (searchValue) { + params.search = searchValue + } + } + let paramsString = '' + for (let key in params) { + paramsString += `${key}=${params[key]}&` + } + exportUrl += paramsString; return( this.addDir()}>添加分班 } { isAdmin && !isParent && course_group_id != 0 && this.deleteDir()}>删除分班 } { isAdmin && !isParent && course_group_id != 0 && this.renameDir()}>分班重命名 } - { isAdmin && 导出成绩 } + { isAdmin && 导出成绩 } {/* */} }