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;
diff --git a/public/react/src/modules/courses/signin/component/Detailss.js b/public/react/src/modules/courses/signin/component/Detailss.js
index b5fd1949a..f109db317 100644
--- a/public/react/src/modules/courses/signin/component/Detailss.js
+++ b/public/react/src/modules/courses/signin/component/Detailss.js
@@ -120,6 +120,7 @@ class Detailss extends Component {
defaultActiveKey === "1" ?
{
item && item.mode === "NUMBER" ?
@@ -140,6 +141,15 @@ class Detailss extends Component {
签到码:
+
+
+
:
item && item.mode === "QRCODE" ?
@@ -174,14 +184,7 @@ class Detailss extends Component {
- {
- defaultActiveKey === "1" ?
- item && item.mode === "NUMBER" ?
-
- :""
- :
- ""
- }
+
diff --git a/public/react/src/modules/courses/signin/component/Teacherentry.js b/public/react/src/modules/courses/signin/component/Teacherentry.js
index 0f6c8e9ae..6cbb48858 100644
--- a/public/react/src/modules/courses/signin/component/Teacherentry.js
+++ b/public/react/src/modules/courses/signin/component/Teacherentry.js
@@ -112,10 +112,24 @@ class Teacherentry extends Component {
(
this.props.defaultActiveKey === "1" ?
+ {
+ 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..099625aaf 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,78 @@ class Teaccomponent extends Component{
}
//截止
thisEnd=(attendance_id)=>{
- const url = `/weapps/attendances/${attendance_id}/end.json`;
- var data={
+ let thiss=this
- }
- 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) {
+ //
+ // }
+ thiss.props.getsetdatas();
+ }else{
+ thiss.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);
+ let thiss=this
+ 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 {
+ // thiss.props.showNotification(`删除成功`);
+ // }catch (e) {
+ //
+ // }
+
+ thiss.props.getsetdatas();
+ }else{
+ thiss.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={
diff --git a/public/react/src/modules/courses/signin/css/signincdi.css b/public/react/src/modules/courses/signin/css/signincdi.css
index 95fe4ac71..09379ff4c 100644
--- a/public/react/src/modules/courses/signin/css/signincdi.css
+++ b/public/react/src/modules/courses/signin/css/signincdi.css
@@ -208,6 +208,7 @@
font-family:Microsoft YaHei;
font-weight:400;
color:#333333;
+
}
.progressivps{
width:200px;
diff --git a/public/react/src/modules/courses/signin/student/Signedinlist.js b/public/react/src/modules/courses/signin/student/Signedinlist.js
index 17de0cabc..1f1074b49 100644
--- a/public/react/src/modules/courses/signin/student/Signedinlist.js
+++ b/public/react/src/modules/courses/signin/student/Signedinlist.js
@@ -2,6 +2,8 @@ import "../css/Signinstatistics.css"
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 {
@@ -79,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
@@ -293,13 +298,39 @@ class Signedinlist extends Component {
-
+ {
+ this.state.loading===true?
+
+
+
+ :
+ member_attendances&&member_attendances.length===0?
+
+ {/**/}
+
+
+
+ :
+ // loading={this.state.loading}
+
+
+ }
+
-
+ {
+ member_attendances&&member_attendances.length>0?
+
+ :""
+ }
+
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 1a8326885..ae2507887 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({
@@ -198,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();
+ }
}