dev_forum
hjm 6 years ago
parent bfeb792fa2
commit f049d7763c

@ -273,6 +273,14 @@ class AccountBasic extends Component {
}
}
addOrgSuccess = (name) => {
const schoolList = this.state.schoolList.slice(0)
schoolList.push({ id: schoolList.length + 2000, name: name})
this.setState({ schoolList })
this.props.form.setFieldsValue({
name: name
})
}
showApplyForAddOrgModal = () => {
this.applyForAddOrgForm.setVisible(true)
@ -309,7 +317,8 @@ class AccountBasic extends Component {
return (
<div>
<ApplyForAddOrgModal ref="applyForAddOrgModal" wrappedComponentRef={(form) => this.applyForAddOrgForm = form} schoolName={school}
{...propsWithoutForm}></ApplyForAddOrgModal>
{...propsWithoutForm} addOrgSuccess={this.addOrgSuccess}
></ApplyForAddOrgModal>
<ApplyForAddChildOrgModal ref="applyForAddChildOrgModal" schoolName={school} schoolId={school_id} departmentName={departmentsName}
{...propsWithoutForm} wrappedComponentRef={(form) => this.applyForAddChildOrgForm = form} ></ApplyForAddChildOrgModal>

@ -48,6 +48,7 @@ class ApplyForAddOrgModal extends Component{
}).then((result)=>{
if(result){
this.props.showNotification("新增学校/单位成功!");
this.props.addOrgSuccess(values.schoolName)
this.setVisible(false);
}
}).catch((error)=>{

Loading…
Cancel
Save