Merge branch 'dev_1.0.2'
# Conflicts: # src/components/subnav/main.js 解决导航与内容误差
This commit is contained in:
commit
a4e1c79cc5
|
@ -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<page_num + 1;i++ )
|
||||
{
|
||||
console.log(1)
|
||||
// let o = {}
|
||||
// o.page = i;
|
||||
// o.text = i ;
|
||||
|
|
|
@ -12,7 +12,7 @@ export default class topNav extends React.Component{
|
|||
navlists:this.props.listnav,
|
||||
menulinklist:JSON.parse( sessionStorage.getItem('menulinklist'))?JSON.parse( sessionStorage.getItem('menulinklist')):[],
|
||||
linkshowname:sessionStorage.getItem('linkshowname'),
|
||||
showflag:JSON.parse( sessionStorage.getItem('showflag'))
|
||||
showflag:JSON.parse( sessionStorage.getItem('showflag')),
|
||||
}
|
||||
|
||||
this.backFn=this.backFn.bind(this)
|
||||
|
@ -21,9 +21,9 @@ export default class topNav extends React.Component{
|
|||
showlinkmenu(e,item){
|
||||
let self=this;
|
||||
try{
|
||||
item.children.forEach(item=>{
|
||||
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(
|
||||
<div className="topheader">
|
||||
<div className='nava'>
|
||||
{
|
||||
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?<Link key={i} to={item.router} style={this.state.linkshowname==item.title?{width:"#100%",background:"#f2f4f7",color:'#296bef'}:null} className={this.state.linkshowname==item.title?'active':''} onClick={(e)=>this.showlinkmenu(e,item)} >{item.title}</Link>:null
|
||||
item.children&&item.children.length>0?<Link key={i} to={item.router=='/system'?accPath:item.router} style={this.state.linkshowname==item.title?{width:"#100%",background:"#f2f4f7",color:'#296bef'}:null} className={this.state.linkshowname==item.title?'active':''} onClick={(e)=>this.showlinkmenu(e,item)} >{item.title}</Link>:null
|
||||
|
||||
)
|
||||
})
|
||||
|
|
|
@ -374,10 +374,10 @@ export default class App extends Component {
|
|||
|
||||
<Route path="/home/addkeyorder" exact={true} component={keyorderlist} />
|
||||
|
||||
<Route exact={true} path="/system" render={
|
||||
{/* <Route exact={true} path="/system" render={
|
||||
()=> (
|
||||
<Redirect to="/home/system/account-list"/>)}>
|
||||
</Route>
|
||||
</Route> */}
|
||||
<Route path="/home/system/account-list" exact={true} component={accountlist} />
|
||||
<Route path="/home/system/account-add" exact={true} component={accountadd} />
|
||||
{/* <Route path="/home/system/subaccount-list" exact={true} component={subaccountlist} />
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -515,7 +515,7 @@ componentDidUpdate(prevProps,prevState){
|
|||
<Button type="default" icon="download" onClick={this.exportFn.bind(this)}>导出订单</Button>
|
||||
</p>
|
||||
<div className="dfleac">
|
||||
<Select width="180px" value={this.state.option} onChange={(e)=>this.optiononChange(e)} options={options} clearable placeholder="请输入关键字查询" />
|
||||
<Select width="180px" value={this.state.option} onChange={(e)=>this.optiononChange(e)} disableSearch options={options} clearable placeholder="请选择查询分类" />
|
||||
{/* <Button type="info">批量操作</Button> */}
|
||||
{
|
||||
this.state.option?this.state.option.key=='1'? <Ipt labelWidth={0} onClearItem={(e)=>{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'}/>:
|
||||
|
|
|
@ -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)=>{
|
||||
|
|
Loading…
Reference in New Issue