diff --git a/src/components/pagination/main.js b/src/components/pagination/main.js index 9494398b..572d8dc6 100644 --- a/src/components/pagination/main.js +++ b/src/components/pagination/main.js @@ -155,13 +155,10 @@ import _ from "lodash"; const { data} = this.props; let page_num =Math.ceil( data.count / this.state.count); - console.log(page_num) - let btnPages = [] for(let i = 1;i{ - if(item.level ===5){ - sessionStorage.setItem('pathname2',item.router); + item.children.forEach(it=>{ + if(it.level ===5){ + sessionStorage.setItem('pathname2',it.router); throw '终止循环' } }) @@ -32,7 +32,6 @@ export default class topNav extends React.Component{ self.setState({'linkshowname':item.title}); self.setState({'menulinklist':item.children}); - // 防止刷新页面,导航签清空 sessionStorage.setItem('menulinklist',JSON.stringify(item.children)); sessionStorage.setItem('showflag',true); @@ -74,13 +73,23 @@ export default class topNav extends React.Component{ if(pathnamestr.includes('aid')){ breaknav=JSON.parse(sessionStorage.getItem('subbreaknav')) } + let accPath=null; return(
{ this.state.navlists.map((item,i)=>{ + try{ + item.children.forEach(it=>{ + if(it.level ===5){ + accPath=it.router; + throw '终止循环' + } + }) + }catch(e){ + } return ( - item.children&&item.children.length>0?this.showlinkmenu(e,item)} >{item.title}:null + item.children&&item.children.length>0?this.showlinkmenu(e,item)} >{item.title}:null ) }) diff --git a/src/pages/home/home.js b/src/pages/home/home.js index 3c1e4602..b664c2e4 100644 --- a/src/pages/home/home.js +++ b/src/pages/home/home.js @@ -374,10 +374,10 @@ export default class App extends Component { - ( )}> - + */} {/* diff --git a/src/pages/login/loginform.js b/src/pages/login/loginform.js index dd359e49..b23f5aa0 100644 --- a/src/pages/login/loginform.js +++ b/src/pages/login/loginform.js @@ -68,7 +68,7 @@ function FormDom(props) { },1000); throw '终止循环' }else{ - sessionStorage.setItem('linkshowname',obj[0].title); + sessionStorage.setItem('linkshowname',item.title); setTimeout(()=>{ props.history.push(obj[0].router) },1000); diff --git a/src/pages/order/list/list.js b/src/pages/order/list/list.js index e48508b8..94b9c86d 100644 --- a/src/pages/order/list/list.js +++ b/src/pages/order/list/list.js @@ -515,7 +515,7 @@ componentDidUpdate(prevProps,prevState){

- this.optiononChange(e)} disableSearch options={options} clearable placeholder="请选择查询分类" /> {/* */} { this.state.option?this.state.option.key=='1'? {this.setState({key_word:''})}} wordSearch={this.sureFn.bind(this)} onChange={(e)=>this.setState({key_word:e})} value={this.state.key_word} icon="search" placeholder={"请输入key进行搜索"} countShow={false} height={'36px'} width={'260px'} alignment={'left'}/>: diff --git a/src/pages/system/account/add/adduserinfo/adduserinfo.js b/src/pages/system/account/add/adduserinfo/adduserinfo.js index 7c7252c4..b4306b22 100644 --- a/src/pages/system/account/add/adduserinfo/adduserinfo.js +++ b/src/pages/system/account/add/adduserinfo/adduserinfo.js @@ -127,6 +127,7 @@ export default class adduserinfo extends React.Component{ Notify.success(msg); setTimeout(()=>{ window.history.back() + sessionStorage.setItem('pathname2','/home/system/account-list') },1000); },(err)=>{ Notify.error(err) @@ -142,6 +143,7 @@ export default class adduserinfo extends React.Component{ Notify.clear(); Notify.success(msg); setTimeout(()=>{ + sessionStorage.setItem('pathname2','/home/system/account-list') window.history.back() },1000); },(err)=>{