change order.js getOption methods

This commit is contained in:
sylor_huang@126.com 2020-05-20 09:33:58 +08:00
parent 8c7cb56c9a
commit 4168db36d1
1 changed files with 9 additions and 11 deletions

View File

@ -154,21 +154,19 @@ class order extends Component {
this.state.select_params[`${id}`] = option_id;
this.state.select_params.page = 1;
this.state[`${id}s`] = name;
if(current_user){
if(this.state.select_params.author_id && (parseInt(this.state.select_params.author_id) === current_user.user_id)){
if (current_user) {
if ( this.state.select_params.author_id && parseInt(this.state.select_params.author_id) === current_user.user_id) {
this.state.author_id = current_user.user_id;
}else if(this.state.select_params.assigned_to_id && (parseInt(this.state.select_params.assigned_to_id) === current_user.user_id)){
} else {
this.state.author_id = undefined;
}
if (this.state.select_params.assigned_to_id && parseInt(this.state.select_params.assigned_to_id) === current_user.user_id ) {
this.state.assigned_to_id = current_user.user_id;
}else{
this.setState({
author_id: undefined,
assigned_to_id: undefined
});
} else {
this.state.assigned_to_id = undefined;
}
}
console.log("author_id", this.state.author_id)
console.log("assigned_to_id", this.state.assigned_to_id)
this.getIssueList();
};