Merge remote-tracking branch 'origin/PCqiandao' into PCqiandao

PCqiandao
杨树明 5 years ago
commit e7ea7524fa

@ -1,8 +1,30 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import '../css/signincdi.css'; import '../css/signincdi.css';
import { Progress } from 'antd'; import { Progress,message } from 'antd';
import axios from 'axios'; import axios from 'axios';
function clearSlct() {
if("getSelection" in window){
window.getSelection().removeAllRanges();
}else{
document.selection.empty();
};
}
function jsCopy(s) {
clearSlct();
const copyEle = document.getElementById(s);
copyEle.select();
const copyStatus=document.execCommand("Copy");
// 对成功与否定进行提示
copyStatuss(copyStatus)
}
function copyStatuss(copyStatus){
if (copyStatus) {
message.success('复制成功');
} else {
message.error('复制失败');
}
}
//条目 //条目
class Detailss extends Component{ class Detailss extends Component{
//条目组件 //条目组件
@ -29,7 +51,9 @@ class Detailss extends Component{
const isAdmin =this.props.isAdmin(); const isAdmin =this.props.isAdmin();
return( return(
<React.Fragment> <React.Fragment>
<div className="ws100s edu-back-white " > <div className="ws100s edu-back-white sortinxdirection" style={{
position: "relative"
}}>
<div className="ws100s teacherentrydiv "> <div className="ws100s teacherentrydiv ">
<p className="ws100s teachedivp ymaxnamewidthdivp"> <p className="ws100s teachedivp ymaxnamewidthdivp">
2020-03-10第五次签到 2020-03-10第五次签到
@ -49,7 +73,7 @@ class Detailss extends Component{
<div className="ws100s sortinxdirection mt5"> <div className="ws100s sortinxdirection mt5">
<div className="ws80s sortinxdirection"> <div className="ws75s sortinxdirection">
<div className="teachedivps h40s"> <div className="teachedivps h40s">
@ -73,45 +97,34 @@ class Detailss extends Component{
2010-03-10 10:00-11:00 2010-03-10 10:00-11:00
</div> </div>
</div> </div>
<div className="ws25s xaxisreverseorder" style={{
position: "relative",
}}>
<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"> {/*<p className="h40s font-16 xiaoshou" style={{*/}
签到 {/* color:"#1890FF"*/}
</div> {/*}} onClick={() => {*/}
</div> {/* jsCopy("file_path"+1)*/}
: {/*}}>*/}
<div className="ws100s xaxisreverseorder"> {/* 复制签到码*/}
{/*<div className="zcqiandao xiaoshou">*/} {/*</p>*/}
{/* 正常签到*/} {/*<p className="h40s font-16" style={{*/}
{/*</div>*/} {/* color:"#333333",*/}
{/* marginRight:"10px",*/}
{/*<div className="qjqiandao xiaoshou">*/} {/*}}>*/}
{/* 请假*/} {/* 88866*/}
{/*</div>*/} {/*</p>*/}
{/*<p className="h40s font-16" style={{*/}
<div className="kkqiandao xiaoshou"> {/* color:"#909399"*/}
旷课 {/*}}>签到码:</p>*/}
</div>
</div>
)
}
</div>
</div> </div>
</div> </div>
</div> </div>
<input id={"file_path"+1} className="file_path_input" value={"复制签到码"}/>
</div>
</React.Fragment> </React.Fragment>
) )

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

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

@ -81,12 +81,20 @@
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.file_path_input{
position: absolute;
right: -50%;
}
.ws100s{ .ws100s{
width: 100%; width: 100%;
} }
.ws70s{ .ws70s{
width: 70%; width: 70%;
}
.ws75s{
width: 75%;
} }
.ws80s{ .ws80s{
width: 80%; width: 80%;
@ -100,6 +108,9 @@
.ws20s{ .ws20s{
width: 20%; width: 20%;
} }
.ws25s{
width: 25%;
}
.yslmaxheigthk{ .yslmaxheigthk{
} }

@ -43,7 +43,11 @@ class Signindetails extends Component{
</p> </p>
</div> </div>
<Detailss {...this.props} {...this.state}></Detailss> <Detailss switattendance_id={this.props.switattendance_id} {...this.props} {...this.state}></Detailss>
</div> </div>
</React.Fragment> </React.Fragment>
) )

@ -32,6 +32,7 @@ class Students_signin extends Component{
Qrcodesignintype:false, Qrcodesignintype:false,
Qrcodesignintypedata:null, Qrcodesignintypedata:null,
switchs:false, switchs:false,
switattendance_id:null,
} }
} }
@ -176,9 +177,10 @@ class Students_signin extends Component{
} }
qiandaoxiangq=(bool)=>{ qiandaoxiangq=(bool,id)=>{
this.setState({ this.setState({
switchs:bool switchs:bool,
switattendance_id:id,
}) })
// if(bool){ // if(bool){
// var currenturl = window.location.href; // var currenturl = window.location.href;
@ -188,12 +190,23 @@ class Students_signin extends Component{
} }
settabsdata=()=>{
let data={
defaultActiveKey:"1",
key:"1",
page:1,
limit:5
}
this.gogetdatas(data);
}
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 Studentssigntype,Studentssigntypedata,Qrcodesignintype,Qrcodesignintypedata,switchs,switattendance_id
} =this.state; } =this.state;
const isAdmin =this.props.isAdmin(); const isAdmin =this.props.isAdmin();
@ -235,7 +248,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
qiandaoxiangq={(b)=>this.qiandaoxiangq(b)} 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)}
getsetdatas={()=>this.getsetdatas()} getsetdatas={()=>this.getsetdatas()}
@ -273,7 +286,7 @@ class Students_signin extends Component{
<Teaccomponent <Teaccomponent
qiandaoxiangq={(b)=>this.qiandaoxiangq(b)} 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)}
getsetdatas={()=>this.getsetdatas()} getsetdatas={()=>this.getsetdatas()}
@ -317,6 +330,7 @@ class Students_signin extends Component{
: :
// 签到详情 // 签到详情
<Signindetails <Signindetails
switattendance_id={switattendance_id}
{...this.props} {...this.props}
{...this.state} {...this.state}
qiandaoxiangq={(b)=>this.qiandaoxiangq(b)} qiandaoxiangq={(b)=>this.qiandaoxiangq(b)}

Loading…
Cancel
Save