change issues order menthod

This commit is contained in:
sylor_huang@126.com 2020-05-19 18:37:28 +08:00
parent b6b8215d5b
commit 037d85b6b7
1 changed files with 7 additions and 13 deletions

View File

@ -151,32 +151,26 @@ class order extends Component {
isSpin: true, isSpin: true,
}); });
let option_id = e.key === "all" ? undefined : e.key; let option_id = e.key === "all" ? undefined : e.key;
this.setState({ // this.setState({
["${id}s"]: name, // ["${id}s"]: name,
}); // });
this.state.select_params[`${id}`] = option_id; this.state.select_params[`${id}`] = option_id;
this.state.select_params.page = 1; this.state.select_params.page = 1;
this.state[`${id}s`] = name; this.state[`${id}s`] = name;
if(current_user){ if(current_user){
if(this.state.select_params.author_id && this.state.select_params.author_id === current_user.user_id){ if(this.state.select_params.author_id && this.state.select_params.author_id === current_user.user_id){
this.setState({ this.state.author_id = current_user.user_id;
author_ids: current_user.username,
author_id: current_user.user_id
});
}else if(this.state.select_params.assigned_to_id && this.state.select_params.assigned_to_id === current_user.user_id){ }else if(this.state.select_params.assigned_to_id && this.state.select_params.assigned_to_id === current_user.user_id){
this.setState({ this.state.assigned_to_id = current_user.user_id;
assigned_to_ids: current_user.username,
assigned_to_id: current_user.user_id
});
}else{ }else{
this.setState({ this.setState({
author_ids: "发布人",
author_id: undefined, author_id: undefined,
assigned_to_ids: "指派人",
assigned_to_id: undefined assigned_to_id: undefined
}); });
} }
} }
console.log("author_id", this.state.author_id)
console.log("assigned_to_id", this.state.assigned_to_id)
this.getIssueList(); this.getIssueList();
}; };