diff --git a/src/forge/Merge/MessageCount.js b/src/forge/Merge/MessageCount.js
index 684e2674..97b06bc3 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{
+
this.prmerge()}>合并请求
取消
+
@@ -713,7 +737,7 @@ class MessageCount extends Component{
-
+
@@ -722,7 +746,9 @@ class MessageCount extends Component{
+
评论
+
diff --git a/src/forge/Merge/NewMerge.js b/src/forge/Merge/NewMerge.js
index 9d209337..d7e78dd6 100644
--- a/src/forge/Merge/NewMerge.js
+++ b/src/forge/Merge/NewMerge.js
@@ -1,6 +1,6 @@
import React , {Component} from 'react';
import { Link } from 'react-router-dom';
-import {Radio, Form,Menu,Dropdown,Input,Select,Table} from 'antd';
+import {Radio, Form,Menu,Dropdown,Input,Select,Table, Spin} from 'antd';
import axios from 'axios';
import UploadComponent from '../Upload/Index';
import { getImageUrl } from 'educoder';
@@ -144,6 +144,9 @@ class NewMerge extends Component{
//创建合并请求
submit=()=>{
+ this.setState({
+ isSpin: true
+ })
this.props.form.validateFieldsAndScroll((err, values) => {
if(!err){
const { projectsId } = this.props.match.params;
@@ -164,10 +167,16 @@ class NewMerge extends Component{
}).then(result=>{
if(result){
+ this.setState({
+ isSpin: false
+ })
this.props.history.push(`/projects/${projectsId}/merge`);
}
}).catch(error=>{
+ this.setState({
+ isSpin: false
+ })
console.log(error);
})
}
@@ -240,7 +249,7 @@ class NewMerge extends Component{
const { getFieldDecorator } = this.props.form;
const { projectsId } = this.props.match.params;
const { current_user } = this.props;
- const { issue_tag_ids , fixed_version_id ,assigned_to_id , data,titledata , desc } = this.state;
+ const { issue_tag_ids , fixed_version_id ,assigned_to_id , data,titledata , desc, isSpin } = this.state;
const columns=[{
@@ -355,7 +364,9 @@ class NewMerge extends Component{
- 创建合并请求
+
+ 创建合并请求
+
diff --git a/src/forge/Merge/UpdateMerge.js b/src/forge/Merge/UpdateMerge.js
index 92faffa7..519378f0 100644
--- a/src/forge/Merge/UpdateMerge.js
+++ b/src/forge/Merge/UpdateMerge.js
@@ -6,7 +6,7 @@ import Nav from '../Order/Nav';
import UploadComponent from '../Upload/Index';
import { getImageUrl } from 'educoder';
-import{ Modal , Form , Input , Select } from 'antd'
+import{ Modal , Form , Input , Select, Spin } from 'antd'
import MDEditor from '../../modules/tpm/challengesnew/tpm-md-editor';
@@ -45,7 +45,8 @@ class UpdateMerge extends Component{
textcount:"",
fileList:undefined,
get_attachments: undefined,
- desc:undefined
+ desc:undefined,
+ isSpin: false
}
}
@@ -190,7 +191,7 @@ class UpdateMerge extends Component{
const { projectsId , mergeId } = this.props.match.params;
const { getFieldDecorator } = this.props.form;
const { current_user } = this.props;
- const { issue_tag_ids , fixed_version_id , assigned_to_id , issue_chosen , subject, textcount,get_attachments } = this.state;
+ const { issue_tag_ids , fixed_version_id , assigned_to_id , issue_chosen , subject, textcount,get_attachments, isSpin } = this.state;
return(
@@ -221,8 +222,10 @@ class UpdateMerge extends Component{
""
}
+
保存
取消
+
diff --git a/src/forge/Order/Detail.js b/src/forge/Order/Detail.js
index 93c11075..57bfe88b 100644
--- a/src/forge/Order/Detail.js
+++ b/src/forge/Order/Detail.js
@@ -35,7 +35,9 @@ class Detail extends Component{
quillFlag:false,
// 点击放大的图片路径
imageUrl:undefined,
- visible:false
+ visible:false,
+ journal_spin: false,
+ edit_spin: false
}
}
@@ -78,13 +80,15 @@ class Detail extends Component{
//添加评论
addjournals=()=>{
const { quillValue } = this.state;
+ this.setState({
+ journal_spin: true
+ })
if(!quillValue){
this.setState({
quillFlag:true
})
return;
}
-
this.props.form.validateFieldsAndScroll((err, values) => {
if(!err){
const { data, page, limit, fileList } = this.state;
@@ -103,7 +107,8 @@ class Detail extends Component{
this.setState({
showFiles: false,
quillValue:'',
- quillFlag:false
+ quillFlag:false,
+ journal_spin: false
})
this.getjournalslist(page, limit);
}
@@ -174,6 +179,9 @@ class Detail extends Component{
updatedetail=(id)=>{
const { page , limit , countvalue } = this.state;
const {orderId} = this.props.match.params;
+ this.setState({
+ edit_spin: true
+ })
const url = `/issues/${orderId}/journals/${id}.json`;
axios.put(url,{
issue_id:orderId,
@@ -182,7 +190,8 @@ class Detail extends Component{
}).then(result=>{
if(result){
this.setState({
- isedit: undefined
+ isedit: undefined,
+ edit_spin: false
})
this.getjournalslist(page, limit);
}
@@ -337,7 +346,7 @@ class Detail extends Component{
render(){
const { projectsId , orderId } = this.props.match.params;
- const { data,journalsdata, page, limit, search_count, isSpin, isedit, showFiles , quillValue , quillFlag , countvalue , imageUrl , visible } = this.state;
+ const { data,journalsdata, page, limit, search_count, isSpin, isedit, showFiles , quillValue , quillFlag , countvalue , imageUrl , visible, journal_spin, edit_spin } = this.state;
const { current_user } = this.props;
const Paginations = (
@@ -408,8 +417,10 @@ class Detail extends Component{
{/*