From e14046b705f559b7142cc5464129c8c3324a1178 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 21 Sep 2019 13:53:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../subroute/ecStudentList/EcStudentList.js | 52 ++++++++++--------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/public/react/src/modules/ecs/subroute/ecStudentList/EcStudentList.js b/public/react/src/modules/ecs/subroute/ecStudentList/EcStudentList.js index 12f4f40c1..c5a7bb51f 100644 --- a/public/react/src/modules/ecs/subroute/ecStudentList/EcStudentList.js +++ b/public/react/src/modules/ecs/subroute/ecStudentList/EcStudentList.js @@ -1,13 +1,12 @@ import React, { Component } from 'react'; import axios from 'axios'; -import { Spin } from 'antd'; import { TPMIndexHOC } from '../../../tpm/TPMIndexHOC'; import { SnackbarHOC,getImageUrl } from 'educoder' -import { Pagination,Upload,Modal,Checkbox } from 'antd'; +import { Pagination,Upload,Modal,Checkbox,Spin } from 'antd'; import EcTitleCourseEvaluations from '../../ecTitle/ecTitle' @@ -44,10 +43,10 @@ class EcStudentList extends Component { let year_id=this.props.match.params.yearId; const url ='/ec_years/'+year_id+'/students.json'; - axios.get(url, { + axios.get(url, {params: { page:this.state.pages, per_page:this.state.per_pages, - }).then((response) => { + }}).then((response) => { if(response){ if(response.status){ if(response.status===200){ @@ -86,9 +85,10 @@ class EcStudentList extends Component { let major_id=this.props.match.params.majorId; let year_id=this.props.match.params.yearId; const url ='/ec_years/'+year_id+'/students.json'; - axios.get(url, { - page:this.state.pages, - per_page:this.state.per_pages, + axios.get(url, {params: { + page: this.state.pages, + per_page: this.state.per_pages, + } } ).then((response) => { if(response){ @@ -186,10 +186,10 @@ class EcStudentList extends Component { let major_id=this.props.match.params.majorId; let year_id=this.props.match.params.yearId; const url ='/ec_years/'+year_id+'/students.json'; - axios.get(url, { - page:this.state.pages, + axios.get(url, {params: { + page:page, per_page:this.state.per_pages, - }).then((response) => { + }}).then((response) => { if(response){ if(response.status){ if(response.status===200){ @@ -398,7 +398,8 @@ class EcStudentList extends Component { } -
+
+

姓名 学号

- + } +
- { - majorschoollist&&majorschoollist.students&&majorschoollist.students.length===0?"": - - } + { + majorschoollist&&majorschoollist.students&&majorschoollist.students.length===0?"": + + }
-
+