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

PCqiandao
杨树明 5 years ago
commit e7ea7524fa

@ -1,8 +1,30 @@
import React,{ Component } from "react";
import '../css/signincdi.css';
import { Progress } from 'antd';
import { Progress,message } from 'antd';
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{
//条目组件
@ -29,7 +51,9 @@ class Detailss extends Component{
const isAdmin =this.props.isAdmin();
return(
<React.Fragment>
<div className="ws100s edu-back-white " >
<div className="ws100s edu-back-white sortinxdirection" style={{
position: "relative"
}}>
<div className="ws100s teacherentrydiv ">
<p className="ws100s teachedivp ymaxnamewidthdivp">
2020-03-10第五次签到
@ -49,7 +73,7 @@ class Detailss extends Component{
<div className="ws100s sortinxdirection mt5">
<div className="ws80s sortinxdirection">
<div className="ws75s sortinxdirection">
<div className="teachedivps h40s">
@ -73,44 +97,33 @@ class Detailss extends Component{
2010-03-10 10:00-11:00
</div>
</div>
<div className="ws25s xaxisreverseorder" style={{
position: "relative",
}}>
{/*<p className="h40s font-16 xiaoshou" style={{*/}
{/* color:"#1890FF"*/}
{/*}} onClick={() => {*/}
{/* jsCopy("file_path"+1)*/}
{/*}}>*/}
{/* 复制签到码*/}
{/*</p>*/}
{/*<p className="h40s font-16" style={{*/}
{/* color:"#333333",*/}
{/* marginRight:"10px",*/}
{/*}}>*/}
{/* 88866*/}
{/*</p>*/}
{/*<p className="h40s font-16" style={{*/}
{/* color:"#909399"*/}
{/*}}>签到码:</p>*/}
<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>
<input id={"file_path"+1} className="file_path_input" value={"复制签到码"}/>
</div>
</React.Fragment>

@ -101,7 +101,7 @@ class Teacherentry extends Component {
:
item.edit_auth === true ?
<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>
:

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

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

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

@ -32,6 +32,7 @@ class Students_signin extends Component{
Qrcodesignintype:false,
Qrcodesignintypedata:null,
switchs:false,
switattendance_id:null,
}
}
@ -176,9 +177,10 @@ class Students_signin extends Component{
}
qiandaoxiangq=(bool)=>{
qiandaoxiangq=(bool,id)=>{
this.setState({
switchs:bool
switchs:bool,
switattendance_id:id,
})
// if(bool){
// 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(){
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;
const isAdmin =this.props.isAdmin();
@ -235,7 +248,7 @@ class Students_signin extends Component{
<TabPane tab="正在签到" key="1">
<p className="mt20 mysligtes">{attendances_count}个签到正在进行</p>
<Teaccomponent
qiandaoxiangq={(b)=>this.qiandaoxiangq(b)}
qiandaoxiangq={(b,id)=>this.qiandaoxiangq(b,id)}
Gotomodes={(d,b)=>this.Gotomodes(d,b)}
GotomQrcodesodesy={(d,b)=>this.GotomQrcodesodesy(d,b)}
getsetdatas={()=>this.getsetdatas()}
@ -273,7 +286,7 @@ class Students_signin extends Component{
<Teaccomponent
qiandaoxiangq={(b)=>this.qiandaoxiangq(b)}
qiandaoxiangq={(b,id)=>this.qiandaoxiangq(b,id)}
Gotomodes={(d,b)=>this.Gotomodes(d,b)}
GotomQrcodesodesy={(d,b)=>this.GotomQrcodesodesy(d,b)}
getsetdatas={()=>this.getsetdatas()}
@ -317,6 +330,7 @@ class Students_signin extends Component{
:
// 签到详情
<Signindetails
switattendance_id={switattendance_id}
{...this.props}
{...this.state}
qiandaoxiangq={(b)=>this.qiandaoxiangq(b)}

Loading…
Cancel
Save