dev_ec
杨树林 5 years ago
parent 984e4f0900
commit e14046b705

@ -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 {
</div>}
</div>
<Spin spinning={this.state.isSpin}>
<div className="ListTableLine minH-560 edu-back-white mb80" id="listContent">
<div>
<div className="ListTableLine minH-500 edu-back-white" id="listContent">
<p className="clearfix">
<span className="column-No column-2 relative">
<Checkbox
@ -410,7 +411,6 @@ class EcStudentList extends Component {
<span className="column-2">姓名</span>
<span className="column-2">学号</span>
</p>
<style>{
`
.myslispan{
@ -451,9 +451,11 @@ class EcStudentList extends Component {
}
</ul>
<style>
{
`
</div>
</div>
<style>
{
`
.idpagin{
width: 100% !important;
display: flex;
@ -461,19 +463,19 @@ class EcStudentList extends Component {
}
`
}
</style>
}
</style>
<div style={{width:'100%',position: 'relative'}}>
{
majorschoollist&&majorschoollist.students&&majorschoollist.students.length===0?"":
<Pagination className={"pagelistStudentList mt30 idpagin"}
showQuickJumper current={this.state.pages}
onChange={this.showecStudentList} pageSize={20}
total={majorschoollist&&majorschoollist.students&&majorschoollist.students.length}></Pagination>
}
{
majorschoollist&&majorschoollist.students&&majorschoollist.students.length===0?"":
<Pagination className={"pagelistStudentList mt30 idpagin"}
showQuickJumper current={this.state.pages}
onChange={this.showecStudentList} pageSize={20}
total={majorschoollist&&majorschoollist.count}></Pagination>
}
</div>
</div>
</Spin>
</div>
</div>

Loading…
Cancel
Save