PCqiandao
杨树林 5 years ago
parent 8f2dec86d0
commit cd4abc4481

@ -0,0 +1,120 @@
import React,{ Component } from "react";
import '../css/signincdi.css';
import { Progress } from 'antd';
import axios from 'axios';
//条目
class Detailss extends Component{
//条目组件
constructor(props){
super(props);
this.state={
}
}
componentDidMount() {
}
componentDidUpdate = (prevProps) => {
}
render(){
const isAdmin =this.props.isAdmin();
return(
<React.Fragment>
<div className="ws100s edu-back-white " >
<div className="ws100s teacherentrydiv ">
<p className="ws100s teachedivp ymaxnamewidthdivp">
2020-03-10第五次签到
</p>
<div className="ws100s sortinxdirection mt17">
<div className="teachedivps">
签到人数
</div>
<div className="progressivps">
<Progress percent={30} />
</div>
<div className="progressivpss">
已签到22 / 应签到55
</div>
</div>
<div className="ws100s sortinxdirection mt5">
<div className="ws80s sortinxdirection">
<div className="teachedivps h40s">
签到发起人
</div>
<div className="teachedivpsy ymaxnamewidth60 h40s">
胡一菲
</div>
<div className="teachedivps ml20 h40s">
签到方式
</div>
<div className="teachedivpsy ymaxnamewidth80 h40s">
二维码签到
</div>
<div className="teachedivps ml20 h40s">
开始结束时间
</div>
<div className="teachedivpsy h40s">
2010-03-10 10:00-11:00
</div>
</div>
<div className="ws20s sortinxdirection">
{
isAdmin===true?
<div className="ws100s xaxisreverseorder">
<div className="jiezhis h40s">截止</div>
<div className="shanchu h40s">删除</div>
</div>
:
(
this.props.defaultActiveKey==="1"?
<div className="ws100s xaxisreverseorder">
<div className="qiandaobutton xiaoshou">
签到
</div>
</div>
:
<div className="ws100s xaxisreverseorder">
{/*<div className="zcqiandao xiaoshou">*/}
{/* 正常签到*/}
{/*</div>*/}
{/*<div className="qjqiandao xiaoshou">*/}
{/* 请假*/}
{/*</div>*/}
<div className="kkqiandao xiaoshou">
旷课
</div>
</div>
)
}
</div>
</div>
</div>
</div>
</React.Fragment>
)
}
}
export default Detailss;

@ -101,7 +101,7 @@ class Teacherentry extends Component {
:
item.edit_auth === true ?
<div className="ws100s xaxisreverseorder">
<div className="jiezhis h40s xiaoshou">编辑</div>
<div className="jiezhis h40s xiaoshou" onClick={()=>this.props.qiandaoxiangq(true)}>编辑</div>
<div className="shanchu h40s xiaoshou" onClick={()=>this.props.thisdelete(item.id)}>删除</div>
</div>
:

@ -140,6 +140,7 @@ class Teaccomponent extends Component{
mydatas.map((object, index) => {
return (
<Teacherentry
qiandaoxiangq={(b)=>this.props.qiandaoxiangq(b)}
thisdelete={(id)=>this.thisdelete(id)}
thisEnd={(id)=>this.thisEnd(id)}
item={object} key={index}

@ -147,11 +147,17 @@
}
.posiivsicon{
padding: 22px 0px !important;
font-size: 16px;
padding: 22px 0px !important;
font-size: 16px;
font-family: Microsoft YaHei;
font-weight: bold;
color: #1890ff;
}
.posiivsiconmyss{
font-size: 14px;
font-family: Microsoft YaHei;
font-weight: bold;
color: #1890ff;
color: #999999;
}
.xiaoshou{
cursor:pointer !important;
@ -324,3 +330,10 @@
.color-reds{
color:rgba(245,108,108,1) !important;
}
.fh{
font-size:16px;
font-family:Microsoft YaHei;
font-weight:400;
color:rgba(153,153,153,1);
}

@ -2,7 +2,7 @@ import React,{ Component } from "react";
import '../css/signincdi.css';
import { Tabs } from 'antd';
import Teachers_signin from '../teacher/Teachers_signin';
import Students_signin from '../student/Students_signin';
import Students_signin from '../student/Signindetails';
import axios from 'axios';
const { TabPane } = Tabs;

@ -0,0 +1,52 @@
import React,{ Component } from "react";
import '../css/signincdi.css';
import Detailss from '../component/Detailss';
//在线学习
class Signindetails extends Component{
constructor(props){
super(props);
this.state={
}
}
componentDidMount() {
}
componentDidUpdate = (prevProps) => {
console.log("componentDidUpdate");
}
callback=(key)=> {
console.log(key);
}
render(){
return(
<React.Fragment>
<div className="ws100s" style={{
position: "relative",
}}>
<div className="ws100s xaxisreverseorder" style={{
position: "absolute",
top: "-29px",
}}>
<p className="sortinxdirection xiaoshou" onClick={()=>this.props.qiandaoxiangq(false)}>
<i className="iconfont icon-zuojiantou posiivsiconmyss mr5"></i>
<p className="fh mr20"> 返回</p>
</p>
</div>
<Detailss {...this.props} {...this.state}></Detailss>
</div>
</React.Fragment>
)
}
}
export default Signindetails;

@ -1,53 +0,0 @@
import React,{ Component } from "react";
import '../css/signincdi.css';
import { Tabs } from 'antd';
const { TabPane } = Tabs;
//在线学习
class Teachers_signin extends Component{
constructor(props){
super(props);
this.state={
}
}
componentDidMount() {
}
componentDidUpdate = (prevProps) => {
console.log("componentDidUpdate");
}
callback=(key)=> {
console.log(key);
}
render(){
return(
<React.Fragment>
<div className="">
<div className="clearfix yslmaxheigthk" >
<div className="ws100s">
<Tabs defaultActiveKey="1" onChange={this.callback}>
<TabPane tab="正在签到" key="1">
Content of Tab Pane 1
</TabPane>
<TabPane tab="历史签到" key="2">
Content of Tab Pane 2
</TabPane>
</Tabs>
</div>
</div>
</div>
</React.Fragment>
)
}
}
export default Teachers_signin;

@ -1,11 +1,13 @@
import React,{ Component } from "react";
import '../css/signincdi.css';
import { Tabs,Pagination} from 'antd';
import {queryString} from 'educoder';
import Teaccomponent from '../component/teachercomponent/Teaccomponent';
import Createsignmodel from '../model/Createsignmodel';
import Studentssignmodels from "../model/Studentssignmodel";
import Qrcodesignin from "../model/Qrcodesignin";
import Signinstatistics from "../Signinstatistics/Signinstatistics";
import Signindetails from '../student/Signindetails';
import axios from 'axios';
const { TabPane } = Tabs;
@ -29,6 +31,8 @@ class Students_signin extends Component{
Studentssigntypedata:null,
Qrcodesignintype:false,
Qrcodesignintypedata:null,
switchs:false,
}
}
@ -39,6 +43,11 @@ class Students_signin extends Component{
limit:5
}
this.gogetdatas(data);
// const query = this.props.location.search;
// const parsed = queryString.parse(query);
// console.log("parsed");
// console.log(parsed);
}
componentDidUpdate = (prevProps) => {
@ -167,13 +176,24 @@ class Students_signin extends Component{
}
qiandaoxiangq=(bool)=>{
this.setState({
switchs:bool
})
// if(bool){
// var currenturl = window.location.href;
// var newUrl = (currenturl.split("?"))[0];
// window.history.pushState('','',newUrl+'?type='+2);
// }
}
render(){
let {page,per_page,count,defaultActiveKey,limit,attendances_count,datas,absence_count,leave_count,normal_count,
Studentssigntype,Studentssigntypedata,Qrcodesignintype,Qrcodesignintypedata,
Studentssigntype,Studentssigntypedata,Qrcodesignintype,Qrcodesignintypedata,switchs
} =this.state;
const isAdmin =this.props.isAdmin();
@ -205,92 +225,105 @@ class Students_signin extends Component{
getsetdatas={()=>this.getsetdatas()}
GotomQrcodesodesy={(d,b)=>this.GotomQrcodesodesy(d,b)}
/>
{
switchs===false?
<div className="clearfix yslmaxheigthk" >
<div className="ws100s" style={{
position: "relative"
}}>
<Tabs defaultActiveKey="1" onChange={this.callback}>
<TabPane tab="正在签到" key="1">
<p className="mt20 mysligtes">{attendances_count}个签到正在进行</p>
<Teaccomponent
qiandaoxiangq={(b)=>this.qiandaoxiangq(b)}
Gotomodes={(d,b)=>this.Gotomodes(d,b)}
GotomQrcodesodesy={(d,b)=>this.GotomQrcodesodesy(d,b)}
getsetdatas={()=>this.getsetdatas()}
datas={datas}
defaultActiveKey={defaultActiveKey}
{...this.state}
{...this.props}
<div className="clearfix yslmaxheigthk" >
<div className="ws100s" style={{
position: "relative"
}}>
<Tabs defaultActiveKey="1" onChange={this.callback}>
<TabPane tab="正在签到" key="1">
<p className="mt20 mysligtes">{attendances_count}个签到正在进行</p>
<Teaccomponent
Gotomodes={(d,b)=>this.Gotomodes(d,b)}
GotomQrcodesodesy={(d,b)=>this.GotomQrcodesodesy(d,b)}
getsetdatas={()=>this.getsetdatas()}
datas={datas}
defaultActiveKey={defaultActiveKey}
{...this.state}
{...this.props}
></Teaccomponent>
<div className="mb30 clearfix educontent mt40 intermediatecenter">
<Pagination showQuickJumper current={page} onChange={this.paginationonChange}
pageSize={limit}
total={attendances_count}></Pagination>
</div>
</TabPane>
<TabPane tab="历史签到" key="2">
<div className="ws100s mt20 sortinxdirection">
<p className=" ws50s mysligtes sortinxdirection">已完成{attendances_count}次签到</p>
{
isAdmin===false?
<div className="ws50s xaxisreverseorder">
<p className="kkp pr32 " style={{color:"#FF835C"}}>旷课{absence_count}</p>
<p className="kkp mr20r" style={{color:"#EAAE4E"}}>请假{leave_count}</p>
<p className="kkp mr20r" style={{color:"#26C7C9"}}>正常签到{normal_count}</p>
></Teaccomponent>
</div>
:
""
}
</div>
<Teaccomponent
Gotomodes={(d,b)=>this.Gotomodes(d,b)}
GotomQrcodesodesy={(d,b)=>this.GotomQrcodesodesy(d,b)}
getsetdatas={()=>this.getsetdatas()}
datas={datas}
defaultActiveKey={defaultActiveKey}
{...this.state}
{...this.props}
></Teaccomponent>
<div className="mb30 clearfix educontent mt40 intermediatecenter">
<Pagination showQuickJumper current={page} onChange={this.paginationonChange}
pageSize={limit}
total={attendances_count}></Pagination>
</div>
</TabPane>
{
isAdmin===true?
<TabPane tab="签到统计" key="3">
<Signinstatistics
{...this.props}
<div className="mb30 clearfix educontent mt40 intermediatecenter">
<Pagination showQuickJumper current={page} onChange={this.paginationonChange}
pageSize={limit}
total={attendances_count}></Pagination>
</div>
</TabPane>
<TabPane tab="历史签到" key="2">
<div className="ws100s mt20 sortinxdirection">
<p className=" ws50s mysligtes sortinxdirection">已完成{attendances_count}次签到</p>
{
isAdmin===false?
<div className="ws50s xaxisreverseorder">
<p className="kkp pr32 " style={{color:"#FF835C"}}>旷课{absence_count}</p>
<p className="kkp mr20r" style={{color:"#EAAE4E"}}>请假{leave_count}</p>
<p className="kkp mr20r" style={{color:"#26C7C9"}}>正常签到{normal_count}</p>
</div>
:
""
}
</div>
<Teaccomponent
qiandaoxiangq={(b)=>this.qiandaoxiangq(b)}
Gotomodes={(d,b)=>this.Gotomodes(d,b)}
GotomQrcodesodesy={(d,b)=>this.GotomQrcodesodesy(d,b)}
getsetdatas={()=>this.getsetdatas()}
datas={datas}
defaultActiveKey={defaultActiveKey}
{...this.state}
/>
{...this.props}
></Teaccomponent>
<div className="mb30 clearfix educontent mt40 intermediatecenter">
<Pagination showQuickJumper current={page} onChange={this.paginationonChange}
pageSize={limit}
total={attendances_count}></Pagination>
</div>
</TabPane>
:
""
}
</Tabs>
{
isAdmin?
<div className="positiondivs sortinxdirection xiaoshou">
<i className="iconfont icon-bianji5 posiivsicon"></i>
<p className="posiivs xiaoshou" onClick={()=>this.Createsign()}>创建签到</p>
</div>
:""
}
</div>
</div>
{
isAdmin===true?
<TabPane tab="签到统计" key="3">
<Signinstatistics
{...this.props}
{...this.state}
/>
</TabPane>
:
""
}
</Tabs>
{
isAdmin?
<div className="positiondivs sortinxdirection xiaoshou">
<i className="iconfont icon-bianji5 posiivsicon"></i>
<p className="posiivs xiaoshou" onClick={()=>this.Createsign()}>创建签到</p>
</div>
:""
}
</div>
</div>
:
// 签到详情
<Signindetails
{...this.props}
{...this.state}
qiandaoxiangq={(b)=>this.qiandaoxiangq(b)}
></Signindetails>
}
</div>
</React.Fragment>
)

Loading…
Cancel
Save