|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
import React,{ Component } from "react";
|
|
|
|
|
import {Checkbox,Input,Table, Pagination,Menu} from "antd";
|
|
|
|
|
import {Checkbox,Input,Table, Pagination,Menu,Spin} from "antd";
|
|
|
|
|
import {Link,NavLink} from 'react-router-dom';
|
|
|
|
|
import { WordsBtn ,ActionBtn,queryString} from 'educoder';
|
|
|
|
|
import { WordsBtn ,ActionBtn,queryString,downloadFile} from 'educoder';
|
|
|
|
|
import CoursesListType from '../coursesPublic/CoursesListType';
|
|
|
|
|
import '../css/members.css';
|
|
|
|
|
import '../css/busyWork.css';
|
|
|
|
@ -33,6 +33,7 @@ class Testpapersettinghomepage extends Component{
|
|
|
|
|
current_status:undefined,
|
|
|
|
|
DownloadType:false,
|
|
|
|
|
DownloadMessageval:undefined,
|
|
|
|
|
donwloading:false,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//切换tab
|
|
|
|
@ -192,8 +193,21 @@ class Testpapersettinghomepage extends Component{
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}else {
|
|
|
|
|
this.setState({ donwloading: true })
|
|
|
|
|
downloadFile({
|
|
|
|
|
url: url+`?${queryString.stringify(params)}`+ '&export=true',
|
|
|
|
|
successCallback: (url) => {
|
|
|
|
|
this.setState({ donwloading: false });
|
|
|
|
|
console.log('successCallback')
|
|
|
|
|
},
|
|
|
|
|
failCallback: (responseHtml, url) => {
|
|
|
|
|
this.setState({ donwloading: false });
|
|
|
|
|
console.log('failCallback')
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.props.showNotification(`正在下载中`);
|
|
|
|
|
window.open("/api"+url+`?${queryString.stringify(params)}`+ '&export=true', '_blank');
|
|
|
|
|
|
|
|
|
|
// window.open("/api"+url+`?${queryString.stringify(params)}`+ '&export=true', '_blank');
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error)
|
|
|
|
@ -353,14 +367,14 @@ class Testpapersettinghomepage extends Component{
|
|
|
|
|
`}
|
|
|
|
|
</style>
|
|
|
|
|
<div className={"studentList_operation_ul mt23"}>
|
|
|
|
|
{isAdmin === true? <li className="li_line drop_down fr color-blue font-15" style={{"paddingLeft":"0px"}}>
|
|
|
|
|
{isAdmin === true? <Spin spinning={this.state.donwloading} style={{ }}><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`,this.child)}>学生成绩</a></li>
|
|
|
|
|
<li><a onClick={()=>this.confirmysl(`/exercises/${this.props.match.params.Id}/export_exercise`,this.child)} >空白试卷</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>
|
|
|
|
|
</li>:""}
|
|
|
|
|
</li></Spin>:""}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|