Merge pull request 'issue列表筛选bug以及新增按钮' (#337) from caishi/forgeplus-react:gitlink_server into gitlink_server

This commit is contained in:
xxq250 2022-01-26 13:47:05 +08:00
commit 882f0760e8
2 changed files with 56 additions and 13 deletions

View File

@ -533,7 +533,7 @@ function CoderDepot(props){
<FlexAJ className="font-18 color-ooo mb20" style={{lineHeight:"28px"}}>关于
{
projectDetail.permission && (projectDetail.permission==="Admin" || projectDetail.permission==="Owner" || projectDetail.permission==="Manager") &&
<i onClick={()=>setOpenModal(true)} className="iconfont icon-a-shezhi color-grey-9 font-15"></i>
<i onClick={()=>setOpenModal(true)} className="iconfont icon-a-shezhi color-grey-9 font-15 pointer"></i>
}
</FlexAJ>
{desc && <p className="font-14 color-grey-3 mb15 task-hide-2" style={{lineHeight:"24px",WebkitLineClamp:"4",textAlign:"justify",wordBreak:"break-all"}} title={desc}>{desc}</p>}

View File

@ -210,8 +210,10 @@ class order extends Component {
});
}
}
const { select_params } = this.state;
this.setState({
select_params:{
...select_params,
order_name:key_name[0],
order_type:e.item.props.value,
page:1
@ -220,9 +222,6 @@ class order extends Component {
const { status_type } = this.state;
this.getIssueList(status_type);
})
// this.state.select_params.order_name = key_name[0];
// this.state.select_params.order_type = e.item.props.value;
// this.state.select_params.page = 1;
};
getOption = (e, id, name, toGet) => {
@ -283,15 +282,15 @@ class order extends Component {
// 翻页
ChangePage = (page) => {
window.scrollTo(0,0);
const { status_type } = this.state;
this.setState({
isSpin: true,
checkedValue: [],
all: false
all: false,
},()=>{
this.state.select_params.page=page;
this.getIssueList(status_type);
});
const { status_type } = this.state;
this.state.select_params.page = page;
this.getIssueList(status_type);
};
// 搜索
@ -346,12 +345,12 @@ class order extends Component {
ChangeAssign = (type) => {
const { current_user } = this.props;
this.setState({
isSpin: true,
isSpin: true
});
if (type) {
if (!current_user) {
this.setState({
isSpin: false,
isSpin: false
});
return;
}
@ -385,7 +384,7 @@ class order extends Component {
this.state.select_params.author_id = undefined;
}
const { status_type } = this.state;
this.state.select_params.page = 1;
this.getIssueList(status_type);
};
@ -563,6 +562,49 @@ class order extends Component {
}
})
}
clearSelectParams=()=>{
this.setState({
status_type: "1", // 默认显示开启中的
issue_tag_ids: "标记",
tracker_ids: "类型",
author_ids: "发布人",
assigned_to_ids: "负责人",
fixed_version_ids: "里程碑",
status_ids: "状态",
done_ratios: "完成度",
paix: "排序",
update_author_ids: "更换负责人",
update_fixed_version_ids: '更换里程碑',
update_status_ids: "修改状态",
begin: '',
end: '',
checkedValue: [],
allValue: [],
all: false,
search:undefined,
select_params: {
assigned_to_id: undefined, // 负责人
author_id: undefined, // 发布人
issue_tag_id: undefined, // 标记
tracker_id: undefined, //类型
done_ratio: undefined, // 完成度
status_id: undefined, // 优先级
fixed_version_id: undefined,//里程碑
order_name: undefined,
order_type: undefined,
search: undefined,
update_author_id: undefined,
update_fixed_version_id: undefined,
update_status_id: undefined,
page: 1,
limit: 15,
}
},()=>{
this.getIssueList("1");
})
}
menu =()=> (
<Menu onClick={(e) => this.getMenu(e)}>
<Menu.Item key={"created_on-desc"} value="desc">
@ -634,6 +676,7 @@ class order extends Component {
/>
</div>
<div>
<a className="mr20 color-grey-6" onClick={this.clearSelectParams}><i className="iconfont icon-shanchu6 mr3 font-14"></i></a>
<DatePicker
value={begin ? moment(begin, 'YYYY-MM-DD') : ""}
style={{ marginRight: "20px" }}
@ -912,7 +955,7 @@ class order extends Component {
<div className="pt30 mb30 edu-txt-center" style={{borderTop:"1px solid #eee"}}>
<Pagination
simple
defaultCurrent={select_params.page}
current={select_params.page}
total={search_count}
pageSize={select_params.limit}
onChange={this.ChangePage}