|
|
|
@ -21,7 +21,10 @@ class Students_signin extends Component{
|
|
|
|
|
count:50,
|
|
|
|
|
defaultActiveKey:"1",
|
|
|
|
|
attendances_count:0,
|
|
|
|
|
datas:[]
|
|
|
|
|
datas:[],
|
|
|
|
|
normal_count:0,
|
|
|
|
|
leave_count:0,
|
|
|
|
|
absence_count:0,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -80,7 +83,10 @@ class Students_signin extends Component{
|
|
|
|
|
if(response.data){
|
|
|
|
|
this.setState({
|
|
|
|
|
attendances_count:response.data.attendances_count,
|
|
|
|
|
datas:response.data.attendances
|
|
|
|
|
datas:response.data.attendances,
|
|
|
|
|
normal_count:response.data.normal_count,
|
|
|
|
|
leave_count:response.data.leave_count,
|
|
|
|
|
absence_count:response.data.absence_count,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -121,10 +127,19 @@ class Students_signin extends Component{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getsetdatas=()=>{
|
|
|
|
|
let data={
|
|
|
|
|
key:this.state.defaultActiveKey,
|
|
|
|
|
page:this.state.page,
|
|
|
|
|
limit:5
|
|
|
|
|
}
|
|
|
|
|
this.gogetdatas(data);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render(){
|
|
|
|
|
|
|
|
|
|
let {page,per_page,count,defaultActiveKey,limit,attendances_count,datas} =this.state;
|
|
|
|
|
let {page,per_page,count,defaultActiveKey,limit,attendances_count,datas,absence_count,leave_count,normal_count} =this.state;
|
|
|
|
|
const isAdmin =this.props.isAdmin();
|
|
|
|
|
|
|
|
|
|
return(
|
|
|
|
@ -154,7 +169,9 @@ class Students_signin extends Component{
|
|
|
|
|
<Tabs defaultActiveKey="1" onChange={this.callback}>
|
|
|
|
|
<TabPane tab="正在签到" key="1">
|
|
|
|
|
<p className="mt20 mysligtes">共{attendances_count}个签到正在进行</p>
|
|
|
|
|
<Teaccomponent datas={datas} defaultActiveKey={defaultActiveKey} {...this.state} {...this.props}></Teaccomponent>
|
|
|
|
|
<Teaccomponent getsetdatas={()=>this.getsetdatas()} datas={datas} defaultActiveKey={defaultActiveKey} {...this.state} {...this.props}
|
|
|
|
|
|
|
|
|
|
></Teaccomponent>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -170,9 +187,9 @@ class Students_signin extends Component{
|
|
|
|
|
{
|
|
|
|
|
isAdmin===false?
|
|
|
|
|
<div className="ws50s xaxisreverseorder">
|
|
|
|
|
<p className="kkp pr32 " style={{color:"#FF835C"}}>旷课:2</p>
|
|
|
|
|
<p className="kkp mr20r" style={{color:"#EAAE4E"}}>请假:2</p>
|
|
|
|
|
<p className="kkp mr20r" style={{color:"#26C7C9"}}>正常签到:10</p>
|
|
|
|
|
<p className="kkp pr32 " style={{color:"#FF835C"}}>旷课:{absence_count}</p>
|
|
|
|
|
<p className="kkp mr20r" style={{color:"#EAAE4E"}}>请假:{leave_count}</p>
|
|
|
|
|
<p className="kkp mr20r" style={{color:"#26C7C9"}}>正常签到:{normal_count}</p>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
:
|
|
|
|
@ -182,7 +199,7 @@ class Students_signin extends Component{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Teaccomponent datas={datas} defaultActiveKey={defaultActiveKey} {...this.state} {...this.props}></Teaccomponent>
|
|
|
|
|
<Teaccomponent getsetdatas={()=>this.getsetdatas()} datas={datas} defaultActiveKey={defaultActiveKey} {...this.state} {...this.props}></Teaccomponent>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div className="mb30 clearfix educontent mt40 intermediatecenter">
|
|
|
|
|