diff --git a/src/pages/home/home.js b/src/pages/home/home.js index 2f954ecc..bd9d1a55 100644 --- a/src/pages/home/home.js +++ b/src/pages/home/home.js @@ -261,13 +261,13 @@ export default class App extends Component {

- {!this.state.userInfo.head? : }

- {this.state.userInfo.user_name} - 手机号:{this.state.userInfo.mobile} + 姓名:{this.state.userInfo.real_name} + 账号:{this.state.userInfo.user_name}

diff --git a/src/pages/system/account/add/adduserinfo/adduserinfo.js b/src/pages/system/account/add/adduserinfo/adduserinfo.js index ade1ce40..62ed44f5 100644 --- a/src/pages/system/account/add/adduserinfo/adduserinfo.js +++ b/src/pages/system/account/add/adduserinfo/adduserinfo.js @@ -45,7 +45,7 @@ export default class adduserinfo extends React.Component{ if(!companys){ this.getCompanyFn();//获取公司 } - + console.log(51,companys); this.getRoleFn();//获取角色 let formInfo=this.props; @@ -282,8 +282,9 @@ export default class adduserinfo extends React.Component{ let companyList=response.map(item=>{ return {key:item.id,text:item.company_name} }); - _self.setState({companyList}); sessionStorage.setItem('company',JSON.stringify(companyList)); + _self.setState({companyList}); + },(err)=>{ }) @@ -475,7 +476,7 @@ export default class adduserinfo extends React.Component{ this.state.defaultFileList[0].src==''?{this.onUploadChange(e)}} onUpload={this.onUpload} diff --git a/src/pages/system/account/list/list.js b/src/pages/system/account/list/list.js index 80116d39..d5080f85 100644 --- a/src/pages/system/account/list/list.js +++ b/src/pages/system/account/list/list.js @@ -5,7 +5,7 @@ import "./list.less" import {Switch ,Icon ,Sweetalert, Notify,Dialog,Button} from 'zent'; import TabPage from "../../../../components/tabPage/main.js" import "../../../../assets/comm.css" -import {getAccountList,handelResponse,putAccountStatus,delAccount} from "../../../../assets/api.js" +import {getAccountList,handelResponse,getCompany,putAccountStatus,delAccount} from "../../../../assets/api.js" import Grid from "../../../../components/gird/main.js" import Ipt from "../../../../components/input/main" import Modifypwd from "./modifypwd" @@ -98,7 +98,24 @@ export default class acclistDom extends React.Component{ } ]}] sessionStorage.setItem('breaknav',JSON.stringify(activerou)); + this.getCompanyFn(); } + //获取公司 + getCompanyFn(){ + let _self=this; + getCompany().then(res=>{ + handelResponse(res,(response,msg)=>{ + let companyList=response.map(item=>{ + return {key:item.id,text:item.company_name} + }); + sessionStorage.setItem('company',JSON.stringify(companyList)); + + },(err)=>{ + + }) + }).catch(err=>{ + }); +} onChange = options => { this.setState(options); };