PCqiandao
杨树林 5 years ago
parent 170e9b6168
commit 047db9cf98

@ -46,7 +46,7 @@ if (isDev) {
// 老师
// debugType="teacher";
// 学生
// debugType="student";
debugType="student";

@ -21,9 +21,9 @@ class LoadingSpin extends Component{
}
`}
</style>
<Spin tip="正在获取相关数据..."/>
<Spin/>
</div>
)
}
}
export default LoadingSpin;
export default LoadingSpin;

@ -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(
<React.Fragment>
<div className="ws100s mt20 h500">
{
mydatas.length>0?
mydatas.map((object, index) => {
return (
<Teacherentry
qiandaoxiangq={(b,id)=>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}
></Teacherentry>
)
})
Spin&&Spin===true?
<LoadingSpin></LoadingSpin>
:
<NoneDatas></NoneDatas>
(
mydatas&&mydatas.length>0?
mydatas.map((object, index) => {
return (
<Teacherentry
qiandaoxiangq={(b,id)=>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}
></Teacherentry>
)
})
:
<NoneDatas></NoneDatas>
)
}
</div>
</React.Fragment>

@ -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{
<TabPane tab="正在签到" key="1">
<p className="mt20 mysligtes">{attendances_count}个签到正在进行</p>
<Teaccomponent
Spin={Spin}
qiandaoxiangq={(b,id)=>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{
<Teaccomponent
Spin={Spin}
qiandaoxiangq={(b,id)=>this.qiandaoxiangq(b,id)}
Gotomodes={(d,b)=>this.Gotomodes(d,b)}
GotomQrcodesodesy={(d,b)=>this.GotomQrcodesodesy(d,b)}

Loading…
Cancel
Save