Merge branches 'PCqiandao' and 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

PCqiandao
杨树明 5 years ago
commit a5071cd445

@ -9,6 +9,7 @@ import {
Axis,
Tooltip,
} from "bizcharts";
import LoadingSpin from "../../../../common/LoadingSpin";
const { Option } = Select;
class Signinstatistics extends Component {
@ -17,10 +18,14 @@ class Signinstatistics extends Component {
this.state={
datas:null,
newlist:[],
course_groups:[{id:"全部",name:"全部"}]
course_groups:[{id:"全部",name:"全部"}],
spal:false,
}
}
getdata=(group_id)=>{
this.setState({
spal:true
})
const coursesId=this.props.match.params.coursesId;
let url=`/weapps/courses/${coursesId}/attendances.json`
axios.get(url,{params:{
@ -60,6 +65,14 @@ class Signinstatistics extends Component {
}
}
this.setState({
spal:false
})
}).catch((error) => {
this.setState({
spal:false
})
})
}
@ -84,7 +97,7 @@ class Signinstatistics extends Component {
}
render() {
let {datas,newlist,course_groups}=this.state;
let {datas,newlist,course_groups,spal}=this.state;
const cols = {
month: {
@ -95,6 +108,17 @@ class Signinstatistics extends Component {
return(
<React.Fragment >
<div>
{
spal===true?
<div style={{
minHeight:"500px",
}}>
<LoadingSpin></LoadingSpin>
</div>
:
<div>
<Row type="flex" justify="space-between" className={"mt20"}>
<style>
@ -215,6 +239,10 @@ class Signinstatistics extends Component {
</div>
</div>
</div>
}
</div>
</React.Fragment>
)

@ -3,6 +3,7 @@ import React,{ Component } from "react";
import { Row, Col,Select,Table,Pagination } from 'antd';
import axios from 'axios';
import LoadingSpin from "../../../../common/LoadingSpin";
import NoneDatas from "../component/NoneDatas";
const { Option } = Select;
class Signedinlist extends Component {
@ -85,10 +86,13 @@ class Signedinlist extends Component {
this.setState({
member_attendances:response.data.member_attendances,
members_count:response.data.members_count,
loading:false
})
}
this.setState({
loading:false
})
}).catch((error) => {
that.setState({
loading:false
@ -304,13 +308,22 @@ class Signedinlist extends Component {
</Row>
<div className={"backfff mt10"}>
{
member_attendances&&member_attendances.length===0?
this.state.loading===true?
<div style={{
minHeight:"400px",
}}>
<LoadingSpin></LoadingSpin>
</div>
:
member_attendances&&member_attendances.length===0?
<div style={{
minHeight:"400px",
}}>
{/*<LoadingSpin></LoadingSpin>*/}
<NoneDatas></NoneDatas>
</div>
:
// loading={this.state.loading}
<Table columns={columns} dataSource={member_attendances} pagination={false} />
@ -319,9 +332,14 @@ class Signedinlist extends Component {
</div>
<div className="mb30 clearfix educontent mt40 intermediatecenter">
{
member_attendances&&member_attendances.length>0?
<Pagination showQuickJumper current={this.state.page} onChange={this.paginationonChange}
pageSize={this.state.limit}
total={this.state.members_count}></Pagination>
:""
}
</div>
</React.Fragment>

Loading…
Cancel
Save