From bd688005a76613ac3f4756394f8f54577d32eafe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 13 Mar 2020 18:18:38 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=AD=BE=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/signin/component/Detailss.js | 85 ++++++++++--------- .../courses/signin/component/Teacherentry.js | 2 +- .../teachercomponent/Teaccomponent.js | 2 +- .../modules/courses/signin/css/signincdi.css | 13 ++- .../courses/signin/student/Signindetails.js | 2 +- .../courses/signin/teacher/Teachers_signin.js | 13 +-- 6 files changed, 70 insertions(+), 47 deletions(-) diff --git a/public/react/src/modules/courses/signin/component/Detailss.js b/public/react/src/modules/courses/signin/component/Detailss.js index 471d88851..38d980907 100644 --- a/public/react/src/modules/courses/signin/component/Detailss.js +++ b/public/react/src/modules/courses/signin/component/Detailss.js @@ -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( -
+

2020-03-10第五次签到 @@ -49,7 +73,7 @@ class Detailss extends Component{

-
+
@@ -73,44 +97,29 @@ class Detailss extends Component{ 2010-03-10 10:00-11:00
- -
- { - isAdmin===true? -
-
截止
-
删除
-
- : - ( - this.props.defaultActiveKey==="1"? -
- -
- 签到 -
-
- : -
- {/*
*/} - {/* 正常签到*/} - {/*
*/} - - {/*
*/} - {/* 请假*/} - {/*
*/} - -
- 旷课 -
-
- ) - - } +
+

{ + jsCopy("file_path"+1) + }}> + 复制签到码 +

+

+ 88866 +

+

签到码:

-
+
diff --git a/public/react/src/modules/courses/signin/component/Teacherentry.js b/public/react/src/modules/courses/signin/component/Teacherentry.js index 408e718d3..15d02260d 100644 --- a/public/react/src/modules/courses/signin/component/Teacherentry.js +++ b/public/react/src/modules/courses/signin/component/Teacherentry.js @@ -101,7 +101,7 @@ class Teacherentry extends Component { : item.edit_auth === true ?
-
this.props.qiandaoxiangq(true)}>编辑
+
this.props.qiandaoxiangq(true,item.id)}>编辑
this.props.thisdelete(item.id)}>删除
: diff --git a/public/react/src/modules/courses/signin/component/teachercomponent/Teaccomponent.js b/public/react/src/modules/courses/signin/component/teachercomponent/Teaccomponent.js index 44675bb14..9159fa13a 100644 --- a/public/react/src/modules/courses/signin/component/teachercomponent/Teaccomponent.js +++ b/public/react/src/modules/courses/signin/component/teachercomponent/Teaccomponent.js @@ -140,7 +140,7 @@ class Teaccomponent extends Component{ mydatas.map((object, index) => { return ( 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} diff --git a/public/react/src/modules/courses/signin/css/signincdi.css b/public/react/src/modules/courses/signin/css/signincdi.css index e01aea699..76c73e1be 100644 --- a/public/react/src/modules/courses/signin/css/signincdi.css +++ b/public/react/src/modules/courses/signin/css/signincdi.css @@ -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{ } diff --git a/public/react/src/modules/courses/signin/student/Signindetails.js b/public/react/src/modules/courses/signin/student/Signindetails.js index 32ad0bac3..dbdafb5e7 100644 --- a/public/react/src/modules/courses/signin/student/Signindetails.js +++ b/public/react/src/modules/courses/signin/student/Signindetails.js @@ -43,7 +43,7 @@ class Signindetails extends Component{

- +
) diff --git a/public/react/src/modules/courses/signin/teacher/Teachers_signin.js b/public/react/src/modules/courses/signin/teacher/Teachers_signin.js index b978b8813..c762c7d61 100644 --- a/public/react/src/modules/courses/signin/teacher/Teachers_signin.js +++ b/public/react/src/modules/courses/signin/teacher/Teachers_signin.js @@ -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; @@ -193,7 +195,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 + Studentssigntype,Studentssigntypedata,Qrcodesignintype,Qrcodesignintypedata,switchs,switattendance_id } =this.state; const isAdmin =this.props.isAdmin(); @@ -235,7 +237,7 @@ class Students_signin extends Component{

共{attendances_count}个签到正在进行

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 +275,7 @@ class Students_signin extends Component{ 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 +319,7 @@ class Students_signin extends Component{ : // 签到详情 this.qiandaoxiangq(b)} From 146ffdfc6e776582fe4125c2fc1ffd1b87482b8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Fri, 13 Mar 2020 18:26:36 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=AD=BE=E5=88=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/signin/component/Detailss.js | 38 ++++++++++--------- .../courses/signin/student/Signindetails.js | 4 ++ .../courses/signin/teacher/Teachers_signin.js | 11 ++++++ 3 files changed, 36 insertions(+), 17 deletions(-) diff --git a/public/react/src/modules/courses/signin/component/Detailss.js b/public/react/src/modules/courses/signin/component/Detailss.js index 38d980907..afdbe529e 100644 --- a/public/react/src/modules/courses/signin/component/Detailss.js +++ b/public/react/src/modules/courses/signin/component/Detailss.js @@ -97,25 +97,29 @@ class Detailss extends Component{ 2010-03-10 10:00-11:00
-
-

{ - jsCopy("file_path"+1) - }}> - 复制签到码 -

-

- 88866 -

-

签到码:

+ + + {/*

{*/} + {/* jsCopy("file_path"+1)*/} + {/*}}>*/} + {/* 复制签到码*/} + {/*

*/} + {/*

*/} + {/* 88866*/} + {/*

*/} + {/*

签到码:

*/} + +
diff --git a/public/react/src/modules/courses/signin/student/Signindetails.js b/public/react/src/modules/courses/signin/student/Signindetails.js index dbdafb5e7..679373e28 100644 --- a/public/react/src/modules/courses/signin/student/Signindetails.js +++ b/public/react/src/modules/courses/signin/student/Signindetails.js @@ -44,6 +44,10 @@ class Signindetails extends Component{ + + + +
) diff --git a/public/react/src/modules/courses/signin/teacher/Teachers_signin.js b/public/react/src/modules/courses/signin/teacher/Teachers_signin.js index c762c7d61..fd6235ccb 100644 --- a/public/react/src/modules/courses/signin/teacher/Teachers_signin.js +++ b/public/react/src/modules/courses/signin/teacher/Teachers_signin.js @@ -190,6 +190,17 @@ class Students_signin extends Component{ } + settabsdata=()=>{ + let data={ + defaultActiveKey:"1", + key:"1", + page:1, + limit:5 + } + this.gogetdatas(data); + } + + render(){