|
|
|
@ -311,7 +311,9 @@ class TPMDataset extends Component {
|
|
|
|
|
//done 成功就会调用这个方法
|
|
|
|
|
if(info.file.response){
|
|
|
|
|
if(info.file.response.status===-1||info.file.response.status==="-1"){
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
Buttonloading:false
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.getdatas();
|
|
|
|
|
this.setState({
|
|
|
|
@ -320,6 +322,10 @@ class TPMDataset extends Component {
|
|
|
|
|
// this.props.showNotification(`上传成功`);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
|
Buttonloading:false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(info.file.response){
|
|
|
|
@ -459,9 +465,9 @@ class TPMDataset extends Component {
|
|
|
|
|
}
|
|
|
|
|
ButtonloadinghandleChange=()=>{
|
|
|
|
|
// this.props.showNotification(`zhzzzzz`);
|
|
|
|
|
// this.setState({
|
|
|
|
|
// Buttonloading:true
|
|
|
|
|
// })
|
|
|
|
|
this.setState({
|
|
|
|
|
Buttonloading:false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
render() {
|
|
|
|
|
const {tpmLoading, shixun, user, match} = this.props;
|
|
|
|
@ -490,16 +496,14 @@ class TPMDataset extends Component {
|
|
|
|
|
beforeUpload: (file) => {
|
|
|
|
|
//上传前的操作
|
|
|
|
|
// console.log('beforeUpload', file.name);
|
|
|
|
|
this.props.showNotification(`文件上传中`);
|
|
|
|
|
const isLt300M = file.size / 1024 / 1024 <= 300;
|
|
|
|
|
// this.props.showNotification(`文件上传中`);
|
|
|
|
|
const isLt400M = file.size / 1024 / 1024 <= 400;
|
|
|
|
|
|
|
|
|
|
if (!isLt300M) {
|
|
|
|
|
this.setState({
|
|
|
|
|
Buttonloading:false
|
|
|
|
|
})
|
|
|
|
|
this.props.showNotification('文件大小必须小于等于300MB!');
|
|
|
|
|
if (!isLt400M) {
|
|
|
|
|
this.ButtonloadinghandleChange
|
|
|
|
|
this.props.showNotification('文件大小必须小于等于400MB!');
|
|
|
|
|
}
|
|
|
|
|
return isLt300M;
|
|
|
|
|
return isLt400M;
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
// console.log("showmodelshowmodel");
|
|
|
|
@ -548,7 +552,7 @@ class TPMDataset extends Component {
|
|
|
|
|
</style>
|
|
|
|
|
<div className="intermediatecenter deletebuttom">
|
|
|
|
|
<Upload {...uploadProps}>
|
|
|
|
|
<Button className={"deletebuttom"} loading={this.state.Buttonloading} onClick={ this.ButtonloadinghandleChange}>{this.state.Buttonloading===true?"上传中":"上传文件"}</Button>
|
|
|
|
|
<Button className={"deletebuttom"} loading={this.state.Buttonloading}>{this.state.Buttonloading===true?"上传中":"上传文件"}</Button>
|
|
|
|
|
</Upload></div>
|
|
|
|
|
{
|
|
|
|
|
data_sets_count>0?
|
|
|
|
|