|
|
|
@ -39,10 +39,15 @@ class Teaccomponent extends Component{
|
|
|
|
|
axios.post(url, data)
|
|
|
|
|
.then((result) => {
|
|
|
|
|
if (result.data.status === 0) {
|
|
|
|
|
// this.props.showNotification(`组卷成功`);
|
|
|
|
|
// console.log(result.data.exam_id);
|
|
|
|
|
//本来调试卷库首页的
|
|
|
|
|
// try {
|
|
|
|
|
// this.props.showNotification(`截止成功`);
|
|
|
|
|
// }catch (e) {
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
this.props.getsetdatas();
|
|
|
|
|
}else{
|
|
|
|
|
this.props.showNotification(result.data.message);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
//console.log(error);
|
|
|
|
@ -57,10 +62,16 @@ class Teaccomponent extends Component{
|
|
|
|
|
axios.delete(url, data)
|
|
|
|
|
.then((result) => {
|
|
|
|
|
if (result.data.status === 0) {
|
|
|
|
|
// this.props.showNotification(`组卷成功`);
|
|
|
|
|
// console.log(result.data.exam_id);
|
|
|
|
|
//本来调试卷库首页的
|
|
|
|
|
// try {
|
|
|
|
|
// this.props.showNotification(`删除成功`);
|
|
|
|
|
// }catch (e) {
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
this.props.getsetdatas();
|
|
|
|
|
}else{
|
|
|
|
|
this.props.showNotification(result.data.message);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
//console.log(error);
|
|
|
|
@ -68,7 +79,50 @@ class Teaccomponent extends Component{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//学生签到
|
|
|
|
|
Signin=(type,)=>{
|
|
|
|
|
Signin=(attendance_mode,attendance_id,code)=>{
|
|
|
|
|
const url = `/weapps/course_member_attendances.json`;
|
|
|
|
|
var data={
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if(attendance_mode==="QUICK"){
|
|
|
|
|
//快捷签到
|
|
|
|
|
data={
|
|
|
|
|
attendance_mode:"QUICK",
|
|
|
|
|
attendance_id:attendance_id,
|
|
|
|
|
}
|
|
|
|
|
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) => {
|
|
|
|
|
})
|
|
|
|
|
}else if(attendance_mode==="QRCODE"){
|
|
|
|
|
//二维码签到
|
|
|
|
|
data={
|
|
|
|
|
attendance_mode:"QRCODE",
|
|
|
|
|
attendance_id:attendance_id,
|
|
|
|
|
code:code,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}else if(attendance_mode==="NUMBER"){
|
|
|
|
|
//数字签到
|
|
|
|
|
data={
|
|
|
|
|
attendance_mode:"NUMBER",
|
|
|
|
|
attendance_id:attendance_id,
|
|
|
|
|
code:code,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|