From 501101ee3647e8768811d4883a26880228e5f39a Mon Sep 17 00:00:00 2001 From: red-deng-deng <1924913374@qq.com> Date: Sun, 28 Nov 2021 13:59:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E5=A4=B4=E5=83=8F=EF=BC=8C?= =?UTF-8?q?=E8=A7=A3=E5=86=B3=E8=B4=A6=E5=8F=B7=E7=BC=96=E8=BE=91=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/home/home.js | 6 +++--- .../account/add/adduserinfo/adduserinfo.js | 7 ++++--- src/pages/system/account/list/list.js | 19 ++++++++++++++++++- 3 files changed, 25 insertions(+), 7 deletions(-) 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); };