From ed3ba7a1747c4a030df39d0e972fdc85730267af Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Sat, 14 Mar 2020 00:04:31 +0800
Subject: [PATCH 02/12] =?UTF-8?q?=E7=AD=BE=E5=88=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Signinstatistics/Signinstatistics.js | 248 ++++++++++--------
1 file changed, 138 insertions(+), 110 deletions(-)
diff --git a/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js b/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js
index 0f84980bc..d8ff88694 100644
--- a/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js
+++ b/public/react/src/modules/courses/signin/Signinstatistics/Signinstatistics.js
@@ -9,6 +9,7 @@ import {
Axis,
Tooltip,
} from "bizcharts";
+import LoadingSpin from "../../../../common/LoadingSpin";
const { Option } = Select;
class Signinstatistics extends Component {
@@ -17,10 +18,14 @@ class Signinstatistics extends Component {
this.state={
datas:null,
newlist:[],
- course_groups:[{id:"全部",name:"全部"}]
+ course_groups:[{id:"全部",name:"全部"}],
+ spal:false,
}
}
getdata=(group_id)=>{
+ this.setState({
+ spal:true
+ })
const coursesId=this.props.match.params.coursesId;
let url=`/weapps/courses/${coursesId}/attendances.json`
axios.get(url,{params:{
@@ -60,7 +65,15 @@ class Signinstatistics extends Component {
}
}
- })
+ this.setState({
+ spal:false
+ })
+ }).catch((error) => {
+ this.setState({
+ spal:false
+ })
+
+ })
}
componentDidMount() {
@@ -84,7 +97,7 @@ class Signinstatistics extends Component {
}
render() {
- let {datas,newlist,course_groups}=this.state;
+ let {datas,newlist,course_groups,spal}=this.state;
const cols = {
month: {
@@ -95,11 +108,22 @@ class Signinstatistics extends Component {
return(
+
+ {
+ spal===true?
+
+
+
-
-
-
-
- {datas&&datas.all_history_count}
-
-
-
-
- {datas?(datas&&datas.avg_normal_rate*100).toFixed(0)+"%":""}
-
-
-
-
- {datas?(datas&&datas.avg_absence_rate*100).toFixed(0)+"%":""}
-
-
-
-
- {datas?(datas&&datas.avg_leave_rate*100).toFixed(0)+"%":""}
-
-
-
-
-
-
-
-
-
-
-
-
- 到课率
-
-
-
-
-
- 旷课率
-
-
-
-
-
- 请假率
-
-
-
-
-
- 显示最近十次签到
-
-
-
-
-
-
-
-
-
- {/**/}
-
- `${val}%`
- }}
- />
-
-
-
-
-
-
-
+ }
+
+
+
+ {datas&&datas.all_history_count}
+
+
+
+
+ {datas?(datas&&datas.avg_normal_rate*100).toFixed(0)+"%":""}
+
+
+
+
+ {datas?(datas&&datas.avg_absence_rate*100).toFixed(0)+"%":""}
+
+
+
+
+ {datas?(datas&&datas.avg_leave_rate*100).toFixed(0)+"%":""}
+
+
+
+
+
+
+
+
+
+
+
+
+ 到课率
+
+
+
+
+
+ 旷课率
+
+
+
+
+
+ 请假率
+
+
+
+
+
+ 显示最近十次签到
+
+
+
+
+
+
+
+
+
+ {/**/}
+
+ `${val}%`
+ }}
+ />
+
+
+
+
+
+
+
+
+ }
+
+
)
@@ -227,4 +255,4 @@ class Signinstatistics extends Component {
-export default Signinstatistics;
\ No newline at end of file
+export default Signinstatistics;
From 2f0ea73e66cc721cd5436263011d977829302a36 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Sat, 14 Mar 2020 00:11:01 +0800
Subject: [PATCH 03/12] =?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/student/Signedinlist.js | 28 +++++++++++++++----
1 file changed, 23 insertions(+), 5 deletions(-)
diff --git a/public/react/src/modules/courses/signin/student/Signedinlist.js b/public/react/src/modules/courses/signin/student/Signedinlist.js
index 02cd231fc..1f1074b49 100644
--- a/public/react/src/modules/courses/signin/student/Signedinlist.js
+++ b/public/react/src/modules/courses/signin/student/Signedinlist.js
@@ -3,6 +3,7 @@ import React,{ Component } from "react";
import { Row, Col,Select,Table,Pagination } from 'antd';
import axios from 'axios';
import LoadingSpin from "../../../../common/LoadingSpin";
+import NoneDatas from "../component/NoneDatas";
const { Option } = Select;
class Signedinlist extends Component {
@@ -80,10 +81,13 @@ class Signedinlist extends Component {
this.setState({
member_attendances:response.data.member_attendances,
members_count:response.data.members_count,
- loading:false
+
})
}
+ this.setState({
+ loading:false
+ })
}).catch((error) => {
that.setState({
loading:false
@@ -295,12 +299,21 @@ class Signedinlist extends Component {
{
+ this.state.loading===true?
+
+
+
+ :
member_attendances&&member_attendances.length===0?
-
+ {/**/}
+
+
:
// loading={this.state.loading}
@@ -310,9 +323,14 @@ class Signedinlist extends Component {
+ {
+ item.attendance_status?
+ (
+ item.attendance_status==="ABSENCE"?
+
this.props.Signin(item.mode,item.id,item.attendance_code)}>
+ 签到
+
+ :
+ item.attendance_status==="NORMAL"?
+
+ 正常签到
+
+ :""
+ )
+ :
+ ""
+ }
-
this.props.Signin(item.mode,item.id,item.attendance_code)}>
- 签到
-
:
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 5b8d21b1d..a03df188d 100644
--- a/public/react/src/modules/courses/signin/component/teachercomponent/Teaccomponent.js
+++ b/public/react/src/modules/courses/signin/component/teachercomponent/Teaccomponent.js
@@ -4,8 +4,9 @@ import axios from 'axios';
import Teacherentry from "../Teacherentry";
import NoneDatas from '../NoneDatas';
import LoadingSpin from '../../../../../common/LoadingSpin';
+import { Modal, Button } from 'antd';
-import Listjihe from "../../../../question/component/Listjihe";
+const { confirm } = Modal;
//在线学习
class Teaccomponent extends Component{
@@ -34,55 +35,76 @@ class Teaccomponent extends Component{
}
//截止
thisEnd=(attendance_id)=>{
- const url = `/weapps/attendances/${attendance_id}/end.json`;
- var data={
- }
- axios.post(url, data)
- .then((result) => {
- if (result.data.status === 0) {
- // try {
- // this.props.showNotification(`截止成功`);
- // }catch (e) {
- //
- // }
- this.props.getsetdatas();
- }else{
- this.props.showNotification(result.data.message);
+ confirm({
+ title: '提示',
+ content: '确认截止此签到吗?',
+ onOk() {
+ const url = `/weapps/attendances/${attendance_id}/end.json`;
+ var data={
}
- }).catch((error) => {
- //console.log(error);
- })
+ axios.post(url, data)
+ .then((result) => {
+ if (result.data.status === 0) {
+ // try {
+ // this.props.showNotification(`截止成功`);
+ // }catch (e) {
+ //
+ // }
+ this.props.getsetdatas();
+ }else{
+ this.props.showNotification(result.data.message);
+
+ }
+ }).catch((error) => {
+ //console.log(error);
+ })
+ },
+ onCancel() {
+
+ },
+ });
+
}
//删除
thisdelete=(attendance_id)=>{
- const url = `/weapps/attendances/${attendance_id}.json`;
- var data={
-
- }
- axios.delete(url, data)
- .then((result) => {
- if (result.data.status === 0) {
- // try {
- // this.props.showNotification(`删除成功`);
- // }catch (e) {
- //
- // }
-
- this.props.getsetdatas();
- }else{
- this.props.showNotification(result.data.message);
+ confirm({
+ title: '提示',
+ content: '确认删除此签到吗?',
+ onOk () {
+ const url = `/weapps/attendances/${attendance_id}.json`;
+ var data={
}
- }).catch((error) => {
- //console.log(error);
- })
+ axios.delete(url, data)
+ .then((result) => {
+ if (result.data.status === 0) {
+ try {
+ this.props.showNotification(`删除成功`);
+ }catch (e) {
+
+ }
+
+ this.props.getsetdatas();
+ }else{
+ this.props.showNotification(result.data.message);
+
+ }
+ }).catch((error) => {
+ //console.log(error);
+ })
+ },
+ onCancel() {
+
+ },
+ });
+
}
//学生签到
Signin=(attendance_mode,attendance_id,code)=>{
- debugger
+
const url = `/weapps/course_member_attendances.json`;
var data={
From 3fdbccd789b7465cb49040f172f066771fb43ce9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Sat, 14 Mar 2020 02:08:53 +0800
Subject: [PATCH 05/12] =?UTF-8?q?=E7=AD=BE=E5=88=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/src/AppConfig.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js
index 332e8ea73..fee6eb724 100644
--- a/public/react/src/AppConfig.js
+++ b/public/react/src/AppConfig.js
@@ -42,11 +42,11 @@ if (isDev) {
window.location.search.indexOf('debug=a') != -1 ? 'admin' : parsed.debug || 'admin'
}
// 超管
-// debugType="admin";
+debugType="admin";
// 老师
// debugType="teacher";
// 学生
-debugType="student";
+// debugType="student";
From 8caf263a5d3221e4a96f7e20e90ad88243192956 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Sat, 14 Mar 2020 02:13:13 +0800
Subject: [PATCH 06/12] =?UTF-8?q?=E7=AD=BE=E5=88=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../teachercomponent/Teaccomponent.js | 20 ++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
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 a03df188d..099625aaf 100644
--- a/public/react/src/modules/courses/signin/component/teachercomponent/Teaccomponent.js
+++ b/public/react/src/modules/courses/signin/component/teachercomponent/Teaccomponent.js
@@ -35,6 +35,7 @@ class Teaccomponent extends Component{
}
//截止
thisEnd=(attendance_id)=>{
+ let thiss=this
confirm({
title: '提示',
@@ -52,9 +53,9 @@ class Teaccomponent extends Component{
// }catch (e) {
//
// }
- this.props.getsetdatas();
+ thiss.props.getsetdatas();
}else{
- this.props.showNotification(result.data.message);
+ thiss.props.showNotification(result.data.message);
}
}).catch((error) => {
@@ -69,6 +70,7 @@ class Teaccomponent extends Component{
}
//删除
thisdelete=(attendance_id)=>{
+ let thiss=this
confirm({
title: '提示',
content: '确认删除此签到吗?',
@@ -80,15 +82,15 @@ class Teaccomponent extends Component{
axios.delete(url, data)
.then((result) => {
if (result.data.status === 0) {
- try {
- this.props.showNotification(`删除成功`);
- }catch (e) {
-
- }
+ // try {
+ // thiss.props.showNotification(`删除成功`);
+ // }catch (e) {
+ //
+ // }
- this.props.getsetdatas();
+ thiss.props.getsetdatas();
}else{
- this.props.showNotification(result.data.message);
+ thiss.props.showNotification(result.data.message);
}
}).catch((error) => {
From 5c450a59184b4c949531798a36a1c4bf6158bcb8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Sat, 14 Mar 2020 02:21:03 +0800
Subject: [PATCH 07/12] =?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/teacher/Teachers_signin.js | 12 ++++++++++++
1 file changed, 12 insertions(+)
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 1a8326885..10a1a1a43 100644
--- a/public/react/src/modules/courses/signin/teacher/Teachers_signin.js
+++ b/public/react/src/modules/courses/signin/teacher/Teachers_signin.js
@@ -111,6 +111,18 @@ class Students_signin extends Component{
leave_count:response.data.leave_count,
absence_count:response.data.absence_count,
})
+ if(response.data.attendances.length===0&&mydata.page!==1){
+ this.setState({
+ page:mydata.page-1,
+ limit:5
+ })
+ let data={
+ key: mydata.key,
+ page:mydata.page-1,
+ limit:5
+ }
+ this.gogetdatas(data);
+ }
}
}
this.setState({
From 1a84ca61fe27bf202db6ade85980c3de919450c6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Sat, 14 Mar 2020 15:03:09 +0800
Subject: [PATCH 08/12] =?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/student/Signindetails.js | 1 +
.../src/modules/courses/signin/teacher/Teachers_signin.js | 8 +++-----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/public/react/src/modules/courses/signin/student/Signindetails.js b/public/react/src/modules/courses/signin/student/Signindetails.js
index b1d497b65..3eec58cad 100644
--- a/public/react/src/modules/courses/signin/student/Signindetails.js
+++ b/public/react/src/modules/courses/signin/student/Signindetails.js
@@ -72,6 +72,7 @@ class Signindetails extends Component{
{/* 列表+筛选 */}
this.mygetdatas()}
defaultActiveKey={this.props.defaultActiveKey}
switattendance_id={this.props.switattendance_id}
headdata={headdata}
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 10a1a1a43..ae2507887 100644
--- a/public/react/src/modules/courses/signin/teacher/Teachers_signin.js
+++ b/public/react/src/modules/courses/signin/teacher/Teachers_signin.js
@@ -210,11 +210,9 @@ class Students_signin extends Component{
switchs:bool,
switattendance_id:id,
})
- // if(bool){
- // var currenturl = window.location.href;
- // var newUrl = (currenturl.split("?"))[0];
- // window.history.pushState('','',newUrl+'?type='+2);
- // }
+ if(bool===false){
+ this.getsetdatas();
+ }
}
From 0475a12370876822f308d2af20480bf239df1784 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Sat, 14 Mar 2020 15:36:26 +0800
Subject: [PATCH 09/12] =?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/component/Detailss.js | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/public/react/src/modules/courses/signin/component/Detailss.js b/public/react/src/modules/courses/signin/component/Detailss.js
index b5fd1949a..73aefaa00 100644
--- a/public/react/src/modules/courses/signin/component/Detailss.js
+++ b/public/react/src/modules/courses/signin/component/Detailss.js
@@ -177,7 +177,13 @@ class Detailss extends Component {
{
defaultActiveKey === "1" ?
item && item.mode === "NUMBER" ?
-
+
+
+
:""
:
""
From 47ea9d4c3164663f0baf1fb4d403b9f894f1c6cc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Sat, 14 Mar 2020 22:05:01 +0800
Subject: [PATCH 10/12] =?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 | 21 +++++++------------
1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/public/react/src/modules/courses/signin/component/Detailss.js b/public/react/src/modules/courses/signin/component/Detailss.js
index 73aefaa00..0ef4fbea5 100644
--- a/public/react/src/modules/courses/signin/component/Detailss.js
+++ b/public/react/src/modules/courses/signin/component/Detailss.js
@@ -140,6 +140,13 @@ class Detailss extends Component {
签到码:
+
+
+
:
item && item.mode === "QRCODE" ?
@@ -174,20 +181,6 @@ class Detailss extends Component {
- {
- defaultActiveKey === "1" ?
- item && item.mode === "NUMBER" ?
-
{
item && item.mode === "NUMBER" ?
@@ -143,7 +144,9 @@ class Detailss extends Component {
@@ -181,20 +184,7 @@ class Detailss extends Component {
- {
- defaultActiveKey === "1" ?
- item && item.mode === "NUMBER" ?
-