From 047db9cf9816ccba3ad403e1915655411a363353 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 13 Mar 2020 21:12:36 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AD=BE=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/AppConfig.js | 2 +- public/react/src/common/LoadingSpin.js | 4 +- .../teachercomponent/Teaccomponent.js | 44 ++++++++++++------- .../courses/signin/teacher/Teachers_signin.js | 16 ++++++- 4 files changed, 45 insertions(+), 21 deletions(-) diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js index f5510a039..7a35aa116 100644 --- a/public/react/src/AppConfig.js +++ b/public/react/src/AppConfig.js @@ -46,7 +46,7 @@ if (isDev) { // 老师 // debugType="teacher"; // 学生 -// debugType="student"; +debugType="student"; diff --git a/public/react/src/common/LoadingSpin.js b/public/react/src/common/LoadingSpin.js index 80a798906..879edb1d8 100644 --- a/public/react/src/common/LoadingSpin.js +++ b/public/react/src/common/LoadingSpin.js @@ -21,9 +21,9 @@ class LoadingSpin extends Component{ } `} - + ) } } -export default LoadingSpin; \ No newline at end of file +export default LoadingSpin; diff --git a/public/react/src/modules/courses/signin/component/teachercomponent/Teaccomponent.js b/public/react/src/modules/courses/signin/component/teachercomponent/Teaccomponent.js index 9159fa13a..c912228b6 100644 --- a/public/react/src/modules/courses/signin/component/teachercomponent/Teaccomponent.js +++ b/public/react/src/modules/courses/signin/component/teachercomponent/Teaccomponent.js @@ -3,6 +3,8 @@ import '../../css/signincdi.css'; import axios from 'axios'; import Teacherentry from "../Teacherentry"; import NoneDatas from '../NoneDatas'; +import LoadingSpin from '../../../../../common/LoadingSpin'; + import Listjihe from "../../../../question/component/Listjihe"; //在线学习 @@ -132,28 +134,36 @@ class Teaccomponent extends Component{ render(){ let mydatas=this.props.datas?this.props.datas:[]; + let Spin= this.props.Spin; return(
{ - mydatas.length>0? - mydatas.map((object, index) => { - return ( - this.props.qiandaoxiangq(b,id)} - thisdelete={(id)=>this.thisdelete(id)} - thisEnd={(id)=>this.thisEnd(id)} - item={object} key={index} - index={index} - defaultActiveKey={this.props.defaultActiveKey} - {...this.props} - {...this.state} - > - - ) - }) + Spin&&Spin===true? + : - + + ( + mydatas&&mydatas.length>0? + mydatas.map((object, index) => { + return ( + this.props.qiandaoxiangq(b,id)} + thisdelete={(id)=>this.thisdelete(id)} + thisEnd={(id)=>this.thisEnd(id)} + item={object} key={index} + index={index} + defaultActiveKey={this.props.defaultActiveKey} + {...this.props} + {...this.state} + > + + ) + }) + : + + ) + }
diff --git a/public/react/src/modules/courses/signin/teacher/Teachers_signin.js b/public/react/src/modules/courses/signin/teacher/Teachers_signin.js index 2bdcd7ef1..3a97b6b34 100644 --- a/public/react/src/modules/courses/signin/teacher/Teachers_signin.js +++ b/public/react/src/modules/courses/signin/teacher/Teachers_signin.js @@ -12,6 +12,7 @@ import axios from 'axios'; const { TabPane } = Tabs; //在线学习 + class Students_signin extends Component{ constructor(props){ super(props); @@ -33,6 +34,7 @@ class Students_signin extends Component{ Qrcodesignintypedata:null, switchs:false, switattendance_id:null, + Spin:false, } } @@ -74,6 +76,9 @@ class Students_signin extends Component{ } gogetdatas =(mydata)=>{ + this.setState({ + Spin:true + }) const coureid=this.props.match.params.coursesId; let urls = `/courses/${coureid}/attendances.json`; let arry={} @@ -104,6 +109,13 @@ class Students_signin extends Component{ }) } } + this.setState({ + Spin:false + }) + }).catch((error) => { + this.setState({ + Spin:false + }) }) } @@ -206,7 +218,7 @@ class Students_signin extends Component{ render(){ let {page,per_page,count,defaultActiveKey,limit,attendances_count,datas,absence_count,leave_count,normal_count, - Studentssigntype,Studentssigntypedata,Qrcodesignintype,Qrcodesignintypedata,switchs,switattendance_id + Studentssigntype,Studentssigntypedata,Qrcodesignintype,Qrcodesignintypedata,switchs,switattendance_id,Spin } =this.state; const isAdmin =this.props.isAdmin(); @@ -249,6 +261,7 @@ class Students_signin extends Component{

共{attendances_count}个签到正在进行

this.qiandaoxiangq(b,id)} Gotomodes={(d,b)=>this.Gotomodes(d,b)} GotomQrcodesodesy={(d,b)=>this.GotomQrcodesodesy(d,b)} @@ -287,6 +300,7 @@ class Students_signin extends Component{ this.qiandaoxiangq(b,id)} Gotomodes={(d,b)=>this.Gotomodes(d,b)} GotomQrcodesodesy={(d,b)=>this.GotomQrcodesodesy(d,b)}