diff --git a/public/react/src/modules/user/account/AccountBasicEdit.js b/public/react/src/modules/user/account/AccountBasicEdit.js index 82f7d60d8..e79ffa16b 100644 --- a/public/react/src/modules/user/account/AccountBasicEdit.js +++ b/public/react/src/modules/user/account/AccountBasicEdit.js @@ -106,6 +106,8 @@ class AccountBasic extends Component { this.setState({ school_id, school: selectedName + }, () => { + this.filterList(name) }) } else if(basicInfo && basicInfo.school_name){ this.setState({ @@ -199,7 +201,7 @@ class AccountBasic extends Component { } // 过滤学校 - filterList=(e)=>{ + filterList =(e)=>{ const inputVal = e.trim() let arr=[]; if(inputVal){ @@ -211,7 +213,7 @@ class AccountBasic extends Component { }) this.setState({ school: inputVal, - filterSchoolList:arr + filterSchoolList: arr }) } else { this.setState({ @@ -254,6 +256,7 @@ class AccountBasic extends Component { this.setState({ department_id: '', departmentsName: e, + filterDepartments: [], }) this.this_department_id = '' return; @@ -261,7 +264,7 @@ class AccountBasic extends Component { this.this_department_id = arr[0].id this.setState({ departmentsName:e, - department_id: arr[0].id + department_id: arr[0].id, }) } @@ -365,7 +368,6 @@ class AccountBasic extends Component { // this.setState({ schoolList }) this.getSchoolList(this.props.basicInfo, name); - this.props.form.setFieldsValue({ name: name }) @@ -716,10 +718,10 @@ class AccountBasic extends Component { { - !filterDepartments || (filterDepartments && filterDepartments.length==0 )&& departmentsName && + (!filterDepartments || (filterDepartments && filterDepartments.length==0 ) || (departmentsName == '' && !this.state.department_id)) &&
- 未找到包含“{departmentsName}”的院系/部门, + {departmentsName ? `未找到包含“${departmentsName}”的院系/部门` : '未找到院系'}, 申请新增