|
|
|
@ -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={
|
|
|
|
|
|
|
|
|
|