|
|
|
@ -37,7 +37,7 @@ class AccountBasic extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
componentDidUpdate =(prevProps)=>{
|
|
|
|
|
if(this.props.basicInfo && prevProps.basicInfo == undefined){
|
|
|
|
|
if(this.props.basicInfo && (prevProps.basicInfo == undefined || prevProps.basicInfo.id != this.props.basicInfo.id)){
|
|
|
|
|
this.setValue(this.props.basicInfo);
|
|
|
|
|
this.getSchoolList(this.props.basicInfo);
|
|
|
|
|
}
|
|
|
|
@ -201,9 +201,9 @@ class AccountBasic extends Component {
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
org2: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.indexOf(e) > -1
|
|
|
|
|
})
|
|
|
|
|
}) : []
|
|
|
|
|
this.setState({
|
|
|
|
|
filterDepartments:arr,
|
|
|
|
|
departmentsName:e
|
|
|
|
@ -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
|
|
|
|
|