|
|
@ -32,11 +32,42 @@ class CompetitionContents extends Component{
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
derivefun=(url)=>{
|
|
|
|
|
|
|
|
axios.get(url + '&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){
|
|
|
|
|
|
|
|
// if(response.data.message === "100"){
|
|
|
|
|
|
|
|
// // 已超出文件导出的上限数量(100 ),建议:
|
|
|
|
|
|
|
|
//
|
|
|
|
|
|
|
|
// this.setState({
|
|
|
|
|
|
|
|
// DownloadType:true,
|
|
|
|
|
|
|
|
// DownloadMessageval:100
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// }else {
|
|
|
|
|
|
|
|
// //因附件资料超过500M
|
|
|
|
|
|
|
|
// this.setState({
|
|
|
|
|
|
|
|
// DownloadType:true,
|
|
|
|
|
|
|
|
// DownloadMessageval:500
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
}else {
|
|
|
|
|
|
|
|
// this.props.showNotification(`正在下载中`);
|
|
|
|
|
|
|
|
// window.open("/api"+url, '_blank');
|
|
|
|
|
|
|
|
this.props.slowDownload(url);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
|
|
|
console.log(error)
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
render() {
|
|
|
|
render() {
|
|
|
|
const operations = <div>
|
|
|
|
const operations = <div>
|
|
|
|
<Button className={"fr"} type="primary" ghost onClick={()=>this.props.Competitionedit()}>编辑</Button>
|
|
|
|
<Button className={"fr"} type="primary" ghost onClick={()=>this.props.Competitionedit()}>编辑</Button>
|
|
|
|
<Button className={"fr mr20"} type="primary" ghost>
|
|
|
|
<Button className={"fr mr20"} type="primary" ghost>
|
|
|
|
<a href={`/competitions/${this.props.match.params.identifier}/charts.xlsx`}>导出</a>
|
|
|
|
<a onClick={()=>this.derivefun(`/competitions/${this.props.match.params.identifier}/charts.xlsx`)}>导出</a>
|
|
|
|
</Button>
|
|
|
|
</Button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
const columns = [
|
|
|
|
const columns = [
|
|
|
|