|
|
|
@ -75,7 +75,7 @@ class TPMDataset extends Component {
|
|
|
|
|
mylistansum:30,
|
|
|
|
|
collaboratorList:[],
|
|
|
|
|
fileList:[],
|
|
|
|
|
fileListimg:[],
|
|
|
|
|
fileListimgs:[],
|
|
|
|
|
file:null,
|
|
|
|
|
datalist:[],
|
|
|
|
|
data_sets_count:0,
|
|
|
|
@ -226,6 +226,31 @@ class TPMDataset extends Component {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getdatasthree = (page,limit) => {
|
|
|
|
|
let id=this.props.match.params.shixunId;
|
|
|
|
|
|
|
|
|
|
let collaborators=`/shixuns/${id}/jupyter_data_sets.json`;
|
|
|
|
|
axios.get(collaborators,{params:{
|
|
|
|
|
page:page,
|
|
|
|
|
limit:limit,
|
|
|
|
|
}}).then((response)=> {
|
|
|
|
|
if(response.status===200){
|
|
|
|
|
if (response.data.status === 403||response.data.status === 401||response.data.status === 500) {
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}).catch((error)=>{
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
paginationonChanges = (pageNumber) => {
|
|
|
|
|
// //console.log('Page: ');
|
|
|
|
|
this.setState({
|
|
|
|
@ -264,25 +289,32 @@ class TPMDataset extends Component {
|
|
|
|
|
handleChange = (info) => {
|
|
|
|
|
if(info.file.status == "done" || info.file.status == "uploading" || info.file.status === 'removed'){
|
|
|
|
|
let fileList = info.fileList;
|
|
|
|
|
// try {
|
|
|
|
|
// for(var list of fileList ){
|
|
|
|
|
// console.log(list)
|
|
|
|
|
// this.state.fileListimg.push(list);
|
|
|
|
|
// }
|
|
|
|
|
// }catch (e) {
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
fileList: appendFileSizeToUploadFileAll(fileList),
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
if(info.file.status === 'done'){
|
|
|
|
|
console.log("handleChange");
|
|
|
|
|
console.log(info);
|
|
|
|
|
//done 成功就会调用这个方法
|
|
|
|
|
this.getdatas();
|
|
|
|
|
try {
|
|
|
|
|
// let datas=this.state.fileListimgs;
|
|
|
|
|
// for(var i=0;i<info.fileList.length;i++){
|
|
|
|
|
// datas.push(info.fileList[i].originFileObj);
|
|
|
|
|
// }
|
|
|
|
|
// this.setState({
|
|
|
|
|
// fileListimgs:datas,
|
|
|
|
|
// })
|
|
|
|
|
console.log("datasdatasdatasdatasdatas");
|
|
|
|
|
console.log(datas);
|
|
|
|
|
}catch (e) {
|
|
|
|
|
|
|
|
|
|
if(info.file.status === 'done'){
|
|
|
|
|
this.setState({
|
|
|
|
|
fileListimg:this.state.fileListimg,
|
|
|
|
|
})
|
|
|
|
|
this.getdatas();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// this.props.showNotification(`上传文件成功`);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -384,7 +416,7 @@ class TPMDataset extends Component {
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
const {tpmLoading, shixun, user, match} = this.props;
|
|
|
|
|
const {columns, page, limit, selectedRowKeys,mylistansum,fileList,datalist,data_sets_count,loadingstate,fileListimg} = this.state;
|
|
|
|
|
const {columns, page, limit, selectedRowKeys,mylistansum,fileList,datalist,data_sets_count,loadingstate} = this.state;
|
|
|
|
|
const rowSelection = {
|
|
|
|
|
selectedRowKeys,
|
|
|
|
|
onChange: this.onSelectChange,
|
|
|
|
@ -413,8 +445,6 @@ class TPMDataset extends Component {
|
|
|
|
|
beforeUpload: (file) => {
|
|
|
|
|
//上传前的操作
|
|
|
|
|
console.log('beforeUpload', file.name);
|
|
|
|
|
console.log("TPMDatasetTPMDatasetTPMDataset");
|
|
|
|
|
console.log(fileListimg);
|
|
|
|
|
const isLt150M = file.size / 1024 / 1024 < 150;
|
|
|
|
|
if (!isLt150M) {
|
|
|
|
|
this.props.showNotification('文件大小必须小于150MB!');
|
|
|
|
@ -422,7 +452,6 @@ class TPMDataset extends Component {
|
|
|
|
|
return isLt150M;
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<React.Fragment>
|
|
|
|
|
<div className="tpmComment educontent clearfix mt30 mb80">
|
|
|
|
|