diff --git a/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js b/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js index 0f84980bc..d8ff88694 100644 --- a/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js +++ b/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js @@ -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,7 +65,15 @@ class Signinstatistics extends Component { } } - }) + this.setState({ + spal:false + }) + }).catch((error) => { + this.setState({ + spal:false + }) + + }) } componentDidMount() { @@ -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,11 +108,22 @@ class Signinstatistics extends Component { return( +
+ { + spal===true? +
+ +
- - - - -
{datas&&datas.all_history_count}
-
- - - -
{datas?(datas&&datas.avg_normal_rate*100).toFixed(0)+"%":""}
-
- - - -
{datas?(datas&&datas.avg_absence_rate*100).toFixed(0)+"%":""}
-
- - - -
{datas?(datas&&datas.avg_leave_rate*100).toFixed(0)+"%":""}
-
- -
- -
-
- - - - - - - 到课率 - - - - - - 旷课率 - - - - - - 请假率 - - - - - - 显示最近十次签到 - - - - - -
- -
- - {/**/} - - `${val}%` - }} - /> - - - - -
- -
+ } + + + +
{datas&&datas.all_history_count}
+
+ + + +
{datas?(datas&&datas.avg_normal_rate*100).toFixed(0)+"%":""}
+
+ + + +
{datas?(datas&&datas.avg_absence_rate*100).toFixed(0)+"%":""}
+
+ + + +
{datas?(datas&&datas.avg_leave_rate*100).toFixed(0)+"%":""}
+
+ + + +
+
+ + + + + + + 到课率 + + + + + + 旷课率 + + + + + + 请假率 + + + + + + 显示最近十次签到 + + + + + +
+ +
+ + {/**/} + + `${val}%` + }} + /> + + + + +
+ +
+
+ } + +
) @@ -227,4 +255,4 @@ class Signinstatistics extends Component { -export default Signinstatistics; \ No newline at end of file +export default Signinstatistics;