|
|
|
@ -28,7 +28,8 @@ class Repository extends Component {
|
|
|
|
|
evaluationvisible:false,
|
|
|
|
|
ischecke:false,
|
|
|
|
|
ischeckevalue:"",
|
|
|
|
|
trees:undefined
|
|
|
|
|
trees:undefined,
|
|
|
|
|
treesdelecttype:true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -137,6 +138,9 @@ class Repository extends Component {
|
|
|
|
|
}})
|
|
|
|
|
.then((response) => {
|
|
|
|
|
if(response.data.status == 0) {
|
|
|
|
|
this.setState({
|
|
|
|
|
treesdelecttype:false
|
|
|
|
|
})
|
|
|
|
|
this.props.showNotification("删除成功")
|
|
|
|
|
if(gototype===1){
|
|
|
|
|
if(this.state.trees.length>1){
|
|
|
|
@ -157,8 +161,10 @@ class Repository extends Component {
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
ischecke:false,
|
|
|
|
|
ischeckevalue:""
|
|
|
|
|
ischeckevalue:"",
|
|
|
|
|
treesdelecttype:true
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch(function (error) {
|
|
|
|
@ -185,7 +191,7 @@ class Repository extends Component {
|
|
|
|
|
};
|
|
|
|
|
render() {
|
|
|
|
|
let { match, author, git_url, lastest_commit,repositoryLoading, commits,pathArray , TPMRightSectionData } = this.props;
|
|
|
|
|
let{trees}= this.state;
|
|
|
|
|
let{trees,treesdelecttype}= this.state;
|
|
|
|
|
let matchpath =this.props.match.path;
|
|
|
|
|
let Repositoryflag ="";
|
|
|
|
|
|
|
|
|
@ -411,10 +417,9 @@ class Repository extends Component {
|
|
|
|
|
onSelect={this.onSelectDirectoryTree}
|
|
|
|
|
onCheck={this.onCheck}
|
|
|
|
|
>
|
|
|
|
|
{ trees === undefined ?"": trees === null || trees.length===0?"":trees.map((item, index) => {
|
|
|
|
|
{treesdelecttype===false || trees === undefined ?"": trees === null || trees.length===0?"":trees.map((item, index) => {
|
|
|
|
|
return (
|
|
|
|
|
<TreeNode disableCheckbox={this.state.ischeckevalue===item.name?false:this.state.ischecke?true:false} item={item} title={`${item.name}`} key={item.type==='tree'?"0-0":`0-0-${index}`} icon={item.type==='tree'?<i className="iconfont icon-xingzhuangjiehebeifen color-blue font-12" />:<i className="iconfont icon-xingzhuangjiehe color-blue font-12"/>} id={`file${index}`} key={index}>
|
|
|
|
|
<div className={"fr"}>x</div>
|
|
|
|
|
<TreeNode disableCheckbox={this.state.ischeckevalue===item.name?false:this.state.ischecke?true:item.type==='tree'?true:false} item={item} title={`${item.name}`} key={item.type==='tree'?"0-0":`0-0-${index}`} icon={item.type==='tree'?<i className="iconfont icon-xingzhuangjiehebeifen color-blue font-12" />:<i className="iconfont icon-xingzhuangjiehe color-blue font-12"/>} id={`file${index}`} key={index}>
|
|
|
|
|
</TreeNode>
|
|
|
|
|
)})}
|
|
|
|
|
</DirectoryTree>
|
|
|
|
|