From 552f23fa3964990c456e86541d57eaf770bde647 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 26 Jul 2019 15:18:08 +0800 Subject: [PATCH] https://www.trustie.net/issues/22475 --- .../src/modules/user/account/AccountBasicEdit.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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}”的院系/部门` : '未找到院系'}, 申请新增