hjm 5 years ago
parent 5af9f4cafd
commit 552f23fa39

@ -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 {
</Form.Item>
{
!filterDepartments || (filterDepartments && filterDepartments.length==0 )&& departmentsName &&
(!filterDepartments || (filterDepartments && filterDepartments.length==0 ) || (departmentsName == '' && !this.state.department_id)) &&
<div style={{marginLeft: '100px',height:"20px",lineHeight:"20px"}}>
<span>
<span style={{color: '#CDCDCD'}}>未找到包含{departmentsName}的院系/部门</span>
<span style={{color: '#CDCDCD'}}>{departmentsName ? `未找到包含“${departmentsName}”的院系/部门` : '未找到院系'}</span>
<span style={{color: '#4CACFF', cursor: 'pointer'}} onClick={this.showApplyForAddChildOrgModal}>申请新增</span>
</span>
</div>

Loading…
Cancel
Save