Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_aliyun_beta
caicai8 6 years ago
commit 570035af4b

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

@ -2123,7 +2123,7 @@ class PollNew extends Component {
//最小值 //最小值
HandleGradationGroupChangee = (value, index, max, length) => { HandleGradationGroupChangee = (value, index, max, length) => {
// debugger
var minbool = false; var minbool = false;
var maxbool = false; var maxbool = false;
let arr = this.state.adddom; let arr = this.state.adddom;

Loading…
Cancel
Save