|
|
|
@ -110,11 +110,7 @@ class AccountBasic extends Component {
|
|
|
|
|
this.props.form.validateFieldsAndScroll((err, values) => {
|
|
|
|
|
console.log(values);
|
|
|
|
|
let {basicInfo}=this.props;
|
|
|
|
|
// TODO 为什么modal里的form影响到这里的了
|
|
|
|
|
if (err) {
|
|
|
|
|
delete err.depart
|
|
|
|
|
}
|
|
|
|
|
if(!err || Object.keys(err).length == 0){
|
|
|
|
|
if(!err ){
|
|
|
|
|
let url=`/users/accounts/${basicInfo.id}.json`
|
|
|
|
|
axios.put((url),{
|
|
|
|
|
nickname:values.nickname,
|
|
|
|
@ -202,6 +198,7 @@ class AccountBasic extends Component {
|
|
|
|
|
}
|
|
|
|
|
//搜索部门
|
|
|
|
|
searchDepartment=(e)=>{
|
|
|
|
|
if (e) {
|
|
|
|
|
this.props.form.setFieldsValue({
|
|
|
|
|
org2:e
|
|
|
|
|
})
|
|
|
|
@ -213,6 +210,7 @@ class AccountBasic extends Component {
|
|
|
|
|
departmentsName:e
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 选择部门、学院
|
|
|
|
|
changeDepartment=(e)=>{
|
|
|
|
@ -306,12 +304,15 @@ class AccountBasic extends Component {
|
|
|
|
|
const { getFieldDecorator } = this.props.form;
|
|
|
|
|
let{basicInfo}=this.props
|
|
|
|
|
|
|
|
|
|
// form合并了
|
|
|
|
|
const propsWithoutForm = Object.assign({}, this.props)
|
|
|
|
|
delete propsWithoutForm.form
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<ApplyForAddOrgModal ref="applyForAddOrgModal" wrappedComponentRef={(form) => this.applyForAddOrgForm = form} schoolName={school}
|
|
|
|
|
{...this.props}></ApplyForAddOrgModal>
|
|
|
|
|
{...propsWithoutForm}></ApplyForAddOrgModal>
|
|
|
|
|
<ApplyForAddChildOrgModal ref="applyForAddChildOrgModal" schoolName={school} schoolId={school_id} departmentName={departmentsName}
|
|
|
|
|
{...this.props} wrappedComponentRef={(form) => this.applyForAddChildOrgForm = form} ></ApplyForAddChildOrgModal>
|
|
|
|
|
{...propsWithoutForm} wrappedComponentRef={(form) => this.applyForAddChildOrgForm = form} ></ApplyForAddChildOrgModal>
|
|
|
|
|
|
|
|
|
|
<div className="basicForm">
|
|
|
|
|
<style>{`
|
|
|
|
|