diff --git a/src/components/gird/main.css b/src/components/gird/main.css index ba00cc8b..70c4a740 100644 --- a/src/components/gird/main.css +++ b/src/components/gird/main.css @@ -9,6 +9,7 @@ height: 48px; display: inline-flex; min-width: 100%; + border-bottom: 1px solid #ddd; } .th-td { @@ -42,7 +43,6 @@ padding: 28px 0; color: rgba(0, 0, 0, .6); font-size: 12px; - border-top: 1px solid #dfe1e6; } @@ -86,7 +86,9 @@ border: none; } - +.th-body .tr:first-child .td{ + border-top: 0; +} .td { display: flex; min-height: 40px; diff --git a/src/components/mouseMenu/main.js b/src/components/mouseMenu/main.js index a59a4b6f..9054deaa 100644 --- a/src/components/mouseMenu/main.js +++ b/src/components/mouseMenu/main.js @@ -1,49 +1,70 @@ import React from "react" import ReactDOM from "react-dom" import "./main.less" -import {Icon} from "zent" +import { Icon } from "zent" import { HashRouter as Router, Route, Link } from "react-router-dom"; import Bus from "../../assets/eventBus.js"; -export default class MouseMenu extends React.Component{ - constructor(props){ - super(props); - this.state={ - activeMenuList:[]//总动态路由数据 +export default class MouseMenu extends React.Component { + constructor(props) { + super(props); + this.state = { + activeMenuList: []//总动态路由数据 + } + } + componentDidMount() { + let activeMenuList = JSON.parse(sessionStorage.getItem("activeMenu")); + this.setState({ activeMenuList }); + } + closeMenuMask() { + this.props.mouseLeaveFn(); + } + //点击菜单 + clickMenuItem(e, it) { + if (it.router == '/home/distributor-add') { + sessionStorage.setItem('pathname2', '/home/system/distributor-add') + let activerou = [{ + 'pagetitle': '新建', items: [ + { + "path": "distributor-list", + "name": "分销商管理" + }, + { + "path": "distributor-add", + "name": "新建分销商" + } + ] + }] + sessionStorage.setItem('breaknav', JSON.stringify(activerou)); + + } + this.props.mouseLeaveFn(); + } + render() { + let menuList = this.state.activeMenuList;//路由表 + const pathname = window.location.href.lastIndexOf('\/'); + const pathnamestr = window.location.href.substr(pathname); + return ( +
+
+
+ { + menuList.map((item, i) => { + return ( +
+ { + item.children.map((childItem, childI) => { + return ( + childItem.level == 5 ? = 1 ? 'mouse_menuactive menu_items' : 'menu_items'} onClick={(e) => this.clickMenuItem(e, childItem)}>{childItem.title} : null + ) + }) + } +
+ ) + }) + } +
+ +
+
) } - } - componentDidMount(){ - let activeMenuList = JSON.parse(sessionStorage.getItem("activeMenu")); - this.setState({activeMenuList}); - } - closeMenuMask(){ - this.props.mouseLeaveFn(); - } - render(){ - let menuList=this.state.activeMenuList;//路由表 - const pathname=window.location.href.lastIndexOf('\/'); - const pathnamestr=window.location.href.substr(pathname); - return( -
-
-
- { - menuList.map((item,i)=>{ - return( -
- { - item.children.map((childItem,childI)=>{ - return( - childItem.level==5?=1?'mouse_menuactive menu_items':'menu_items'} onClick={this.closeMenuMask.bind(this)}>{childItem.title}:null - ) - }) - } -
- ) - }) - } -
- -
-
) - } } \ No newline at end of file diff --git a/src/components/subnav/main.js b/src/components/subnav/main.js index 73b51ca4..4b40990d 100644 --- a/src/components/subnav/main.js +++ b/src/components/subnav/main.js @@ -80,11 +80,11 @@ export default class topNav extends React.Component{ let pathnameBreak=sessionStorage.getItem('pathname2') const pathname=window.location.href.lastIndexOf('\/'); const pathnamestr=window.location.href.substr(pathname); - let breakflag=pathnamestr.includes('add')||pathnamestr.includes('aid')||pathnamestr.includes('key-list')||pathnamestr.includes('key-detail')||pathnamestr.includes('key-edit')||pathnamestr.includes('exchangecode-edit')||pathnamestr.includes('plan-edit')||pathnamestr.includes('product-edit'); + let breakflag=pathnamestr.includes('add')||pathnamestr.includes('aid')||pathnamestr.includes('distributor-edit')||pathnamestr.includes('key-list')||pathnamestr.includes('key-detail')||pathnamestr.includes('key-edit')||pathnamestr.includes('exchangecode-edit')||pathnamestr.includes('plan-edit')||pathnamestr.includes('product-edit'); let sedcbreakflag=pathnamestr.includes('plan-create'); let planbreakflag = pathnamestr.includes('mytempMould') let editbreakflag = pathnamestr.includes('edittemplate') - let backshow=pathnamestr.includes('account-add')||pathnamestr.includes('role-add')||pathnamestr.includes('subaccount-add')||pathnamestr.includes('distributor-add')||pathnamestr.includes('exchangecode-edit')||pathnamestr.includes('plan-edit')||pathnamestr.includes('key-list')||pathnamestr.includes('exchange-addcommodity'); + let backshow=pathnamestr.includes('account-add')||pathnamestr.includes('role-add')||pathnamestr.includes('subaccount-add')||pathnamestr.includes('exchangecode-edit')||pathnamestr.includes('plan-edit')||pathnamestr.includes('key-list')||pathnamestr.includes('exchange-addcommodity'); let breakchange = pathnamestr.includes('exchangecode-add')|| pathnamestr.includes('key-edit')||pathnamestr.includes('key-detail')||pathnamestr.includes('product-edit')||pathnamestr.includes('plan-edit'); if(breakchange){ breaknav=JSON.parse(sessionStorage.getItem('breakchangenav'))