dev_new_shixunsrepository
杨树明 5 years ago
parent 5aaa47c3c5
commit a3781ec3ea

@ -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("上传成功")
},
};

@ -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(
<a className="f14 fb" onClick={()=>this.goblakepath(item.path,key,item)}>{item.val}</a>
<a className="f14 fb" key={key} onClick={()=>this.goblakepath(item.path,key,item)}>{item.val}</a>
)
})
}

Loading…
Cancel
Save