From c7d18c89310e6efc878887257f2aec086e83e1ae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Thu, 27 Feb 2020 17:24:30 +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
---
.../Repository/RepositoryAddFileupload_file.js | 6 ++++--
.../tpm/shixunchild/Repository/Repositoryfile.js | 15 +++++++--------
2 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/public/react/src/modules/tpm/shixunchild/Repository/RepositoryAddFileupload_file.js b/public/react/src/modules/tpm/shixunchild/Repository/RepositoryAddFileupload_file.js
index ba8a80ba9..a06e9956d 100644
--- a/public/react/src/modules/tpm/shixunchild/Repository/RepositoryAddFileupload_file.js
+++ b/public/react/src/modules/tpm/shixunchild/Repository/RepositoryAddFileupload_file.js
@@ -46,7 +46,7 @@ class RepositoryAddFileupload_files extends Component {
fileList = fileList.map(file => {
if (file.response) {
if (file.response.status===0) {
- this.props.showNotification("上传成功")
+
}
}
return file;
@@ -142,7 +142,7 @@ class RepositoryAddFileupload_files extends Component {
// // },
// };
let matchpath =this.props.match.path;
-
+
let Repositoryflag ="";
let newdata;
@@ -178,6 +178,8 @@ class RepositoryAddFileupload_files extends Component {
this.props.showNotification("上传文件请先填写提交信息")
return false
}
+ console.log(file)
+ this.props.showNotification("上传成功")
},
};
diff --git a/public/react/src/modules/tpm/shixunchild/Repository/Repositoryfile.js b/public/react/src/modules/tpm/shixunchild/Repository/Repositoryfile.js
index 1721b7621..b0b8360d0 100644
--- a/public/react/src/modules/tpm/shixunchild/Repository/Repositoryfile.js
+++ b/public/react/src/modules/tpm/shixunchild/Repository/Repositoryfile.js
@@ -79,22 +79,21 @@ class Repositoryfile extends Component{
}
let ary=main;
let paths=path;
-
+ let mainpath;
this.setState({
selectpatharr:[],
})
+ mainpath=newpath;
if(paths===""&&type==="tree"){
- newpath=newpath;
- paths="";
if(main.length===0){
- ary.push({val:"根目录",path:""},{val:"/"+newpath,path:paths+newpath});
+ ary.push({val:"根目录",path:""},{val:"/"+mainpath,path:mainpath});
}else{
- ary.push({val:"/"+newpath,path:paths+newpath});
+ ary.push({val:"/"+mainpath,path:mainpath});
}
}else if(paths!=""&&type==="tree"){
newpath=paths+"/"+newpath;
- ary.push({val:"/"+newpath,path:paths+newpath});
+ ary.push({val:"/"+mainpath,path:mainpath});
}
axios.post(url,{
@@ -105,7 +104,7 @@ class Repositoryfile extends Component{
}else{
this.setState({
trees:response.data.trees,
- path:paths+newpath,
+ path:newpath,
main:ary,
// selectpath:""
})
@@ -220,7 +219,7 @@ class Repositoryfile extends Component{
{
main.length===0?"":main.map((item,key)=>{
return(
- this.goblakepath(item.path,key,item)}>{item.val}
+ this.goblakepath(item.path,key,item)}>{item.val}
)
})
}