forked from Gitlink/forgeplus-react
status_type
This commit is contained in:
parent
d4e9d0128b
commit
efc96cfc8c
|
|
@ -38,8 +38,6 @@ class MilepostDetail extends Component {
|
|||
issue_type: undefined,
|
||||
status_type: '1',
|
||||
//设置选择高亮
|
||||
openselect: 1,
|
||||
closeselect: undefined,
|
||||
issue_tag_ids: '标签',
|
||||
tracker_ids: '类型',
|
||||
author_ids: '发布人',
|
||||
|
|
@ -71,16 +69,19 @@ class MilepostDetail extends Component {
|
|||
}
|
||||
|
||||
// 获取列表数据
|
||||
getIssueList = ( page , item , value , update , updateValue ) => {
|
||||
getIssueList = ( page , item , value , update , updateValue , type ) => {
|
||||
const { projectsId, meilid } = this.props.match.params;
|
||||
const { limit , order_name , order_type , issue_tag_id , author_id , assigned_to_id , tracker_id , status_id , done_ratio} = this.state;
|
||||
const { limit , order_name , order_type , issue_tag_id , author_id , assigned_to_id , tracker_id , status_id , done_ratio , status_type } = this.state;
|
||||
|
||||
const url = `/projects/${projectsId}/versions/${meilid}.json`;
|
||||
let params = update ? {
|
||||
page, limit , order_name:value , order_type:updateValue , issue_tag_id ,
|
||||
author_id , assigned_to_id , tracker_id , status_id , done_ratio,
|
||||
status_type:type || status_type,
|
||||
}:{
|
||||
page, limit , order_name , order_type , issue_tag_id ,
|
||||
author_id , assigned_to_id , tracker_id , status_id , done_ratio,
|
||||
status_type:type || status_type,
|
||||
[item]:value
|
||||
}
|
||||
axios.get(url, {
|
||||
|
|
@ -100,7 +101,6 @@ class MilepostDetail extends Component {
|
|||
}
|
||||
|
||||
getOption = (e, id, name) => {
|
||||
console.log(e.key);
|
||||
if (e.key === "created_on") {
|
||||
if (e.item.props.value === "desc") {
|
||||
this.setState({
|
||||
|
|
@ -159,49 +159,34 @@ class MilepostDetail extends Component {
|
|||
page,
|
||||
isSpin: true
|
||||
})
|
||||
const { limit, status_type, author_id, assigned_to_id } = this.state;
|
||||
this.getIssueList(page);
|
||||
}
|
||||
|
||||
openorder = (type) => {
|
||||
if (type) {
|
||||
const { current_user } = this.props;
|
||||
if (type === 1) {
|
||||
this.setState({
|
||||
status_type: '1',
|
||||
openselect: current_user.user_id,
|
||||
closeselect: undefined,
|
||||
issue_tag_ids: '标签',
|
||||
tracker_ids: '类型',
|
||||
author_ids: '发布人',
|
||||
assigned_to_ids: '负责人',
|
||||
status_ids: "状态",
|
||||
done_ratios: '完成度',
|
||||
paix: '排序'
|
||||
})
|
||||
this.getIssueList(1);
|
||||
|
||||
} else {
|
||||
this.setState({
|
||||
status_type: '2',
|
||||
openselect: undefined,
|
||||
closeselect: current_user.user_id,
|
||||
issue_tag_ids: '标签',
|
||||
tracker_ids: '类型',
|
||||
author_ids: '发布人',
|
||||
assigned_to_ids: '负责人',
|
||||
status_ids: "状态",
|
||||
done_ratios: '完成度',
|
||||
paix: '排序'
|
||||
})
|
||||
this.getIssueList(1);
|
||||
}
|
||||
}
|
||||
this.setState({
|
||||
status_type: type,
|
||||
issue_tag_id : undefined,
|
||||
author_id : undefined,
|
||||
tracker_id : undefined,
|
||||
done_ratio : undefined,
|
||||
status_id: undefined,
|
||||
assigned_to_id: undefined,
|
||||
issue_tag_ids: '标签',
|
||||
tracker_ids: '类型',
|
||||
author_ids: '发布人',
|
||||
assigned_to_ids: '负责人',
|
||||
status_ids: "状态",
|
||||
done_ratios: '完成度',
|
||||
paix: '排序'
|
||||
},() => {
|
||||
this.getIssueList(1,undefined,undefined,undefined,undefined,type);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
const { issue_chosen, issues, limit, page, search_count, data, isSpin, openselect, closeselect } = this.state;
|
||||
const { issue_chosen, issues, limit, page, search_count, data, isSpin , status_type } = this.state;
|
||||
const { projectsId, meilid } = this.props.match.params;
|
||||
|
||||
const menu = (
|
||||
|
|
@ -242,8 +227,8 @@ class MilepostDetail extends Component {
|
|||
<Spin spinning={isSpin}>
|
||||
<div className="f-wrap-between pb20 bor-bottom-greyE">
|
||||
<ul className="topWrapper_type_infos">
|
||||
<li className={openselect ? "active" : ""} onClick={() => this.openorder(1)}>{data && data.open_issues_count}个开启中</li>
|
||||
<li className={closeselect ? "active" : ""} onClick={() => this.openorder(2)}>{data && data.close_issues_count}个已关闭</li>
|
||||
<li className={status_type==="1" ? "active" : ""} onClick={() => this.openorder("1")}>{data && data.open_issues_count}个开启中</li>
|
||||
<li className={status_type==="2" ? "active" : ""} onClick={() => this.openorder("2")}>{data && data.close_issues_count}个已关闭</li>
|
||||
</ul>
|
||||
<ul className="topWrapper_select">
|
||||
<li>
|
||||
|
|
|
|||
Loading…
Reference in New Issue