|
|
|
@ -125,23 +125,17 @@ class studentsList extends Component{
|
|
|
|
|
isSpin:false,
|
|
|
|
|
DownloadType:false,
|
|
|
|
|
DownloadMessageval:undefined,
|
|
|
|
|
donwloading:false,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/// 确认是否下载
|
|
|
|
|
confirmysl(url){
|
|
|
|
|
this.setState({ donwloading: true })
|
|
|
|
|
axios.get(url).then((response) => {
|
|
|
|
|
if(response === undefined){
|
|
|
|
|
this.setState({ donwloading: false })
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if(response.data.status&&response.data.status===-1){
|
|
|
|
|
this.setState({ donwloading: false })
|
|
|
|
|
|
|
|
|
|
}else if(response.data.status&&response.data.status===-2){
|
|
|
|
|
this.setState({ donwloading: false })
|
|
|
|
|
|
|
|
|
|
if(response.data.message === "100"){
|
|
|
|
|
// 已超出文件导出的上限数量(100 ),建议:
|
|
|
|
|
|
|
|
|
@ -158,25 +152,19 @@ class studentsList extends Component{
|
|
|
|
|
}
|
|
|
|
|
}else {
|
|
|
|
|
this.props.showNotification(`正在下载中`);
|
|
|
|
|
// window.open("/api"+url, '_blank');
|
|
|
|
|
this.setState({ donwloading: true })
|
|
|
|
|
downloadFile({
|
|
|
|
|
url: url,
|
|
|
|
|
successCallback: (url) => {
|
|
|
|
|
console.log('successCallback')
|
|
|
|
|
this.setState({ donwloading: false })
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
failCallback: (responseHtml, url) => {
|
|
|
|
|
console.log('failCallback')
|
|
|
|
|
this.setState({ donwloading: false })
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
window.open("/api"+url, '_blank');
|
|
|
|
|
// downloadFile({
|
|
|
|
|
// url: url,
|
|
|
|
|
// successCallback: (url) => {
|
|
|
|
|
// console.log('successCallback')
|
|
|
|
|
// },
|
|
|
|
|
// failCallback: (responseHtml, url) => {
|
|
|
|
|
// console.log('failCallback')
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error)
|
|
|
|
|
this.setState({ donwloading: false })
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -615,23 +603,20 @@ class studentsList extends Component{
|
|
|
|
|
|
|
|
|
|
`}</style>
|
|
|
|
|
{ isAdmin &&
|
|
|
|
|
|
|
|
|
|
<li className="li_line drop_down fr color-blue font-16">
|
|
|
|
|
<Spin spinning={this.state.donwloading} >导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
|
|
|
|
|
导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
|
|
|
|
|
<ul className="drop_down_menu" style={{"right": "-20px", "left": "unset", "height": "auto"}}>
|
|
|
|
|
<li onClick={(i) => this.confirmysl(exportUrltwo)}><a
|
|
|
|
|
<li><a
|
|
|
|
|
onClick={(i) => this.confirmysl(exportUrltwo)}>课堂信息</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li onClick={(i) => this.confirmysl(exportUrlthree)}><a
|
|
|
|
|
<li><a
|
|
|
|
|
onClick={(i) => this.confirmysl(exportUrlthree)}>活跃度</a>
|
|
|
|
|
</li>
|
|
|
|
|
<li onClick={(i) => this.confirmysl(exportUrl)}><a
|
|
|
|
|
<li><a
|
|
|
|
|
onClick={(i) => this.confirmysl(exportUrl)}>总成绩</a>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</Spin>
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
{/*<WordsBtn style="blue" className="" onClick={(url)=>this.confirmysl(exportUrl)} >导出成绩</WordsBtn>*/}
|
|
|
|
|
{/* */}
|
|
|
|
|