|
|
|
@ -891,37 +891,34 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
}
|
|
|
|
|
/// 确认是否下载
|
|
|
|
|
confirmysl(url){
|
|
|
|
|
axios.get(url).then((response) => {
|
|
|
|
|
if(response.data.status&&response.data.status===-1){
|
|
|
|
|
|
|
|
|
|
}else if(response.data.status&&response.data.status===-2){
|
|
|
|
|
if(response.data.messages === "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');
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error)
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
Downloadcal=()=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
DownloadType:false,
|
|
|
|
|
DownloadMessageval:undefined
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
this.refs.DownloadMessage.confirmysl(url);
|
|
|
|
|
|
|
|
|
|
// axios.get(url).then((response) => {
|
|
|
|
|
// if(response.data.status&&response.data.status===-1){
|
|
|
|
|
|
|
|
|
|
// }else if(response.data.status&&response.data.status===-2){
|
|
|
|
|
// if(response.data.messages === "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');
|
|
|
|
|
// }
|
|
|
|
|
// }).catch((error) => {
|
|
|
|
|
// console.log(error)
|
|
|
|
|
// });
|
|
|
|
|
}
|
|
|
|
|
render(){
|
|
|
|
|
const { getFieldDecorator } = this.props.form;
|
|
|
|
@ -998,10 +995,8 @@ class GraduationTaskssettingapp extends Component{
|
|
|
|
|
{/*skipTop={this.skipTop}*/}
|
|
|
|
|
{/*/>*/}
|
|
|
|
|
<DownloadMessage
|
|
|
|
|
{...this.props}
|
|
|
|
|
value={this.state.DownloadMessageval}
|
|
|
|
|
modalCancel={this.Downloadcal}
|
|
|
|
|
modalsType={this.state.DownloadType}
|
|
|
|
|
{...this.props}
|
|
|
|
|
ref="DownloadMessage"
|
|
|
|
|
/>
|
|
|
|
|
<HomeworkModal
|
|
|
|
|
starttimes={this.state.starttimes}
|
|
|
|
|