dev_forum
hjm 5 years ago
parent 6d0860d44f
commit d7a4b99380

@ -201,7 +201,7 @@ class AccountBasic extends Component {
this.props.form.setFieldsValue({
org2:e
})
let arr = this.state.departments ? this.state.departments.filter(function(item){
let arr = this.state.departments && this.state.departments.filter ? this.state.departments.filter(function(item){
return item.name.indexOf(e) > -1
}) : []
this.setState({
@ -213,9 +213,9 @@ class AccountBasic extends Component {
// 选择部门、学院
changeDepartment=(e)=>{
let arr=this.state.departments.filter(function(item){
let arr= this.state.departments && this.state.departments.filter ? this.state.departments.filter(function(item){
return item.name == e;
});
}) : [];
this.setState({
departmentsName:e,
department_id:arr[0].id

Loading…
Cancel
Save