PCqiandao
杨树明 5 years ago
parent 8435bd7d1d
commit cfa86f295b

@ -35,28 +35,28 @@ class Signedinlist extends Component {
componentDidMount() {
let {attendanceslist}=this.state;
let listattendanceslist=attendanceslist
let url=`/weapps/attendances/${this.props&&this.props.switattendance_id}.json`;
axios.get(url).then((response) => {
if(response.data){
if(this.props.headdata){
let listattendanceslist=attendanceslist;
if(headdata.course_groups){
if(response.data.course_groups.length>0){
response.data.course_groups.map((item,key)=>{
listattendanceslist.push(item)
})
}
if(headdata.course_groups.length>0){
headdata.course_groups.map((item,key)=>{
listattendanceslist.push(item)
})
}
}
this.setState({
listattendanceslist:listattendanceslist,
data:response.data,
course_members_count:headdata.all_count,
attendance_count:headdata.normal_count
})
}
this.setState({
listattendanceslist:attendanceslist,
data:response.data,
course_members_count:response.data.all_count,
attendance_count: response.data.normal_count
})
}
})
this.getdatas(this.props&&this.props.switattendance_id,1,[],undefined)
// this.getpath()
}
getdatas=(id,page,group_ids,attendance_status)=>{
@ -90,7 +90,7 @@ class Signedinlist extends Component {
});
}
handleChangegroup_ids=(e)=>{
handleChangegroup_ids=(value)=>{
let neval
if(!value){
neval=[]
@ -107,7 +107,7 @@ class Signedinlist extends Component {
let {page,attendance_status}=this.state;
this.getdatas(this.props&&this.props.switattendance_id,page,neval,attendance_status)
if(this.props.defaultActiveKey==="1"){
this.getpath(e)
this.getpath(value)
}
}
@ -123,7 +123,7 @@ class Signedinlist extends Component {
listattendanceslist.push(item)
})
}
if(e){
if(id){
response.data.course_groups.map((item,key)=>{
if(item.id===id){
this.setState({
@ -240,7 +240,7 @@ class Signedinlist extends Component {
];
return(
<div>
<React.Fragment>
<Row className={"mt20"}>
<Col span={12}>
<Row gutter={[{ xs: 8, sm: 16, md: 24, lg: 32 }, 20]}>
@ -301,7 +301,7 @@ class Signedinlist extends Component {
pageSize={this.state.limit}
total={this.state.members_count}></Pagination>
</div>
</div>
</React.Fragment>
)
}

Loading…
Cancel
Save