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;
|
const { data} = this.props;
|
||||||
let page_num =Math.ceil( data.count / this.state.count);
|
let page_num =Math.ceil( data.count / this.state.count);
|
||||||
|
|
||||||
console.log(page_num)
|
|
||||||
|
|
||||||
|
|
||||||
let btnPages = []
|
let btnPages = []
|
||||||
for(let i = 1;i<page_num + 1;i++ )
|
for(let i = 1;i<page_num + 1;i++ )
|
||||||
{
|
{
|
||||||
console.log(1)
|
|
||||||
// let o = {}
|
// let o = {}
|
||||||
// o.page = i;
|
// o.page = i;
|
||||||
// o.text = i ;
|
// o.text = i ;
|
||||||
|
|
|
@ -12,7 +12,7 @@ export default class topNav extends React.Component{
|
||||||
navlists:this.props.listnav,
|
navlists:this.props.listnav,
|
||||||
menulinklist:JSON.parse( sessionStorage.getItem('menulinklist'))?JSON.parse( sessionStorage.getItem('menulinklist')):[],
|
menulinklist:JSON.parse( sessionStorage.getItem('menulinklist'))?JSON.parse( sessionStorage.getItem('menulinklist')):[],
|
||||||
linkshowname:sessionStorage.getItem('linkshowname'),
|
linkshowname:sessionStorage.getItem('linkshowname'),
|
||||||
showflag:JSON.parse( sessionStorage.getItem('showflag'))
|
showflag:JSON.parse( sessionStorage.getItem('showflag')),
|
||||||
}
|
}
|
||||||
|
|
||||||
this.backFn=this.backFn.bind(this)
|
this.backFn=this.backFn.bind(this)
|
||||||
|
@ -21,9 +21,9 @@ export default class topNav extends React.Component{
|
||||||
showlinkmenu(e,item){
|
showlinkmenu(e,item){
|
||||||
let self=this;
|
let self=this;
|
||||||
try{
|
try{
|
||||||
item.children.forEach(item=>{
|
item.children.forEach(it=>{
|
||||||
if(item.level ===5){
|
if(it.level ===5){
|
||||||
sessionStorage.setItem('pathname2',item.router);
|
sessionStorage.setItem('pathname2',it.router);
|
||||||
throw '终止循环'
|
throw '终止循环'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -32,7 +32,6 @@ export default class topNav extends React.Component{
|
||||||
self.setState({'linkshowname':item.title});
|
self.setState({'linkshowname':item.title});
|
||||||
self.setState({'menulinklist':item.children});
|
self.setState({'menulinklist':item.children});
|
||||||
|
|
||||||
|
|
||||||
// 防止刷新页面,导航签清空
|
// 防止刷新页面,导航签清空
|
||||||
sessionStorage.setItem('menulinklist',JSON.stringify(item.children));
|
sessionStorage.setItem('menulinklist',JSON.stringify(item.children));
|
||||||
sessionStorage.setItem('showflag',true);
|
sessionStorage.setItem('showflag',true);
|
||||||
|
@ -74,13 +73,23 @@ export default class topNav extends React.Component{
|
||||||
if(pathnamestr.includes('aid')){
|
if(pathnamestr.includes('aid')){
|
||||||
breaknav=JSON.parse(sessionStorage.getItem('subbreaknav'))
|
breaknav=JSON.parse(sessionStorage.getItem('subbreaknav'))
|
||||||
}
|
}
|
||||||
|
let accPath=null;
|
||||||
return(
|
return(
|
||||||
<div className="topheader">
|
<div className="topheader">
|
||||||
<div className='nava'>
|
<div className='nava'>
|
||||||
{
|
{
|
||||||
this.state.navlists.map((item,i)=>{
|
this.state.navlists.map((item,i)=>{
|
||||||
|
try{
|
||||||
|
item.children.forEach(it=>{
|
||||||
|
if(it.level ===5){
|
||||||
|
accPath=it.router;
|
||||||
|
throw '终止循环'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}catch(e){
|
||||||
|
}
|
||||||
return (
|
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 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"/>)}>
|
<Redirect to="/home/system/account-list"/>)}>
|
||||||
</Route>
|
</Route> */}
|
||||||
<Route path="/home/system/account-list" exact={true} component={accountlist} />
|
<Route path="/home/system/account-list" exact={true} component={accountlist} />
|
||||||
<Route path="/home/system/account-add" exact={true} component={accountadd} />
|
<Route path="/home/system/account-add" exact={true} component={accountadd} />
|
||||||
{/* <Route path="/home/system/subaccount-list" exact={true} component={subaccountlist} />
|
{/* <Route path="/home/system/subaccount-list" exact={true} component={subaccountlist} />
|
||||||
|
|
|
@ -68,7 +68,7 @@ function FormDom(props) {
|
||||||
},1000);
|
},1000);
|
||||||
throw '终止循环'
|
throw '终止循环'
|
||||||
}else{
|
}else{
|
||||||
sessionStorage.setItem('linkshowname',obj[0].title);
|
sessionStorage.setItem('linkshowname',item.title);
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
props.history.push(obj[0].router)
|
props.history.push(obj[0].router)
|
||||||
},1000);
|
},1000);
|
||||||
|
|
|
@ -515,7 +515,7 @@ componentDidUpdate(prevProps,prevState){
|
||||||
<Button type="default" icon="download" onClick={this.exportFn.bind(this)}>导出订单</Button>
|
<Button type="default" icon="download" onClick={this.exportFn.bind(this)}>导出订单</Button>
|
||||||
</p>
|
</p>
|
||||||
<div className="dfleac">
|
<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> */}
|
{/* <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'}/>:
|
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);
|
Notify.success(msg);
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
window.history.back()
|
window.history.back()
|
||||||
|
sessionStorage.setItem('pathname2','/home/system/account-list')
|
||||||
},1000);
|
},1000);
|
||||||
},(err)=>{
|
},(err)=>{
|
||||||
Notify.error(err)
|
Notify.error(err)
|
||||||
|
@ -142,6 +143,7 @@ export default class adduserinfo extends React.Component{
|
||||||
Notify.clear();
|
Notify.clear();
|
||||||
Notify.success(msg);
|
Notify.success(msg);
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
|
sessionStorage.setItem('pathname2','/home/system/account-list')
|
||||||
window.history.back()
|
window.history.back()
|
||||||
},1000);
|
},1000);
|
||||||
},(err)=>{
|
},(err)=>{
|
||||||
|
|
Loading…
Reference in New Issue