修改提交时的loading效果

This commit is contained in:
sylor_huang@126.com 2020-04-30 10:34:06 +08:00
parent 54df0872f4
commit f5be97bb89
11 changed files with 165 additions and 49 deletions

View File

@ -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{
)}
</Form.Item>
<p className="clearfix mt15 text-right">
<a className="topWrapper_btn fr" type="submit" style={{marginLeft: 5}} onClick={this.handleSubmit}>保存</a>
<a className="a_btn cancel_btn fr" onClick={this.cancelSubmit}>取消</a>
<Spin spinning={edit_spin}>
<a className="topWrapper_btn fr" type="submit" style={{marginLeft: 5}} onClick={this.handleSubmit}>保存</a>
<a className="a_btn cancel_btn fr" onClick={this.cancelSubmit}>取消</a>
</Spin>
</p>
</Form>
</div>
@ -690,8 +712,10 @@ class MessageCount extends Component{
<TextArea placeholder="请输入合并描述..." style={{height:"170px",marginTop:20}} value={this.state.body} onChange={this.changbodypr} />
</div>
<p className="clearfix mt15" style={{display:this.state.buttonshow}}>
<Spin spinning={SpinMerge}>
<a className="topWrapper_btn " type="submit" onClick={()=>this.prmerge()}>合并请求</a>
<a className="a_btn cancel_btn " type="submit" style={{marginLeft:15}} onClick={this.nonemerge}>取消</a>
</Spin>
</p>
</div>
</div>
@ -713,7 +737,7 @@ class MessageCount extends Component{
<img className="user_img" src={getImageUrl(`images/${current_user && current_user.image_url}`)} alt=""/>
</Link>
<div className="new_context">
<div className="quillContent">
<div className="quillContent" style={{marginBottom:"20px"}}>
<MDEditor placeholder={'请输入评论内容...'} height={200}
mdID={`orderdetail-add-description`} initValue={commentsContent} onChange={this.changeComments} ></MDEditor>
<p className="quillFlag">
@ -722,7 +746,9 @@ class MessageCount extends Component{
</div>
<UploadComponent load={this.UploadFunc} isComplete={showFiles}></UploadComponent>
<p className="clearfix mt15">
<Spin spinning={journal_spin}>
<a className="topWrapper_btn fr" type="submit" onClick={this.addjournals}>评论</a>
</Spin>
</p>
</div>
</div>

View File

@ -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{
<UploadComponent load={this.UploadFunc} isComplete={true} ></UploadComponent>
<p className="clearfix mt15">
<a className="topWrapper_btn fr" type="submit" onClick={this.submit}>创建合并请求</a>
<Spin spinning={isSpin}>
<a className="topWrapper_btn fr" type="submit" onClick={this.submit}>创建合并请求</a>
</Spin>
</p>
</div>
</div>

View File

@ -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(
<div className="main">
<div>
@ -221,8 +222,10 @@ class UpdateMerge extends Component{
""
}
<p className="clearfix mt15 text-right">
<Spin spinning={isSpin}>
<a className="topWrapper_btn fr" type="submit" style={{marginLeft:5}} onClick={this.handleSubmit}>保存</a>
<Link to={`/projects/${projectsId}/merge/${mergeId}/Messagecount`} className="a_btn cancel_btn fr">取消</Link>
</Spin>
</p>
</div>
</div>

View File

@ -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 = (
<React.Fragment>
@ -408,8 +417,10 @@ class Detail extends Component{
</div>
{/*<TextArea style={{height:"200px"}} value={this.state.countvalue} onChange={this.changmodelname}/>*/}
<p className="clearfix mt15">
<a className="topWrapper_btn fr" type="submit" onClick={()=>this.updatedetail(item.id)}>保存</a>
<a className="a_btn cancel_btn fr" type="submit" onClick={()=>this.editdetail(item.content,undefined)}>取消</a>
<Spin spinning={edit_spin}>
<a className="topWrapper_btn fr" type="submit" onClick={()=>this.updatedetail(item.id)}>保存</a>
<a className="a_btn cancel_btn fr" type="submit" onClick={()=>this.editdetail(item.content,undefined)}>取消</a>
</Spin>
</p>
</div>
</div>
@ -505,7 +516,7 @@ class Detail extends Component{
<div className="df">
<img className="user_img" src={getImageUrl(`images/${current_user && current_user.image_url}`)} alt=""/>
<div className="new_context">
<div className="quillContent">
<div className="quillContent" style={{marginBottom:"20px"}}>
<MDEditor placeholder={'添加评论...'} height={200}
mdID={'orderdetail-add-descriptions'} initValue={quillValue} onChange={this.onContentChange} ></MDEditor>
<p className="quillFlag">
@ -514,14 +525,18 @@ class Detail extends Component{
</div>
<UploadComponent load={this.UploadFunc} isComplete={showFiles} changeIsComplete={this.changeIsComplete}></UploadComponent>
<p className="clearfix mt15">
<Spin spinning={journal_spin}>
<a className="topWrapper_btn fr" type="submit" onClick={this.addjournals}>评论</a>
{
data && data.user_permission ?
<a className="Closeor_btn fr" type="submit"
onClick={() => this.closedetail(data && data.issue_status === "关闭" ? 2 : 5)}>{data && data.issue_status === "关闭" ? "重新开启" : "关闭"}</a>
:
""
}
{
data && data.user_permission ?
<a className="Closeor_btn fr" type="submit"
onClick={() => this.closedetail(data && data.issue_status === "关闭" ? 2 : 5)}>{data && data.issue_status === "关闭" ? "重新开启" : "关闭"}</a>
:
""
}
</Spin>
</p>
</div>
</div>

View File

@ -1,5 +1,5 @@
import React , { Component } from "react";
import { Form , Input , Select } from 'antd';
import { Form , Input , Select, Spin } from 'antd';
import { getImageUrl } from 'educoder';
import UploadComponent from '../Upload/Index';
import MDEditor from '../../modules/tpm/challengesnew/tpm-md-editor';
@ -26,7 +26,8 @@ class New extends Component{
issue_chosen:undefined,
branches:undefined,
fileList:undefined,
description:undefined
description:undefined,
isSpin:false
}
}
@ -86,8 +87,12 @@ class New extends Component{
// 创建
handleSubmit=()=>{
this.setState({
isSpin: true
})
this.props.form.validateFieldsAndScroll((err, values) => {
if(!err){
const { projectsId } = this.props.match.params;
const { fileList } = this.state;
const url = `/projects/${projectsId}/issues.json`;
@ -120,10 +125,14 @@ class New extends Component{
this.props.showNotification("任务创建成功!");
this.props.history.push(`/projects/${projectsId}/orders`);
this.setState({
description:''
description:'',
isSpin: false
})
}
}).catch(error=>{
this.setState({
isSpin: false
})
console.log(error);
})
@ -147,7 +156,7 @@ class New extends Component{
render(){
const { getFieldDecorator } = this.props.form;
const { current_user } = this.props;
const { description , issue_chosen , branches } = this.state;
const { description , issue_chosen , branches, isSpin } = this.state;
return(
<div className="main">
@ -174,7 +183,9 @@ class New extends Component{
</div>
<UploadComponent load={this.UploadFunc} showNotification={this.props.showNotification} isComplete={true}></UploadComponent>
<p className="clearfix mt15">
<Spin spinning={isSpin}>
<a className="topWrapper_btn fr" type="submit" onClick={this.handleSubmit}>创建任务</a>
</Spin>
</p>
</div>
</div>

View File

@ -5,7 +5,7 @@ import axios from 'axios';
import Nav from './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 Attachments from '../Upload/attachment';
import MDEditor from '../../modules/tpm/challengesnew/tpm-md-editor';
@ -43,7 +43,8 @@ class UpdateDetail extends Component{
done_ratio:0,
textcount:"",
fileList:undefined,
get_attachments: undefined
get_attachments: undefined,
isSpin: false
}
}
@ -187,6 +188,9 @@ class UpdateDetail extends Component{
})
}
handleSubmit=()=>{
this.setState({
isSpin: true
})
const { fileList } = this.state;
this.props.form.validateFieldsAndScroll((err, values) => {
if(!err){
@ -216,6 +220,9 @@ class UpdateDetail extends Component{
this.props.history.push(`/projects/${projectsId}/orders/${orderId}/detail`);
}
}).catch(error=>{
this.setState({
isSpin: false
})
console.log(error);
})
@ -229,7 +236,7 @@ class UpdateDetail extends Component{
const { getFieldDecorator } = this.props.form;
const { current_user } = this.props;
const { issue_tag_ids , fixed_version_id , branch_name , status_id , tracker_id , issue_type ,assigned_to_id , priority_id , done_ratio,
issue_chosen , branches, subject, textcount,get_attachments } = this.state;
issue_chosen , branches, subject, textcount,get_attachments,isSpin } = this.state;
return(
<div className="main">
{/*<div className="topWrapper">*/}
@ -264,8 +271,10 @@ class UpdateDetail extends Component{
""
}
<p className="clearfix mt15 text-right">
<a className="topWrapper_btn fr" type="submit" style={{marginLeft:5}} onClick={this.handleSubmit}>保存</a>
<Link to={`/projects/${projectsId}/orders/${orderId}/detail`} className="a_btn cancel_btn fr">取消</Link>
<Spin spinning={isSpin}>
<a className="topWrapper_btn fr" type="submit" style={{marginLeft:5}} onClick={this.handleSubmit}>保存</a>
<Link to={`/projects/${projectsId}/orders/${orderId}/detail`} className="a_btn cancel_btn fr">取消</Link>
</Spin>
</p>
</div>
</div>

View File

@ -1,6 +1,6 @@
import React , {Component} from 'react';
import { Link } from 'react-router-dom';
import { Calendar, Select, Radio, Col, Row,Divider,Input,Form} from 'antd';
import { Calendar, Select, Radio, Col, Row,Divider,Input,Form, Spin} from 'antd';
import Nav from './Nav';
import NoneData from '../../modules/courses/coursesPublic/NoneData';
import reactCSS from 'reactcss'
@ -17,6 +17,7 @@ class UpdateMilepost extends Component{
data:undefined,
value: moment('2017-01-25'),
selectedValue: moment('2020-2-12'),
isSpin: false
}
}
@ -66,6 +67,7 @@ class UpdateMilepost extends Component{
}
submit=()=>{
this.setState({isSpin: true})
this.props.form.validateFieldsAndScroll((err, values) => {
if(!err){
const { projectsId } = this.props.match.params;
@ -85,6 +87,7 @@ class UpdateMilepost extends Component{
status:'open'
}).then(result=>{
if(result){
this.setState({isSpin: false})
this.props.history.push(`/projects/${projectsId}/orders/Milepost`);
}
@ -103,7 +106,7 @@ class UpdateMilepost extends Component{
render(){
const { getFieldDecorator } = this.props.form;
const { data } = this.state;
const { data, isSpin } = this.state;
const { projectsId } = this.props.match.params;
return(
@ -234,7 +237,10 @@ class UpdateMilepost extends Component{
</div>
<Divider/>
<div className="clearfix mt15" onClick={this.submit}>
<Spin spinning={isSpin}>
<a className="topWrapper_btn fr" >更新里程碑</a>
</Spin>
</div>
</Form>
</div>

View File

@ -1,6 +1,6 @@
import React , {Component} from 'react';
import { Link } from 'react-router-dom';
import { Calendar, Select, Radio, Col, Row,Divider,Input,Form} from 'antd';
import { Calendar, Select, Radio, Col, Row,Divider,Input,Form, Spin} from 'antd';
import Nav from './Nav';
import NoneData from '../../modules/courses/coursesPublic/NoneData';
import reactCSS from 'reactcss'
@ -17,6 +17,7 @@ class NewMilepost extends Component{
data:undefined,
value: moment('2017-01-25'),
selectedValue: undefined,
isSpin: false
}
}
@ -38,6 +39,7 @@ class NewMilepost extends Component{
}
submit=()=>{
this.setState({isSpin: true})
this.props.form.validateFieldsAndScroll((err, values) => {
if(!err){
const { projectsId } = this.props.match.params;
@ -56,6 +58,7 @@ class NewMilepost extends Component{
status:'open'
}).then(result=>{
if(result){
this.setState({isSpin: false})
this.props.history.push(`/projects/${projectsId}/orders/Milepost`);
}
@ -74,6 +77,7 @@ class NewMilepost extends Component{
render(){
const { getFieldDecorator } = this.props.form;
const { projectsId } = this.props.match.params;
const { isSpin } = this.state
return(
<div className="main">
<Form>
@ -201,7 +205,10 @@ class NewMilepost extends Component{
</div>
<Divider/>
<div className="clearfix mt15" onClick={this.submit}>
<a className="topWrapper_btn fr" >创建里程碑</a>
<Spin spinning={isSpin}>
<a className="topWrapper_btn fr" >创建里程碑</a>
</Spin>
</div>
</Form>
</div>

View File

@ -1,5 +1,5 @@
import React , {Component} from 'react';
import { Dropdown , Icon , Menu , Pagination, Modal,Input,Popconfirm,Form } from 'antd';
import { Dropdown , Icon , Menu , Pagination, Modal,Input,Popconfirm,Form, Spin } from 'antd';
import { Link } from 'react-router-dom';
import '../Order/order.css'
import NoneData from '../Nodata';
@ -31,7 +31,8 @@ class NewTags extends Component{
name:'',
description:'',
id:'',
modelname:''
modelname:'',
isSpin: false
}
}
@ -214,7 +215,7 @@ class NewTags extends Component{
};
render(){
const { data , limit , page } = this.state;
const { data , limit , page, isSpin } = this.state;
const { projectsId } = this.props.match.params;
const { getFieldDecorator } = this.props.form;
@ -384,8 +385,11 @@ class NewTags extends Component{
null }
</div>
<div className="fr" style={{marginTop:5}}>
<Spin spinning={isSpin}>
<a onClick={this.createtagpost} className="topWrapper_btn fr" >创建标签</a>
<a onClick={this.newclose} className="a_btn cancel_btn fr" >取消</a>
</Spin>
</div>
</div>
</Form>

View File

@ -1,5 +1,5 @@
import React , { Component } from "react";
import { Form , Input , Select,Divider,Button,Checkbox,Dropdown,Menu} from 'antd';
import { Form , Input , Select,Divider,Button,Checkbox,Dropdown,Menu, Spin} from 'antd';
import {Link} from 'react-router-dom';
import '../Order/order.css';
@ -22,6 +22,7 @@ class NewVersion extends Component{
branches:undefined,
pull:undefined,
tag_name:'',
isSpin: false
}
}
@ -66,6 +67,9 @@ class NewVersion extends Component{
// 创建
handleSubmit=(draft)=>{
this.setState({
isSpin: true
})
this.props.form.validateFieldsAndScroll((err, values) => {
if(!err){
const { projectsId } = this.props.match.params;
@ -82,6 +86,9 @@ class NewVersion extends Component{
target_commitish:pull,
}).then(result=>{
if(result){
this.setState({
isSpin: false
})
this.props.history.push(`/projects/${projectsId}/version`);
}
}).catch(error=>{
@ -136,7 +143,7 @@ class NewVersion extends Component{
render(){
const { getFieldDecorator } = this.props.form;
const {branches,pull,tag_name} = this.state;
const {branches,pull,tag_name, isSpin} = this.state;
return(
<div className="main">
@ -185,7 +192,11 @@ class NewVersion extends Component{
<Checkbox onChange={this.RedieonChange}>标记为预行版<span className="ml15 color-grey-9 font-13">(此版本不适合生产使用)</span></Checkbox>
</div>
<div className="clearfix mt15" style={{marginTop:5}} >
<a className='topWrapper_btn_close fr' onClick={()=>this.handleSubmit(true)} style={{marginLeft:15}} >保存草稿</a> <a className='topWrapper_btn fr' onClick={()=>this.handleSubmit(false)} style={{marginRight:15}}></a>
<Spin spinning={isSpin}>
<a className='topWrapper_btn_close fr' onClick={()=>this.handleSubmit(true)} style={{marginLeft:15}} >保存草稿</a>
<a className='topWrapper_btn fr' onClick={()=>this.handleSubmit(false)} style={{marginRight:15}}>发布版本</a>
</Spin>
</div>
</Form>
</div>

View File

@ -1,5 +1,5 @@
import React , { Component } from "react";
import { Form , Input , Select,Divider,Button,Checkbox,Dropdown,Menu} from 'antd';
import { Form , Input , Select,Divider,Button,Checkbox,Dropdown,Menu, Spin} from 'antd';
import {Link} from 'react-router-dom';
import UploadComponent from '../Upload/Index';
@ -22,7 +22,8 @@ class NewVersion extends Component{
ischeck:undefined,
pull:undefined,
tag_name:'',
data:undefined
data:undefined,
isSpin: false
}
}
@ -49,6 +50,7 @@ class NewVersion extends Component{
//delete
deleteversion=()=>{
const { projectsId , versionId } = this.props.match.params;
this.setState({isSpin: true})
const url = `/projects/${projectsId}/version_releases/${versionId}.json`;
axios.delete(url,{ data: {
project_id: projectsId,
@ -56,6 +58,7 @@ class NewVersion extends Component{
}
}).then((result)=>{
if(result){
this.setState({isSpin: false})
this.props.history.push(`/projects/${projectsId}/version`);
}
@ -66,6 +69,9 @@ class NewVersion extends Component{
// 创建
handleSubmit=()=>{
this.setState({
isSpin: true
})
this.props.form.validateFieldsAndScroll((err, values) => {
if(!err){
const { projectsId , versionId } = this.props.match.params;
@ -82,6 +88,9 @@ class NewVersion extends Component{
target_commitish:pull
}).then(result=>{
if(result){
this.setState({
isSpin: false
})
this.props.history.push(`/projects/${projectsId}/version`);
}
}).catch(error=>{
@ -131,6 +140,7 @@ class NewVersion extends Component{
render(){
const { getFieldDecorator } = this.props.form;
const { projectsId } = this.props.match.params;
const {isSpin} = this.state;
return(
<div className="main">
<Form>
@ -177,9 +187,12 @@ class NewVersion extends Component{
<Checkbox onChange={this.RedieonChange}>标记为预行版<span className="ml15 color-grey-9 font-13">(此版本不适合生产使用)</span></Checkbox>
</div>
<div className="clearfix mt15" style={{marginTop:5}} >
<Spin spinning={isSpin}>
<a className='topWrapper_btn_delete fr' onClick={()=>this.deleteversion()} style={{marginLeft:15}}>删除发布</a>
<a className='topWrapper_btn fr' onClick={()=>this.handleSubmit()} style={{marginRight:15}}>发布版本</a>
<Link to={`/projects/${projectsId}/version`} style={{marginRight:30}} className='topWrapper_btn fr'>取消</Link>
</Spin>
</div>
</Form>
</div>