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

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

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

@ -3,6 +3,8 @@ import '../../css/signincdi.css';
import axios from 'axios'; import axios from 'axios';
import Teacherentry from "../Teacherentry"; import Teacherentry from "../Teacherentry";
import NoneDatas from '../NoneDatas'; import NoneDatas from '../NoneDatas';
import LoadingSpin from '../../../../../common/LoadingSpin';
import Listjihe from "../../../../question/component/Listjihe"; import Listjihe from "../../../../question/component/Listjihe";
//在线学习 //在线学习
@ -132,28 +134,36 @@ class Teaccomponent extends Component{
render(){ render(){
let mydatas=this.props.datas?this.props.datas:[]; let mydatas=this.props.datas?this.props.datas:[];
let Spin= this.props.Spin;
return( return(
<React.Fragment> <React.Fragment>
<div className="ws100s mt20 h500"> <div className="ws100s mt20 h500">
{ {
mydatas.length>0? Spin&&Spin===true?
mydatas.map((object, index) => { <LoadingSpin></LoadingSpin>
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>
(
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> </div>
</React.Fragment> </React.Fragment>

@ -12,6 +12,7 @@ import axios from 'axios';
const { TabPane } = Tabs; const { TabPane } = Tabs;
//在线学习 //在线学习
class Students_signin extends Component{ class Students_signin extends Component{
constructor(props){ constructor(props){
super(props); super(props);
@ -33,6 +34,7 @@ class Students_signin extends Component{
Qrcodesignintypedata:null, Qrcodesignintypedata:null,
switchs:false, switchs:false,
switattendance_id:null, switattendance_id:null,
Spin:false,
} }
} }
@ -74,6 +76,9 @@ class Students_signin extends Component{
} }
gogetdatas =(mydata)=>{ gogetdatas =(mydata)=>{
this.setState({
Spin:true
})
const coureid=this.props.match.params.coursesId; const coureid=this.props.match.params.coursesId;
let urls = `/courses/${coureid}/attendances.json`; let urls = `/courses/${coureid}/attendances.json`;
let arry={} 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(){ render(){
let {page,per_page,count,defaultActiveKey,limit,attendances_count,datas,absence_count,leave_count,normal_count, 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; } =this.state;
const isAdmin =this.props.isAdmin(); const isAdmin =this.props.isAdmin();
@ -249,6 +261,7 @@ class Students_signin extends Component{
<TabPane tab="正在签到" key="1"> <TabPane tab="正在签到" key="1">
<p className="mt20 mysligtes">{attendances_count}个签到正在进行</p> <p className="mt20 mysligtes">{attendances_count}个签到正在进行</p>
<Teaccomponent <Teaccomponent
Spin={Spin}
qiandaoxiangq={(b,id)=>this.qiandaoxiangq(b,id)} qiandaoxiangq={(b,id)=>this.qiandaoxiangq(b,id)}
Gotomodes={(d,b)=>this.Gotomodes(d,b)} Gotomodes={(d,b)=>this.Gotomodes(d,b)}
GotomQrcodesodesy={(d,b)=>this.GotomQrcodesodesy(d,b)} GotomQrcodesodesy={(d,b)=>this.GotomQrcodesodesy(d,b)}
@ -287,6 +300,7 @@ class Students_signin extends Component{
<Teaccomponent <Teaccomponent
Spin={Spin}
qiandaoxiangq={(b,id)=>this.qiandaoxiangq(b,id)} qiandaoxiangq={(b,id)=>this.qiandaoxiangq(b,id)}
Gotomodes={(d,b)=>this.Gotomodes(d,b)} Gotomodes={(d,b)=>this.Gotomodes(d,b)}
GotomQrcodesodesy={(d,b)=>this.GotomQrcodesodesy(d,b)} GotomQrcodesodesy={(d,b)=>this.GotomQrcodesodesy(d,b)}

Loading…
Cancel
Save