diff --git a/src/forge/Merge/MessageCount.js b/src/forge/Merge/MessageCount.js index 684e2674c..97b06bc3e 100644 --- a/src/forge/Merge/MessageCount.js +++ b/src/forge/Merge/MessageCount.js @@ -50,7 +50,10 @@ class MessageCount extends Component{ fixed_version_id: undefined, assigned_to_id: undefined, imageUrl:undefined, - visible:false + visible:false, + SpinMerge: false, + journal_spin: false, + edit_spin: false } } @@ -102,6 +105,9 @@ class MessageCount extends Component{ //添加评论 addjournals=()=>{ const { data, page, limit, fileList , commentsContent } = this.state; + this.setState({ + journal_spin: true + }) if(!commentsContent){ this.setState({ quillFlag:true @@ -125,7 +131,8 @@ class MessageCount extends Component{ this.setState({ showFiles: false, quillFlag:false, - commentsContent:'' + commentsContent:'', + journal_spin: false }) this.getjournalslist(page, limit); this.props.showNotification("评论成功!"); @@ -182,6 +189,9 @@ class MessageCount extends Component{ //合并请求 prmerge=()=>{ + this.setState({ + SpinMerge: true + }) const {projectsId} = this.props.match.params; const {data,title,body,mergekey} = this.state; const url = `/projects/${projectsId}/pull_requests/${data.pull_request.id}/pr_merge.json`; @@ -194,8 +204,14 @@ class MessageCount extends Component{ }).then(result=>{ if(result){ this.getDetail(); + this.setState({ + SpinMerge: false + }) } }).catch(error=>{ + this.setState({ + SpinMerge: false + }) console.log(error); }) } @@ -203,6 +219,9 @@ class MessageCount extends Component{ //修改评论 updatedetail=(id)=>{ // console.log("updtedetail", this.state) + this.setState({ + edit_spin: true + }) const {page, limit,data } = this.state; const {orderId} = this.props.match.params; const url = `/issues/${data.issue.id}/journals/${id}.json`; @@ -213,7 +232,8 @@ class MessageCount extends Component{ }).then(result=>{ if(result){ this.setState({ - isedit: undefined + isedit: undefined, + edit_spin: false }) this.getjournalslist(page, limit); } @@ -458,7 +478,7 @@ class MessageCount extends Component{ render(){ const { projectsId,mergeId } = this.props.match.params; - const { data,journalsdata, page, limit, search_count, isSpin, isedit, showFiles , commentsContent , quillFlag, editMerge, issue_tag_ids, issue_chosen,fixed_version_id,assigned_to_id , visible , imageUrl } = this.state; + const { data,journalsdata, page, limit, search_count, isSpin, isedit, showFiles , commentsContent , quillFlag, editMerge, issue_tag_ids, issue_chosen,fixed_version_id,assigned_to_id , visible , imageUrl, SpinMerge, journal_spin, edit_spin } = this.state; const { getFieldDecorator } = this.props.form; const { current_user } = this.props; const url = this.props.history.location.pathname; @@ -508,8 +528,10 @@ class MessageCount extends Component{ )}

- 保存 - 取消 + + 保存 + 取消 +

@@ -690,8 +712,10 @@ class MessageCount extends Component{