dev_forum
hjm 5 years ago
parent 4e36b2f604
commit 90b4a039c2

@ -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(
<React.Fragment >
<Titlesearchsection
@ -506,7 +521,7 @@ class studentsList extends Component{
{ isAdmin && isParent && <WordsBtn style="blue" className="mr30" onClick={()=>this.addDir()}>添加分班</WordsBtn> }
{ isAdmin && !isParent && course_group_id != 0 && <WordsBtn style="blue" className="mr30" onClick={()=>this.deleteDir()}>删除分班</WordsBtn> }
{ isAdmin && !isParent && course_group_id != 0 && <WordsBtn style="blue" className="mr30" onClick={()=>this.renameDir()}>分班重命名</WordsBtn> }
{ isAdmin && <WordsBtn style="blue" className="" href={`/api/courses/${courseId}/export_member_scores_excel.xlsx`}>导出成绩</WordsBtn> }
{ isAdmin && <WordsBtn style="blue" className="" href={`${exportUrl}`}>导出成绩</WordsBtn> }
{/* */}
</React.Fragment>
}

Loading…
Cancel
Save