|
|
@ -101,7 +101,11 @@ class AccountBasic extends Component {
|
|
|
|
this.props.form.validateFieldsAndScroll((err, values) => {
|
|
|
|
this.props.form.validateFieldsAndScroll((err, values) => {
|
|
|
|
console.log(values);
|
|
|
|
console.log(values);
|
|
|
|
let {basicInfo}=this.props;
|
|
|
|
let {basicInfo}=this.props;
|
|
|
|
if(!err){
|
|
|
|
// TODO 为什么modal里的form影响到这里的了
|
|
|
|
|
|
|
|
if (err) {
|
|
|
|
|
|
|
|
delete err.depart
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(!err || Object.keys(err).length == 0){
|
|
|
|
let url=`/users/accounts/${basicInfo.id}.json`
|
|
|
|
let url=`/users/accounts/${basicInfo.id}.json`
|
|
|
|
axios.put((url),{
|
|
|
|
axios.put((url),{
|
|
|
|
nickname:values.nickname,
|
|
|
|
nickname:values.nickname,
|
|
|
@ -117,7 +121,9 @@ class AccountBasic extends Component {
|
|
|
|
department_id:this.state.department_id
|
|
|
|
department_id:this.state.department_id
|
|
|
|
}).then((result)=>{
|
|
|
|
}).then((result)=>{
|
|
|
|
if(result){
|
|
|
|
if(result){
|
|
|
|
|
|
|
|
this.props.showNotification('保存成功')
|
|
|
|
this.props.getBasicInfo();
|
|
|
|
this.props.getBasicInfo();
|
|
|
|
|
|
|
|
this.props.history.push('/account/profile')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}).catch((error)=>{
|
|
|
|
}).catch((error)=>{
|
|
|
|
console.log(error);
|
|
|
|
console.log(error);
|
|
|
|