From 0f67014fb7168767da26b1d095ef6d685759332d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Wed, 11 Dec 2019 12:20:50 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/tpm/TPMDataset.js | 53 +++++++++++++++++++--- 1 file changed, 47 insertions(+), 6 deletions(-) diff --git a/public/react/src/modules/tpm/TPMDataset.js b/public/react/src/modules/tpm/TPMDataset.js index 81803ff1d..21bfb2f96 100644 --- a/public/react/src/modules/tpm/TPMDataset.js +++ b/public/react/src/modules/tpm/TPMDataset.js @@ -71,7 +71,7 @@ class TPMDataset extends Component { }, ], page: 1, - limit: 5, + limit: 10, selectedRowKeys: [], mylistansum:30, collaboratorList:[], @@ -150,6 +150,44 @@ class TPMDataset extends Component { } + getdatastwo = (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{ + let datalists=[]; + for(let i=0;i{ + console.log(error) + }); + + } + showModal = (id, status) => { }; @@ -166,6 +204,7 @@ class TPMDataset extends Component { this.setState({ page: pageNumber, }) + this.getdatastwo(pageNumber,10); } onSelectChange = (selectedRowKeys, selectedRows) => { console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows); @@ -233,10 +272,12 @@ class TPMDataset extends Component { } deleteRemovedata(){ + debugger console.log("删除"); + console.log(this.state.selectedRowKeysdata); const url = `/attachements/destroy_files.json`; axios.delete(url, { - id:this.state.mydata, + id:this.state.selectedRowKeysdata, }) .then((response) => { if (response.data) { @@ -374,7 +415,7 @@ class TPMDataset extends Component { 上传文件

{ - mylistansum>0? + data_sets_count>0?
0 ? "deletebutomtextcode intermediatecenter mr21" : "deletebutom intermediatecenter mr21"} onClick={()=>this.deleteRemovedata()}>

删除

@@ -422,7 +463,7 @@ class TPMDataset extends Component { border-right: 1px solid #eeeeee; } `} - {mylistansum===0? + {data_sets_count===0?