Merge branches 'dev_aliyun' and 'develop' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

chromesetting
杨树明 5 years ago
commit ec0375c7c0

@ -1,6 +1,6 @@
import React, {Component} from 'react';
import {Redirect} from 'react-router';
import {List, Typography, Tag, Modal, Radio, Checkbox, Table, Pagination,Upload,notification} from 'antd';
import {List, Typography, Tag, Modal, Radio, Checkbox, Table, Pagination,Upload,Button} from 'antd';
import { NoneData } from 'educoder'
import TPMRightSection from './component/TPMRightSection';
@ -85,6 +85,7 @@ class TPMDataset extends Component {
checked: false,
showmodel:false,
itemtypebool:false,
Buttonloading:false
}
}
@ -295,8 +296,12 @@ class TPMDataset extends Component {
handleChange = (info) => {
// console.log("handleChange123123");
// console.log(info);
// debugger
//debugger
this.setState({
Buttonloading:true
})
if(info.file.status == "done" || info.file.status == "uploading" || info.file.status === 'removed'){
let fileList = info.fileList;
this.setState({
fileList: appendFileSizeToUploadFileAll(fileList),
@ -309,7 +314,10 @@ class TPMDataset extends Component {
}else{
this.getdatas();
this.setState({
Buttonloading:false
})
// this.props.showNotification(`上传成功`);
}
}
}
@ -329,9 +337,13 @@ class TPMDataset extends Component {
showmodel:true,
tittest:info.file.response.message,
itemtypebool:itemtype>-1?true:itemtype<=-1?false:false,
Buttonloading:false
})
}else{
}else{
this.setState({
Buttonloading:false
})
}
}
@ -445,7 +457,12 @@ class TPMDataset extends Component {
showmodel: false,
})
}
ButtonloadinghandleChange=()=>{
// this.props.showNotification(`zhzzzzz`);
// this.setState({
// Buttonloading:true
// })
}
render() {
const {tpmLoading, shixun, user, match} = this.props;
const {columns, page, limit, selectedRowKeys,mylistansum,fileList,datalist,data_sets_count,loadingstate} = this.state;
@ -473,11 +490,16 @@ class TPMDataset extends Component {
beforeUpload: (file) => {
//上传前的操作
// console.log('beforeUpload', file.name);
const isLt150M = file.size / 1024 / 1024 < 150;
if (!isLt150M) {
this.props.showNotification('文件大小必须小于150MB!');
this.props.showNotification(`文件上传中`);
const isLt300M = file.size / 1024 / 1024 <= 300;
if (!isLt300M) {
this.setState({
Buttonloading:false
})
this.props.showNotification('文件大小必须小于等于300MB!');
}
return isLt150M;
return isLt300M;
},
};
// console.log("showmodelshowmodel");
@ -514,12 +536,20 @@ class TPMDataset extends Component {
.ant-upload-list{
display:none
}
.deletebuttom{
color: #fff !important;
}
.deletebuttom:hover{
color: #fff !important;
background: #29BD8B !important;
}
`
}
</style>
<div className="deletebuttom intermediatecenter "> <Upload {...uploadProps}><p className="deletebuttomtest" type="upload">
上传文件</p> </Upload></div>
<div className="intermediatecenter deletebuttom">
<Upload {...uploadProps}>
<Button className={"deletebuttom"} loading={this.state.Buttonloading} onClick={ this.ButtonloadinghandleChange}>{this.state.Buttonloading===true?"上传中":"上传文件"}</Button>
</Upload></div>
{
data_sets_count>0?
<div

@ -80,7 +80,7 @@
.deletebuttom{
width:85px;
height:30px;
background:#29BD8B;
background:#29BD8B !important;
border-radius:3px;
cursor:pointer
}

Loading…
Cancel
Save