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

PCqiandao
杨树明 5 years ago
commit c6dd523b4c

@ -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,6 +65,14 @@ class Signinstatistics extends Component {
}
}
this.setState({
spal:false
})
}).catch((error) => {
this.setState({
spal:false
})
})
}
@ -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,6 +108,17 @@ class Signinstatistics extends Component {
return(
<React.Fragment >
<div>
{
spal===true?
<div style={{
minHeight:"500px",
}}>
<LoadingSpin></LoadingSpin>
</div>
:
<div>
<Row type="flex" justify="space-between" className={"mt20"}>
<style>
@ -215,6 +239,10 @@ class Signinstatistics extends Component {
</div>
</div>
</div>
}
</div>
</React.Fragment>
)

@ -120,6 +120,7 @@ class Detailss extends Component {
defaultActiveKey === "1" ?
<div className="ws25s" style={{
position: "relative",
overflow: 'hidden',
}}>
{
item && item.mode === "NUMBER" ?
@ -140,6 +141,15 @@ class Detailss extends Component {
<p className="h40s font-16" style={{
color: "#909399"
}}>签到码</p>
<div style={{
overflow: 'hidden',
height: "1px",
width: "1px",
position: "absolute",
right: "-200px",
}}>
<input id={"file_path" + 1} className="file_path_input" value={item&&item.code}/>
</div>
</div>
:
item && item.mode === "QRCODE" ?
@ -174,14 +184,7 @@ class Detailss extends Component {
</div>
</div>
{
defaultActiveKey === "1" ?
item && item.mode === "NUMBER" ?
<input id={"file_path" + 1} className="file_path_input" value={item&&item.code}/>
:""
:
""
}
</div>
</React.Fragment>

@ -112,10 +112,24 @@ class Teacherentry extends Component {
(
this.props.defaultActiveKey === "1" ?
<div className="ws100s xaxisreverseorder">
{
item.attendance_status?
(
item.attendance_status==="ABSENCE"?
<div className="qiandaobutton xiaoshou" onClick={()=>this.props.Signin(item.mode,item.id,item.attendance_code)}>
签到
</div>
:
item.attendance_status==="NORMAL"?
<div className="qiandaobutton" >
正常签到
</div>
:""
)
:
""
}
</div>
:
<div className="ws100s xaxisreverseorder">

@ -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,6 +35,12 @@ class Teaccomponent extends Component{
}
//截止
thisEnd=(attendance_id)=>{
let thiss=this
confirm({
title: '提示',
content: '确认截止此签到吗?',
onOk() {
const url = `/weapps/attendances/${attendance_id}/end.json`;
var data={
@ -46,17 +53,28 @@ 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) => {
//console.log(error);
})
},
onCancel() {
},
});
}
//删除
thisdelete=(attendance_id)=>{
let thiss=this
confirm({
title: '提示',
content: '确认删除此签到吗?',
onOk () {
const url = `/weapps/attendances/${attendance_id}.json`;
var data={
@ -65,24 +83,30 @@ class Teaccomponent extends Component{
.then((result) => {
if (result.data.status === 0) {
// try {
// this.props.showNotification(`删除成功`);
// 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) => {
//console.log(error);
})
},
onCancel() {
},
});
}
//学生签到
Signin=(attendance_mode,attendance_id,code)=>{
debugger
const url = `/weapps/course_member_attendances.json`;
var data={

@ -208,6 +208,7 @@
font-family:Microsoft YaHei;
font-weight:400;
color:#333333;
}
.progressivps{
width:200px;

@ -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 {
</Col>
</Row>
<div className={"backfff mt10"}>
<Table columns={columns} dataSource={member_attendances} pagination={false} loading={this.state.loading}/>
{
this.state.loading===true?
<div style={{
minHeight:"400px",
}}>
<LoadingSpin></LoadingSpin>
</div>
:
member_attendances&&member_attendances.length===0?
<div style={{
minHeight:"400px",
}}>
{/*<LoadingSpin></LoadingSpin>*/}
<NoneDatas></NoneDatas>
</div>
:
// loading={this.state.loading}
<Table columns={columns} dataSource={member_attendances} pagination={false} />
}
</div>
<div className="mb30 clearfix educontent mt40 intermediatecenter">
{
member_attendances&&member_attendances.length>0?
<Pagination showQuickJumper current={this.state.page} onChange={this.paginationonChange}
pageSize={this.state.limit}
total={this.state.members_count}></Pagination>
:""
}
</div>
</React.Fragment>

@ -72,6 +72,7 @@ class Signindetails extends Component{
{/* 列表+筛选 */}
<div>
<Signedinlist
mygetdatas={()=>this.mygetdatas()}
defaultActiveKey={this.props.defaultActiveKey}
switattendance_id={this.props.switattendance_id}
headdata={headdata}

@ -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();
}
}

Loading…
Cancel
Save