diff --git a/public/react/src/forge/Merge/MergeItem.js b/public/react/src/forge/Merge/MergeItem.js
index 65dda1926..4db006450 100644
--- a/public/react/src/forge/Merge/MergeItem.js
+++ b/public/react/src/forge/Merge/MergeItem.js
@@ -2,6 +2,21 @@ import React , { Component } from 'react';
import { Link } from 'react-router-dom';
class MergeItem extends Component{
+
+ set_issue_tags =(issue_tags)=>{
+ if(issue_tags && issue_tags.length > 0){
+ return(
+ issue_tags.map((item,key)=>{
+ return(
+ {item.name}
+ )
+ })
+ )
+ }else{
+ return("--")
+ }
+ }
+
render(){
const { issues , search_count , page , limit } = this.props;
const { projectsId } = this.props.match.params;
@@ -20,7 +35,14 @@ class MergeItem extends Component{
{item.created_at}
{ item.journals_count ? {item.journals_count} : "" }
-
+
+
+ - {this.set_issue_tags(item.issue_tags)}
+ {/*- {item.issue_type || "--"}
*/}
+ - {item.version || "--"}
+ - {item.author_name || "--"}
+ - { item.journals_count ? {item.journals_count} : "" }
+
)
})
diff --git a/public/react/src/forge/Merge/UpdateMerge.js b/public/react/src/forge/Merge/UpdateMerge.js
index fd3c7cfa6..b2501c23b 100644
--- a/public/react/src/forge/Merge/UpdateMerge.js
+++ b/public/react/src/forge/Merge/UpdateMerge.js
@@ -134,23 +134,23 @@ class UpdateMerge extends Component{
const { fileList } = this.state;
this.props.form.validateFieldsAndScroll((err, values) => {
if(!err){
- const { projectsId} = this.props.match.params;
+ const { projectsId,mergeId} = this.props.match.params;
const { subject ,data} = this.state;
- const url = `/projects/${projectsId}/issues/${data.issue.id}.json`;
-
- if(values.issue_tag_ids===0){
- values.issue_tag_ids = ""
+ const url = `/projects/${projectsId}/pull_requests/${mergeId}.json`;
+
+
+ if(values.issue_tag_ids===''){
+ values.issue_tag_ids = []
}else{
- values.issue_tag_ids = [values.issue_tag_ids]
+
}
+
if(values.assigned_to_id===0){
values.assigned_to_id = ""
}
axios.put(url,{
project_id:projectsId,
- subject:subject,
id: data.issue.id,
- description:this.state.textcount,
attachment_ids:fileList,
...values
}).then(result=>{
@@ -184,7 +184,7 @@ class UpdateMerge extends Component{
- {getFieldDecorator('subject', {
+ {getFieldDecorator('title', {
rules: [{
required: true, message: '请填写工单标题'
}],
@@ -194,7 +194,7 @@ class UpdateMerge extends Component{
)}
- {getFieldDecorator('description', {
+ {getFieldDecorator('body', {
rules: [],
initialValue: textcount
})(
diff --git a/public/react/src/forge/Merge/merge.js b/public/react/src/forge/Merge/merge.js
index 9b9a39f43..f6e5a6371 100644
--- a/public/react/src/forge/Merge/merge.js
+++ b/public/react/src/forge/Merge/merge.js
@@ -43,6 +43,11 @@ class merge extends Component{
//设置选择高亮
openselect:1,
closeselect:undefined,
+ issue_tag_ids:'标签筛选',
+ issue_versions:'里程碑筛选',
+ assigned_to_ids:'指派人筛选',
+ paix:'排序'
+
}
}
@@ -67,12 +72,12 @@ class merge extends Component{
}
// 获取列表数据
- getIssueList=(page,limit,search,author_id,assigned_to_id,id,value,status_type)=>{
+ getIssueList=(page,limit,search,author_id,assigned_to_id,id,value,status_type,order_type,order_name)=>{
const { projectsId } = this.props.match.params;
const url = `/projects/${projectsId}/pull_requests.json`;
axios.get(url,{
params:{
- page,limit,search,author_id,assigned_to_id,status_type,
+ page,limit,search,author_id,assigned_to_id,status_type,order_type,order_name,
[id]:value
}
}).then((result)=>{
@@ -89,7 +94,25 @@ class merge extends Component{
})
}
- getOption=(e,id)=>{
+ getOption=(e,id,name)=>{
+ if(id+'s'==="issue_tag_ids"){
+ this.setState({
+ [id]:e.key,
+ issue_tag_ids:name
+ })
+ }
+ if(id+'s'==="issue_versions"){
+ this.setState({
+ [id]:e.key,
+ issue_versions:name
+ })
+ }
+ if(id+'s'==="assigned_to_ids"){
+ this.setState({
+ [id]:e.key,
+ assigned_to_ids:name
+ })
+ }
this.setState({
[id]:e.key
})
@@ -104,11 +127,11 @@ class merge extends Component{
renderMenu =(array,name,id)=>{
return(
-
- 标签筛选
+ {this.state.issue_tag_ids}
-
- 里程碑筛选
+ {this.state.issue_versions}
-
- 指派人筛选
-
-
- -
-
- 类型筛选
+ {this.state.assigned_to_ids}
+
-
- 排序
+ {this.state.paix}