forked from Gitlink/forgeplus-react
Merge branch 'newVersion_forge' of http://gitea.trustie.net/jasder/forgeplus-react into newVersion_forge
This commit is contained in:
commit
db401b2f5d
|
|
@ -283,7 +283,7 @@ class CoderRootDirectory extends Component{
|
|||
dataIndex: 'name',
|
||||
width:"30%",
|
||||
render: (text,item) => (
|
||||
<a onClick={()=>this.goToSubRoot(item.path)}>
|
||||
<a onClick={()=>this.goToSubRoot(item.path)} className="ml12">
|
||||
<i className={ item.type === "file" ? "iconfont icon-wenjia font-15 color-green-file mr5":"iconfont icon-wenjianjia1 color-green-file font-15 mr5"}></i>{text}
|
||||
</a>
|
||||
),
|
||||
|
|
@ -297,8 +297,9 @@ class CoderRootDirectory extends Component{
|
|||
},{
|
||||
dataIndex:"commit",
|
||||
width:"10%",
|
||||
className:"edu-txt-right",
|
||||
render:(text,item)=>(
|
||||
item.commit && item.commit.time_from_now ? <a title={item.commit.created_at} style={{cursor:"default",color:"#888"}}>{item.commit.time_from_now}</a> :""
|
||||
item.commit && item.commit.time_from_now ? <a title={item.commit.created_at} className="mr12" style={{cursor:"default",color:"#888"}}>{item.commit.time_from_now}</a> :""
|
||||
)
|
||||
}
|
||||
];
|
||||
|
|
|
|||
|
|
@ -408,7 +408,7 @@
|
|||
}
|
||||
.wrap-commit-table .ant-table-title{
|
||||
background-color: rgba(241,248,255,1);
|
||||
padding: 13px 8px!important;
|
||||
padding: 13px 16px!important;
|
||||
}
|
||||
.commitKey{
|
||||
border:1px solid #FD7700;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
import React, { Component } from 'react';
|
||||
import { Calendar, Select, Radio, Col, Row, Divider, Input, Form, Spin } from 'antd';
|
||||
import axios from 'axios';
|
||||
import moment from 'moment'
|
||||
import moment from 'moment';
|
||||
import '../Order/order.css';
|
||||
|
||||
|
||||
const TextArea = Input.TextArea;
|
||||
|
|
@ -46,7 +47,7 @@ class UpdateMilepost extends Component {
|
|||
if (result) {
|
||||
this.setState({
|
||||
data: result.data,
|
||||
selectedValue: moment(result.data.effective_date)
|
||||
selectedValue: result.data.effective_date && moment(result.data.effective_date)
|
||||
})
|
||||
this.props.form.setFieldsValue({
|
||||
name: result.data.name,
|
||||
|
|
@ -69,12 +70,9 @@ class UpdateMilepost extends Component {
|
|||
const { projectsId } = this.props.match.params;
|
||||
const { meilid } = this.props.match.params;
|
||||
const url = `/projects/${projectsId}/versions/${meilid}.json`;
|
||||
let time = undefined;
|
||||
if (this.state.selectedValue === undefined) {
|
||||
|
||||
} else {
|
||||
time = this.state.selectedValue.format("YYYY-MM-DD")
|
||||
}
|
||||
let time = this.state.selectedValue && this.state.selectedValue.format("YYYY-MM-DD");
|
||||
|
||||
axios.put(url, {
|
||||
...values,
|
||||
project_id: projectsId,
|
||||
|
|
@ -97,6 +95,7 @@ class UpdateMilepost extends Component {
|
|||
}
|
||||
})
|
||||
}
|
||||
// 清楚截止日期
|
||||
claertime = () => {
|
||||
this.setState({
|
||||
selectedValue: undefined,
|
||||
|
|
@ -105,8 +104,7 @@ class UpdateMilepost extends Component {
|
|||
|
||||
render() {
|
||||
const { getFieldDecorator } = this.props.form;
|
||||
const { isSpin } = this.state;
|
||||
|
||||
const { isSpin , selectedValue } = this.state;
|
||||
return (
|
||||
<div className="main">
|
||||
<Form>
|
||||
|
|
@ -144,7 +142,7 @@ class UpdateMilepost extends Component {
|
|||
<div className="newmilepostrighe" >
|
||||
截止日期(可选) <a style={{ color: 'red' }} onClick={this.claertime}>清除</a>
|
||||
<div>
|
||||
<Input style={{ width: "120px" }} value={this.state.selectedValue && this.state.selectedValue.format('YYYY-MM-DD')} />
|
||||
<Input style={{ width: "120px" }} value={selectedValue && selectedValue.format('YYYY-MM-DD')} />
|
||||
</div>
|
||||
<div style={{ width: 300, border: '1px solid #d9d9d9', borderRadius: 4, marginTop: 5 }}>
|
||||
<Calendar
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import React, { Component } from 'react';
|
||||
import { Calendar, Select, Radio, Col, Row, Divider, Input, Form, Spin } from 'antd';
|
||||
import axios from 'axios';
|
||||
import moment from 'moment'
|
||||
|
||||
import moment from 'moment';
|
||||
import '../Order/order.css';
|
||||
|
||||
const TextArea = Input.TextArea;
|
||||
const { Group, Button } = Radio;
|
||||
|
|
@ -17,10 +17,6 @@ class NewMilepost extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
componentDidMount = () => {
|
||||
|
||||
}
|
||||
|
||||
onPanelChange = (time, mode) => {
|
||||
this.setState({
|
||||
value: time
|
||||
|
|
@ -80,11 +76,6 @@ class NewMilepost extends Component {
|
|||
return (
|
||||
<div className="main">
|
||||
<Form>
|
||||
{/*<div className="topWrapper">*/}
|
||||
{/*<Nav {...this.props} {...this.state} />*/}
|
||||
{/*/!* <a onClick={this.newshow} className="topWrapper_btn" >新建里程碑</a> *!/*/}
|
||||
|
||||
{/*</div>*/}
|
||||
<div style={{ marginLeft: 15, marginTop: 24 }}>
|
||||
<h1 >新的里程碑</h1>
|
||||
<h5 className="mt-5 color-grey-9">里程碑可以组织任务和合并请求,并跟踪进度.</h5>
|
||||
|
|
|
|||
|
|
@ -23,15 +23,8 @@ export default Form.create()(
|
|||
const [desc, setDesc] = useState(null);
|
||||
const [fileList, setFileList] = useState(undefined);
|
||||
const [attachment, setAttachment] = useState(undefined);
|
||||
const [options , setOptions] = useState(undefined);
|
||||
|
||||
const SelectDiv = styled.div`
|
||||
display: flex;
|
||||
align-item: center;
|
||||
margin-bottom: 5px;
|
||||
& .ant-row {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
`;
|
||||
const Span = styled.span`
|
||||
margin: 0px 15px;
|
||||
color: #bbb;
|
||||
|
|
@ -64,10 +57,13 @@ export default Form.create()(
|
|||
if (repo_id) {
|
||||
const url = `/repositories/${repo_id}/tags.json`;
|
||||
axios
|
||||
.get(url)
|
||||
.get(url,{params:{
|
||||
limit:1000
|
||||
}})
|
||||
.then(result => {
|
||||
if (result) {
|
||||
setTagList(result.data);
|
||||
setOptions(renderTagList(result.data));
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
|
|
@ -88,10 +84,6 @@ export default Form.create()(
|
|||
return array || undefined;
|
||||
}
|
||||
}
|
||||
function changeT(value) {
|
||||
// let l = tagList.filter(item => item.name.indexOf(value) > -1);
|
||||
// setTagList(l);
|
||||
}
|
||||
function submit() {
|
||||
validateFields((err, value) => {
|
||||
if (versionId) {
|
||||
|
|
@ -137,23 +129,29 @@ export default Form.create()(
|
|||
),
|
||||
[]
|
||||
);
|
||||
// 输入标签名
|
||||
function changeAuto(value){
|
||||
let l = tagList.filter(item=>item.name.indexOf(value) > -1);
|
||||
setOptions(renderTagList(l));
|
||||
}
|
||||
return (
|
||||
<div className="main df">
|
||||
<Form className="versionForm">
|
||||
<div>
|
||||
<p className="font-16 color-grey-3 mb15">创建发行版</p>
|
||||
<div>
|
||||
<SelectDiv>
|
||||
<div className="itemInline">
|
||||
{helper(
|
||||
"",
|
||||
"tag_name",
|
||||
[{ required: true, message: "请输入获取或选择一个标签" }],
|
||||
<AutoComplete
|
||||
placeholder="标记一个版本"
|
||||
dataSource={renderTagList(tagList)}
|
||||
onChange={changeT}
|
||||
onChange={changeAuto}
|
||||
style={{ width: "200px" }}
|
||||
></AutoComplete>
|
||||
>
|
||||
{options}
|
||||
</AutoComplete>
|
||||
)}
|
||||
<Span>@</Span>
|
||||
{helper(
|
||||
|
|
@ -168,7 +166,7 @@ export default Form.create()(
|
|||
{renderTagList(branchList)}
|
||||
</Select>
|
||||
)}
|
||||
</SelectDiv>
|
||||
</div>
|
||||
<p className="font-13 color-grey-8">
|
||||
选择一个已经存在的标签,或者在发布时新建一个标签
|
||||
</p>
|
||||
|
|
|
|||
|
|
@ -194,4 +194,12 @@
|
|||
display: flex;
|
||||
height: 20px;
|
||||
align-items: center;
|
||||
}
|
||||
.itemInline{
|
||||
display: flex;
|
||||
align-item: center;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.itemInline .ant-row{
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
Loading…
Reference in New Issue