|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
import React,{ Component } from "react";
|
|
|
|
|
import {Checkbox,Input,Table, Pagination,Menu} from "antd";
|
|
|
|
|
import {Link,NavLink} from 'react-router-dom';
|
|
|
|
|
import { WordsBtn ,ActionBtn} from 'educoder';
|
|
|
|
|
import { WordsBtn ,ActionBtn,queryString} from 'educoder';
|
|
|
|
|
import CoursesListType from '../coursesPublic/CoursesListType';
|
|
|
|
|
import '../css/members.css';
|
|
|
|
|
import '../css/busyWork.css';
|
|
|
|
@ -19,7 +19,7 @@ import Ecerciseallbackagain from './Ecerciseallbackagain';
|
|
|
|
|
|
|
|
|
|
const polls_status={1:"未发布",2:"提交中",3:"已截止",4:"已结束"}
|
|
|
|
|
const start_Value={0:"继续答题",1:"查看答题",2:"开始答题"}
|
|
|
|
|
|
|
|
|
|
const qs = require('qs');
|
|
|
|
|
//试卷主要设置页面
|
|
|
|
|
class Testpapersettinghomepage extends Component{
|
|
|
|
|
constructor(props) {
|
|
|
|
@ -163,8 +163,17 @@ class Testpapersettinghomepage extends Component{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
/// 确认是否下载
|
|
|
|
|
confirmysl(url){
|
|
|
|
|
axios.get(url).then((response) => {
|
|
|
|
|
confirmysl(url,child){
|
|
|
|
|
let params ={}
|
|
|
|
|
if(child!=undefined){
|
|
|
|
|
params =child._getRequestParams()!==undefined?child._getRequestParams():{};
|
|
|
|
|
}
|
|
|
|
|
console.log("170");
|
|
|
|
|
console.log(params);
|
|
|
|
|
axios.get(url+`?${queryString.stringify(params)}`+ '&export=true' ).then((response) => {
|
|
|
|
|
if(response===undefined){
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if(response.data.status&&response.data.status===-1){
|
|
|
|
|
|
|
|
|
|
}else if(response.data.status&&response.data.status===-2){
|
|
|
|
@ -184,7 +193,7 @@ class Testpapersettinghomepage extends Component{
|
|
|
|
|
}
|
|
|
|
|
}else {
|
|
|
|
|
this.props.showNotification(`正在下载中`);
|
|
|
|
|
window.open("/api"+url, '_blank');
|
|
|
|
|
window.open("/api"+url+`?${queryString.stringify(params)}`, '_blank');
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error)
|
|
|
|
@ -218,6 +227,7 @@ class Testpapersettinghomepage extends Component{
|
|
|
|
|
// DownloadMessageval:undefined
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
bindRef = ref => { this.child = ref };
|
|
|
|
|
goback=()=>{
|
|
|
|
|
// let {datalist}=this.state;
|
|
|
|
|
// let courseId=this.props.match.params.coursesId;
|
|
|
|
@ -236,6 +246,7 @@ class Testpapersettinghomepage extends Component{
|
|
|
|
|
let {tab,visible,Commonheadofthetestpaper}=this.state;
|
|
|
|
|
const isAdmin =this.props.isAdmin();
|
|
|
|
|
const isStudent = this.props.isStudent();
|
|
|
|
|
// TODO
|
|
|
|
|
|
|
|
|
|
return(
|
|
|
|
|
<div className="newMain clearfix ">
|
|
|
|
@ -345,7 +356,7 @@ class Testpapersettinghomepage extends Component{
|
|
|
|
|
{isAdmin === true? <li className="li_line drop_down fr color-blue font-15" style={{"paddingLeft":"0px"}}>
|
|
|
|
|
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
|
|
|
|
|
<ul className="drop_down_menu" style={{"right":"-34px","left":"unset","height":"auto"}}>
|
|
|
|
|
<li><a onClick={()=>this.confirmysl(`/exercises/${this.props.match.params.Id}/exercise_lists.xlsx`)}>学生成绩</a></li>
|
|
|
|
|
<li><a onClick={()=>this.confirmysl(`/exercises/${this.props.match.params.Id}/exercise_lists.xlsx`,this.child)}>学生成绩</a></li>
|
|
|
|
|
{/*<li><a onClick={()=>this.confirmysl(`/exercises/${this.props.match.params.Id}/export_exercise`)} >空白试卷</a></li>*/}
|
|
|
|
|
{/*<li><a onClick={()=>this.confirmysl(`/zip/export_exercises?exercise_id=${this.props.match.params.Id}${this.state.groupyslsval===null||this.state.groupyslsval===undefined?null:this.state.groupyslsval}`)}>学生答题试卷</a></li>*/}
|
|
|
|
|
</ul>
|
|
|
|
@ -400,22 +411,22 @@ class Testpapersettinghomepage extends Component{
|
|
|
|
|
/>
|
|
|
|
|
{
|
|
|
|
|
// 教师列表
|
|
|
|
|
parseInt(tab[0])==0 && <Studentshavecompletedthelist {...this.props} {...this.state} setcourse_groupysls={(value)=>this.setcourse_groupysls(value)} current_status = {this.state.current_status}></Studentshavecompletedthelist>
|
|
|
|
|
parseInt(tab[0])==0 && <Studentshavecompletedthelist {...this.props} {...this.state} triggerRef={this.bindRef} setcourse_groupysls={(value)=>this.setcourse_groupysls(value)} current_status = {this.state.current_status}></Studentshavecompletedthelist>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{/*统计结果*/}
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
parseInt(tab[0])==1 && <Exercisestatisticalresult {...this.props} {...this.state}></Exercisestatisticalresult>
|
|
|
|
|
parseInt(tab[0])==1 && <Exercisestatisticalresult {...this.props} {...this.state} triggerRef={this.bindRef}></Exercisestatisticalresult>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
parseInt(tab[0])==2 && <ExerciseDisplay {...this.props} {...this.state}></ExerciseDisplay>
|
|
|
|
|
parseInt(tab[0])==2 && <ExerciseDisplay {...this.props} {...this.state} triggerRef={this.bindRef}></ExerciseDisplay>
|
|
|
|
|
}
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
parseInt(tab[0])==3 && <WrappedExercisesetting {...this.props} {...this.state} ></WrappedExercisesetting>
|
|
|
|
|
parseInt(tab[0])==3 && <WrappedExercisesetting {...this.props} {...this.state} triggerRef={this.bindRef}></WrappedExercisesetting>
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|