+
二维码签到
-
+
开始结束时间:
-
@@ -75,23 +77,34 @@ class Teacherentry extends Component{
{
isAdmin===true?
+
+ :
(
- this.props.defaultActiveKey==="0"?
+ this.props.defaultActiveKey==="1"?
:
- )
- :
-
+ {/*
*/}
+ {/* 正常签到*/}
+ {/*
*/}
+ {/*
*/}
+ {/* 请假*/}
+ {/*
*/}
-
+
+ 旷课
+
+
+ )
}
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 426f30dcf..685bd11e9 100644
--- a/public/react/src/modules/courses/signin/component/teachercomponent/Teaccomponent.js
+++ b/public/react/src/modules/courses/signin/component/teachercomponent/Teaccomponent.js
@@ -1,5 +1,6 @@
import React,{ Component } from "react";
import '../../css/signincdi.css';
+import axios from 'axios';
import Teacherentry from "../Teacherentry";
//在线学习
class Teaccomponent extends Component{
@@ -13,9 +14,21 @@ class Teaccomponent extends Component{
}
componentDidMount() {
-
+ const coureid=this.props.match.params.coursesId;
+ let urls = `/courses/${coureid}/attendances.json`;
+ axios.get(urls, {
+ params: {
+ history: this.props.defaultActiveKey==="1"?undefined:true
+ }
+ }).then((response) => {
+ console.log(response);
+
+ })
}
+
+
+
componentDidUpdate = (prevProps) => {
@@ -26,9 +39,9 @@ class Teaccomponent extends Component{
render(){
return(
-
+
-
+
)
}
diff --git a/public/react/src/modules/courses/signin/css/signincdi.css b/public/react/src/modules/courses/signin/css/signincdi.css
index 1457fc693..4eb325dce 100644
--- a/public/react/src/modules/courses/signin/css/signincdi.css
+++ b/public/react/src/modules/courses/signin/css/signincdi.css
@@ -91,6 +91,9 @@
.ws80s{
width: 80%;
}
+.ws50s{
+ width: 50%;
+}
.hs30s{
height: 30%;
}
@@ -239,3 +242,80 @@
color:rgba(245,108,108,1);
margin-right: 30px;
}
+
+.qiandaobutton{
+ font-size:16px;
+ font-family:Microsoft YaHei;
+ font-weight:400;
+ color:rgba(255,255,255,1);
+ text-align: center;
+ line-height: 40px;
+ width:100px;
+ height:40px;
+ background:rgba(64,158,255,1);
+ border-radius:4px;
+}
+
+.zcqiandao{
+ width:100px;
+ height:40px;
+ border:1px solid rgba(38,199,201,1);
+ border-radius:4px;
+ font-size:16px;
+ font-family:Microsoft YaHei;
+ font-weight:400;
+ color:rgba(38,199,201,1);
+ text-align: center;
+ line-height: 40px;
+
+}
+.qjqiandao{
+ width:100px;
+ height:40px;
+ border:1px solid #EAAE4E;
+ border-radius:4px;
+ font-size:16px;
+ font-family:Microsoft YaHei;
+ font-weight:400;
+ color:#EAAE4E;
+ text-align: center;
+ line-height: 40px;
+
+
+}
+
+.kkqiandao{
+ width:100px;
+ height:40px;
+ border:1px solid #FF835C;
+ border-radius:4px;
+ font-size:16px;
+ font-family:Microsoft YaHei;
+ font-weight:400;
+ color:#FF835C;
+ text-align: center;
+ line-height: 40px;
+
+}
+.h40s{
+ line-height: 40px ;
+}
+.mt40{
+ margin-top: 40px !important;
+}
+
+.h500{
+ min-height: 500px;
+}
+.kkp{
+ font-size:14px;
+ font-family:Microsoft YaHei;
+ font-weight:400;
+}
+.pr32{
+ padding-right: 32px;
+}
+
+.mr20r{
+ margin-right: 20px;
+}
diff --git a/public/react/src/modules/courses/signin/mymain/Signinmain.js b/public/react/src/modules/courses/signin/mymain/Signinmain.js
index 0684304fb..4b1d3052c 100644
--- a/public/react/src/modules/courses/signin/mymain/Signinmain.js
+++ b/public/react/src/modules/courses/signin/mymain/Signinmain.js
@@ -3,6 +3,8 @@ import '../css/signincdi.css';
import { Tabs } from 'antd';
import Teachers_signin from '../teacher/Teachers_signin';
import Students_signin from '../student/Students_signin';
+import axios from 'axios';
+
const { TabPane } = Tabs;
// 主签到目录 主签到目录
class Signinmain extends Component{
@@ -30,13 +32,10 @@ class Signinmain extends Component{
return(
-
-
+
-
-
)
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 527fda152..845bdf173 100644
--- a/public/react/src/modules/courses/signin/teacher/Teachers_signin.js
+++ b/public/react/src/modules/courses/signin/teacher/Teachers_signin.js
@@ -4,6 +4,8 @@ import { Tabs,Pagination} from 'antd';
import Teaccomponent from '../component/teachercomponent/Teaccomponent';
import Histeacomponent from '../component/teachercomponent/Histeacomponent';
import Createsignmodel from '../model/Createsignmodel';
+import axios from 'axios';
+
const { TabPane } = Tabs;
//在线学习
class Students_signin extends Component{
@@ -49,7 +51,9 @@ class Students_signin extends Component{
render(){
- let {page,per_page,count,defaultActiveKey} =this.state
+ let {page,per_page,count,defaultActiveKey} =this.state;
+ const isAdmin =this.props.isAdmin();
+
return(
共3个签到正在进行
-
+
+
+
- 共3个签到正在进行
+
+
共3个签到正在进行
+ {
+ isAdmin===false?
+
+
旷课:2
+
请假:2
+
正常签到:10
+
+
+ :
+ ""
+ }
+
+
+
+
+
+
-
- Content of Tab Pane 3
-
+ {
+ isAdmin===true?
+
+ Content of Tab Pane 3
+
+ :
+ ""
+ }
+
-
-
-
this.Createsign()}>创建签到
-
+ {
+ isAdmin?
+
+
+
this.Createsign()}>创建签到
+
+ :""
+ }
From 42067b1690416bb20082b3fd34b443a098e20023 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 11:22:04 +0800
Subject: [PATCH 2/3] =?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/NoneDatas.js | 36 +++++++++
.../teachercomponent/Teaccomponent.js | 29 ++++---
.../courses/signin/teacher/Teachers_signin.js | 76 ++++++++++++++++---
.../modules/question/component/Contentpart.js | 3 +-
4 files changed, 122 insertions(+), 22 deletions(-)
create mode 100644 public/react/src/modules/courses/signin/component/NoneDatas.js
diff --git a/public/react/src/modules/courses/signin/component/NoneDatas.js b/public/react/src/modules/courses/signin/component/NoneDatas.js
new file mode 100644
index 000000000..c36cc29d1
--- /dev/null
+++ b/public/react/src/modules/courses/signin/component/NoneDatas.js
@@ -0,0 +1,36 @@
+import React, { Component } from 'react';
+import { getImageUrl , getUrl } from 'educoder';
+
+class NoneDatas extends Component{
+ constructor(props) {
+ super(props)
+ }
+ render(){
+ const { style } = this.props;
+ return(
+
+
+
+
暂无相关数据
+
+ )
+ }
+}
+export default NoneDatas;
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 685bd11e9..fee014477 100644
--- a/public/react/src/modules/courses/signin/component/teachercomponent/Teaccomponent.js
+++ b/public/react/src/modules/courses/signin/component/teachercomponent/Teaccomponent.js
@@ -2,6 +2,9 @@ import React,{ Component } from "react";
import '../../css/signincdi.css';
import axios from 'axios';
import Teacherentry from "../Teacherentry";
+import NoneDatas from '../NoneDatas';
+import Listjihe from "../../../../question/component/Listjihe";
+
//在线学习
class Teaccomponent extends Component{
//教师正在签到
@@ -9,21 +12,15 @@ class Teaccomponent extends Component{
super(props);
this.state={
-
+ mydatas:[]
}
}
componentDidMount() {
- const coureid=this.props.match.params.coursesId;
- let urls = `/courses/${coureid}/attendances.json`;
- axios.get(urls, {
- params: {
- history: this.props.defaultActiveKey==="1"?undefined:true
- }
- }).then((response) => {
- console.log(response);
-
+ this.setState({
+ mydatas:this.props.datas
})
+
}
@@ -37,10 +34,20 @@ class Teaccomponent extends Component{
render(){
+ let mydatas=this.props.datas?this.props.datas:[];
return(
-
+ {
+ mydatas.length>0?
+ mydatas.map((object, index) => {
+ return (
+
+ )
+ })
+ :
+
+ }
)
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 845bdf173..1cb3b7f79 100644
--- a/public/react/src/modules/courses/signin/teacher/Teachers_signin.js
+++ b/public/react/src/modules/courses/signin/teacher/Teachers_signin.js
@@ -15,14 +15,21 @@ class Students_signin extends Component{
this.state={
visible:false,
page:1,
- per_page:20,
+ limit:5,
count:50,
defaultActiveKey:"1",
+ attendances_count:0,
+ datas:[]
}
}
componentDidMount() {
-
+ let data={
+ key:"1",
+ page:1,
+ limit:5
+ }
+ this.gogetdatas(data);
}
componentDidUpdate = (prevProps) => {
@@ -33,7 +40,48 @@ class Students_signin extends Component{
callback=(key)=> {
console.log(key);
this.setState({
- defaultActiveKey: key,
+ key: key,
+ page:1,
+ limit:5
+ })
+ let data={
+ key:key,
+ page:1,
+ limit:5
+ }
+ if(key==="1" || key ==="2"){
+ this.gogetdatas(data);
+ }
+ }
+
+ gogetdatas =(mydata)=>{
+ const coureid=this.props.match.params.coursesId;
+ let urls = `/courses/${coureid}/attendances.json`;
+ let arry={}
+ if(mydata.key==="1" || mydata.key ===1){
+ arry={
+ page:mydata.page,
+ limit:mydata.limit,
+ };
+ }else if(mydata.key==="2" || mydata.key ===2){
+ arry={
+ history:true,
+ page:mydata.page,
+ limit:mydata.limit,
+ }
+ }
+ axios.get(urls, {
+ params: arry
+ }).then((response) => {
+ console.log(response);
+ if(response){
+ if(response.data){
+ this.setState({
+ attendances_count:response.data.attendances_count,
+ datas:response.data.attendances
+ })
+ }
+ }
})
}
@@ -46,12 +94,20 @@ class Students_signin extends Component{
this.setState({
page: pageNumber,
})
+
+ let data={
+ key:this.state.defaultActiveKey,
+ page:pageNumber,
+ limit:5
+ }
+ this.gogetdatas(data);
+
}
render(){
- let {page,per_page,count,defaultActiveKey} =this.state;
+ let {page,per_page,count,defaultActiveKey,limit,attendances_count,datas} =this.state;
const isAdmin =this.props.isAdmin();
return(
@@ -69,14 +125,14 @@ class Students_signin extends Component{
共3个签到正在进行
-
+
+ pageSize={limit}
+ total={attendances_count}>
@@ -97,13 +153,13 @@ class Students_signin extends Component{
-
+
+ pageSize={limit}
+ total={attendances_count}>
{
diff --git a/public/react/src/modules/question/component/Contentpart.js b/public/react/src/modules/question/component/Contentpart.js
index e3f5259e5..5cafe5937 100644
--- a/public/react/src/modules/question/component/Contentpart.js
+++ b/public/react/src/modules/question/component/Contentpart.js
@@ -429,7 +429,8 @@ class Contentpart extends Component {
)
- })}
+ })
+ }
From 8dfe7b5c21538963e4cfecfb0b35b15b84f543d3 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 11:25:56 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E7=AD=BE=E5=88=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/modules/courses/signin/teacher/Teachers_signin.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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 1cb3b7f79..a2c3e8bb7 100644
--- a/public/react/src/modules/courses/signin/teacher/Teachers_signin.js
+++ b/public/react/src/modules/courses/signin/teacher/Teachers_signin.js
@@ -40,7 +40,7 @@ class Students_signin extends Component{
callback=(key)=> {
console.log(key);
this.setState({
- key: key,
+ defaultActiveKey: key,
page:1,
limit:5
})
@@ -94,7 +94,7 @@ class Students_signin extends Component{
this.setState({
page: pageNumber,
})
-
+
let data={
key:this.state.defaultActiveKey,
page:pageNumber,