Merge remote-tracking branch 'origin/dev_jupyter' into dev_jupyter

chromesetting
杨树明 5 years ago
commit 11c908099a

@ -326,8 +326,8 @@ module.exports = {
comments: false comments: false
}, },
compress: { compress: {
drop_debugger: true, drop_debugger: false,
drop_console: true drop_console: false
} }
} }
}), }),

@ -75,6 +75,7 @@ class TPMDataset extends Component {
mylistansum:30, mylistansum:30,
collaboratorList:[], collaboratorList:[],
fileList:[], fileList:[],
fileListimg:[],
file:null, file:null,
datalist:[], datalist:[],
data_sets_count:0, data_sets_count:0,
@ -263,19 +264,19 @@ class TPMDataset extends Component {
handleChange = (info) => { handleChange = (info) => {
if(info.file.status == "done" || info.file.status == "uploading" || info.file.status === 'removed'){ if(info.file.status == "done" || info.file.status == "uploading" || info.file.status === 'removed'){
let fileList = info.fileList; let fileList = info.fileList;
if(info.file.status == "done"){
// for(var list of fileList ){ for(var list of fileList ){
// console.log(list) console.log(list)
// } this.state.fileListimg.push(list);
this.setState({ }
fileList: appendFileSizeToUploadFileAll(fileList), this.setState({
}); fileList: appendFileSizeToUploadFileAll(fileList),
if(info.file.status === 'done'){ fileListimg:this.state.fileListimg,
//done 成功就会调用这个方法 });
this.getdatas(); if(info.file.status === 'done'){
// this.props.showNotification(`上传文件成功`); this.getdatas();
}
} }
} }
} }
@ -377,7 +378,7 @@ class TPMDataset extends Component {
render() { render() {
const {tpmLoading, shixun, user, match} = this.props; const {tpmLoading, shixun, user, match} = this.props;
const {columns, page, limit, selectedRowKeys,mylistansum,fileList,datalist,data_sets_count,loadingstate} = this.state; const {columns, page, limit, selectedRowKeys,mylistansum,fileList,datalist,data_sets_count,loadingstate,fileListimg} = this.state;
const rowSelection = { const rowSelection = {
selectedRowKeys, selectedRowKeys,
onChange: this.onSelectChange, onChange: this.onSelectChange,
@ -400,10 +401,14 @@ class TPMDataset extends Component {
// showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。 // showUploadList={false},然后外部拿到 fileList 数组自行渲染列表。
// showUploadList: false, // showUploadList: false,
action: `${getUploadActionUrl()}`, action: `${getUploadActionUrl()}`,
showUploadList:false,
onChange: this.handleChange, onChange: this.handleChange,
onRemove: this.onAttachmentRemove, onRemove: this.onAttachmentRemove,
beforeUpload: (file) => { beforeUpload: (file) => {
//上传前的操作
console.log('beforeUpload', file.name); console.log('beforeUpload', file.name);
console.log("TPMDatasetTPMDatasetTPMDataset");
console.log(fileListimg);
const isLt150M = file.size / 1024 / 1024 < 150; const isLt150M = file.size / 1024 / 1024 < 150;
if (!isLt150M) { if (!isLt150M) {
this.props.showNotification('文件大小必须小于150MB!'); this.props.showNotification('文件大小必须小于150MB!');

Loading…
Cancel
Save