|
|
|
@ -163,8 +163,10 @@ class Testpapersettinghomepage extends Component{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
/// 确认是否下载
|
|
|
|
|
confirmysl(url){
|
|
|
|
|
axios.get(url).then((response) => {
|
|
|
|
|
confirmysl(url,params){
|
|
|
|
|
axios.get(url,{
|
|
|
|
|
params
|
|
|
|
|
}).then((response) => {
|
|
|
|
|
if(response.data.status&&response.data.status===-1){
|
|
|
|
|
|
|
|
|
|
}else if(response.data.status&&response.data.status===-2){
|
|
|
|
@ -218,6 +220,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,7 +239,13 @@ class Testpapersettinghomepage extends Component{
|
|
|
|
|
let {tab,visible,Commonheadofthetestpaper}=this.state;
|
|
|
|
|
const isAdmin =this.props.isAdmin();
|
|
|
|
|
const isStudent = this.props.isStudent();
|
|
|
|
|
|
|
|
|
|
// TODO
|
|
|
|
|
let params ={}
|
|
|
|
|
if(this.child!=undefined){
|
|
|
|
|
params =this.child._getRequestParams()!==undefined?this.child._getRequestParams():{};
|
|
|
|
|
}
|
|
|
|
|
// console.log("246");
|
|
|
|
|
// console.log(this.child);
|
|
|
|
|
return(
|
|
|
|
|
<div className="newMain clearfix ">
|
|
|
|
|
{/*<DownloadMessage*/}
|
|
|
|
@ -345,7 +354,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`,params)}>学生成绩</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 +409,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>
|
|
|
|
|