chromesetting
杨树林 5 years ago
parent 843ac8aea6
commit 36533d76be

@ -75,7 +75,7 @@ class TPMDataset extends Component {
mylistansum:30, mylistansum:30,
collaboratorList:[], collaboratorList:[],
fileList:[], fileList:[],
fileListimg:[], fileListimgs:[],
file:null, file:null,
datalist:[], datalist:[],
data_sets_count:0, 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) => { paginationonChanges = (pageNumber) => {
// //console.log('Page: '); // //console.log('Page: ');
this.setState({ this.setState({
@ -264,25 +289,32 @@ 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;
// try {
// for(var list of fileList ){
// console.log(list)
// this.state.fileListimg.push(list);
// }
// }catch (e) {
//
// }
this.setState({ this.setState({
fileList: appendFileSizeToUploadFileAll(fileList), 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({ // this.props.showNotification(`上传文件成功`);
fileListimg:this.state.fileListimg,
}) }
this.getdatas();
}
} }
} }
@ -384,7 +416,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,fileListimg} = this.state; const {columns, page, limit, selectedRowKeys,mylistansum,fileList,datalist,data_sets_count,loadingstate} = this.state;
const rowSelection = { const rowSelection = {
selectedRowKeys, selectedRowKeys,
onChange: this.onSelectChange, onChange: this.onSelectChange,
@ -413,8 +445,6 @@ class TPMDataset extends Component {
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!');
@ -422,7 +452,6 @@ class TPMDataset extends Component {
return isLt150M; return isLt150M;
}, },
}; };
return ( return (
<React.Fragment> <React.Fragment>
<div className="tpmComment educontent clearfix mt30 mb80"> <div className="tpmComment educontent clearfix mt30 mb80">

Loading…
Cancel
Save