forked from Gitlink/forgeplus-react
详情banner数量,显示开启中的数量,且执行关闭或者拒绝等修改状态的操作时要更新数量
This commit is contained in:
parent
f4b3afde6a
commit
d4e1b2f414
|
@ -425,7 +425,7 @@ class Detail extends Component {
|
|||
<div>
|
||||
<div className="detailHeader-wrapper">
|
||||
<div className="normal">
|
||||
<FlexAJ style={{marginTop:"15px"}}>
|
||||
<FlexAJ style={{paddingTop:"15px"}}>
|
||||
<AlignCenter>
|
||||
<div className="projectallName">
|
||||
{project && project.author &&
|
||||
|
|
|
@ -102,19 +102,6 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
.projectallName{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 22px;
|
||||
font-weight: normal;
|
||||
.projectN{
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
flex: 1;
|
||||
max-width: 500px;
|
||||
}
|
||||
}
|
||||
// coderDepot
|
||||
.Panels{
|
||||
max-width: 1200px;
|
||||
|
|
|
@ -102,6 +102,8 @@ class MessageCount extends Component {
|
|||
isSpin: false,
|
||||
pr_status: 2,
|
||||
});
|
||||
const { getDetail } = this.props;
|
||||
getDetail && getDetail();
|
||||
} else {
|
||||
this.setState({
|
||||
isSpin: false,
|
||||
|
@ -138,6 +140,8 @@ class MessageCount extends Component {
|
|||
SpinMerge: false,
|
||||
pr_status: 1,
|
||||
});
|
||||
const { getDetail } = this.props;
|
||||
getDetail && getDetail();
|
||||
} else {
|
||||
this.setState({ SpinMerge: false });
|
||||
}
|
||||
|
@ -471,17 +475,16 @@ class MessageCount extends Component {
|
|||
: !ismesrge ? "block" : "none",
|
||||
}}
|
||||
>
|
||||
<p className="mb15">
|
||||
<Dropdown.Button
|
||||
overlay={menu}
|
||||
type="primary"
|
||||
onClick={this.submitmerge}
|
||||
icon={<Icon type="caret-down" />}
|
||||
disabled={!pull_request || (pull_request && !pull_request.mergeable) }
|
||||
>
|
||||
{this.state.mergename}
|
||||
</Dropdown.Button>
|
||||
</p>
|
||||
<Dropdown.Button
|
||||
overlay={menu}
|
||||
type="primary"
|
||||
onClick={this.submitmerge}
|
||||
className="mb15"
|
||||
icon={<Icon type="caret-down" />}
|
||||
disabled={!pull_request || (pull_request && !pull_request.mergeable) }
|
||||
>
|
||||
{this.state.mergename}
|
||||
</Dropdown.Button>
|
||||
{pull_request && pull_request.mergeable
|
||||
?
|
||||
<Alert
|
||||
|
|
|
@ -207,12 +207,10 @@ class merge extends Component {
|
|||
paix: "排序",
|
||||
priority_ids: "优先级",
|
||||
});
|
||||
this.state.select_params = {
|
||||
status_type: type,
|
||||
search: undefined,
|
||||
page: 1,
|
||||
limit: 15,
|
||||
};
|
||||
this.state.select_params.status_type = type;
|
||||
this.state.select_params.page=1;
|
||||
this.state.select_params.limit=15;
|
||||
|
||||
this.getIssueList();
|
||||
};
|
||||
|
||||
|
|
|
@ -89,8 +89,9 @@ class Milepost extends Component {
|
|||
closeselect: status === "closed" ? current_user.user_id : undefined,
|
||||
openselect: status === "closed" ? undefined : current_user.user_id
|
||||
})
|
||||
|
||||
this.getList(1, status, 'desc')
|
||||
this.getList(1, status, 'desc');
|
||||
const { getDetail } = this.props;
|
||||
getDetail && getDetail();
|
||||
}
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
|
@ -228,8 +229,8 @@ class Milepost extends Component {
|
|||
<Link to={`/projects/${owner}/${projectsId}/milestones/${item.id}/edit`} className="color-grey-9">编辑</Link>
|
||||
</div>
|
||||
<div className="grid-item ml15 color-grey-9">
|
||||
<i className="iconfont icon-yiguanbi1 font-14 mr5"></i>
|
||||
<a onClick={() => this.updatestatusemile(this.state.status === "closed" ? "open" : "closed", item)} className="color-grey-9">{this.state.status === "closed" ? "开启" : "关闭"}</a>
|
||||
<i className={item.status === "closed" ? "iconfont icon-gouxuan font-14 mr5":"iconfont icon-yiguanbi1 font-14 mr5"}></i>
|
||||
<a onClick={() => this.updatestatusemile(item.status === "closed" ? "open" : "closed", item)} className="color-grey-9">{this.state.status === "closed" ? "开启" : "关闭"}</a>
|
||||
</div>
|
||||
<div className="grid-item ml15 color-grey-9">
|
||||
<i className="iconfont icon-lajitong font-14 mr5" ></i>
|
||||
|
|
|
@ -69,6 +69,27 @@ class MilepostDetail extends Component {
|
|||
})
|
||||
}
|
||||
|
||||
deletedetail = (id) => {
|
||||
const { projectsId , owner } = this.props.match.params;
|
||||
const url = `/${owner}/${projectsId}/issues/${id}.json`;
|
||||
axios.delete(url, {
|
||||
data: {
|
||||
project_id: projectsId,
|
||||
id: id,
|
||||
},
|
||||
})
|
||||
.then((result) => {
|
||||
if (result) {
|
||||
const { page } = this.state;
|
||||
this.getIssueList(page);
|
||||
const { getDetail } = this.props;
|
||||
getDetail && getDetail();
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error);
|
||||
});
|
||||
};
|
||||
// 获取列表数据
|
||||
getIssueList = ( page , item , value , update , updateValue , type ) => {
|
||||
const { projectsId, meilid , owner } = this.props.match.params;
|
||||
|
@ -275,7 +296,15 @@ class MilepostDetail extends Component {
|
|||
:
|
||||
issues && issues.length>0 && issues.map((item,key)=>{
|
||||
return(
|
||||
<OrderItem key={key} mile item={item} search_count={search_count} page={page} limit={limit} {...this.props} {...this.state}></OrderItem>
|
||||
<OrderItem
|
||||
key={key} mile
|
||||
item={item}
|
||||
search_count={search_count}
|
||||
page={page}
|
||||
limit={limit}
|
||||
{...this.props} {...this.state}
|
||||
deletedetail={this.deletedetail}
|
||||
></OrderItem>
|
||||
)
|
||||
})
|
||||
}
|
||||
|
|
|
@ -92,12 +92,12 @@ class OrderItem extends Component {
|
|||
<Link to={`/projects/${owner}/${projectsId}/issues/${item.id}/detail`}><i className="iconfont icon-pinglun1 mr3 font-16"></i>{item.journals_count}</Link>
|
||||
{
|
||||
current_user && current_user.login ?
|
||||
<div style={{ display: this.state.orderid === item.id && this.state.isdisplay ? 'flex' : 'none' }}>
|
||||
<div id="hoverBox" style={{ display: this.state.orderid === item.id && this.state.isdisplay ? 'flex' : 'none' }}>
|
||||
<div className="mr8 ml8 color-grey-9">
|
||||
<Link to={`/projects/${owner}/${projectsId}/issues/${item.id}/updatedetail`} className="color-grey-9"><i className="iconfont icon-bianji3 font-14 mr5"></i></Link>
|
||||
</div>
|
||||
<div className="color-grey-9">
|
||||
<Popconfirm placement="bottom" title={'您确定要删除吗'} okText="是" cancelText="否" onConfirm={() => this.deletedetail(item.id)}>
|
||||
<Popconfirm placement="bottom" overlayClassName="overlayBox" getPopupContainer={()=>document.getElementById("hoverBox")} title={'您确定要删除当前易修吗?'} okText="是" cancelText="否" onConfirm={() => this.deletedetail(item.id)}>
|
||||
<i className="iconfont icon-yiguanbi1 font-14"></i>
|
||||
</Popconfirm>
|
||||
</div>
|
||||
|
|
|
@ -64,6 +64,8 @@ class NewMilepost extends Component {
|
|||
if (result) {
|
||||
this.setState({ isSpin: false })
|
||||
this.props.history.push(`/projects/${owner}/${projectsId}/milestones`);
|
||||
const { getDetail } = this.props;
|
||||
getDetail && getDetail();
|
||||
}
|
||||
}).catch(error => {
|
||||
this.setState({ isSpin: false })
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
line-height: 18px;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.overlayBox{
|
||||
width: 230px;
|
||||
}
|
||||
.topmilepost {
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
|
|
|
@ -268,11 +268,8 @@ class order extends Component {
|
|||
checkedValue:[],
|
||||
all:undefined
|
||||
});
|
||||
this.state.select_params = {
|
||||
search: undefined,
|
||||
page: 1,
|
||||
limit: 15,
|
||||
};
|
||||
this.state.select_params.page = 1;
|
||||
this.state.select_params.limit = 15;
|
||||
this.getIssueList(type);
|
||||
};
|
||||
|
||||
|
@ -337,6 +334,8 @@ class order extends Component {
|
|||
const { status_type } = this.state;
|
||||
|
||||
this.getIssueList(status_type);
|
||||
const { getDetail } = this.props;
|
||||
getDetail && getDetail();
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
|
|
|
@ -193,13 +193,14 @@ class order_form extends Component {
|
|||
if (result) {
|
||||
this.props.history.push(`/projects/${owner}/${projectsId}/issues/${orderId}/detail`);
|
||||
this.props.showNotification("任务更新成功!");
|
||||
const { getDetail } = this.props;
|
||||
getDetail && getDetail();
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
this.setState({
|
||||
isSpin: false,
|
||||
});
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,19 @@ ul,ol,dl{
|
|||
.color-black{
|
||||
color: #333;
|
||||
}
|
||||
.projectallName{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 22px;
|
||||
font-weight: normal;
|
||||
.projectN{
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
flex: 1;
|
||||
max-width: 500px;
|
||||
}
|
||||
}
|
||||
.main{
|
||||
width: 1200px;
|
||||
padding:20px;
|
||||
|
|
Loading…
Reference in New Issue