Commit d2fca4d9 authored by 黄奎's avatar 黄奎

页面修改

parent c47567ed
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
border-bottom: 1px solid #E6E6E6; border-bottom: 1px solid #E6E6E6;
height: 59px; height: 59px;
line-height: 59px; line-height: 59px;
padding-left:28px; padding-left: 28px;
} }
.leftMenu2 .el-submenu__title span { .leftMenu2 .el-submenu__title span {
...@@ -201,6 +201,7 @@ ...@@ -201,6 +201,7 @@
padding: 0 !important; padding: 0 !important;
text-align: center; text-align: center;
} }
.mainContainer .mainRightContent { .mainContainer .mainRightContent {
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -270,10 +271,12 @@ ...@@ -270,10 +271,12 @@
padding: 20px; padding: 20px;
overflow-y: scroll; overflow-y: scroll;
} }
.mainContainer .firstActive{
background-color: #fff!important; .mainContainer .firstActive {
color:#000000!important; background-color: #fff !important;
color: #000000 !important;
} }
</style> </style>
<template> <template>
<div class="mainContainer"> <div class="mainContainer">
...@@ -284,7 +287,8 @@ ...@@ -284,7 +287,8 @@
<div class="asideInner">{{currentUser.MallName}}</div> <div class="asideInner">{{currentUser.MallName}}</div>
</div> </div>
<ul> <ul>
<li class="menu-item" @mouseover="mouseOver(item)" v-for="(item,index) in MenuList" :class="{'firstActive':firstCked==item.MenuId}" @click="firstCked=item.MenuId" :key="index"> <li class="menu-item" @mouseover="mouseOver(item)" @mouseout="mouseOutMenu()" v-for="(item,index) in MenuList"
:class="{'firstActive':firstCked==item.MenuId}" @click="firstCked=item.MenuId" :key="index">
<i class="iconfont" :class="item.IconClass"></i> <i class="iconfont" :class="item.IconClass"></i>
<div class="vue-line-clamp">{{item.MenuName}}</div> <div class="vue-line-clamp">{{item.MenuName}}</div>
</li> </li>
...@@ -293,24 +297,28 @@ ...@@ -293,24 +297,28 @@
<div class="leftMenu2" v-if="showTwo"> <div class="leftMenu2" v-if="showTwo">
<div class="is-show-menu-1" @click="hideTwo()"> <div class="is-show-menu-1" @click="hideTwo()">
<<</div> <div class="menu-item-2-title"> <<</div> <div class="menu-item-2-title">
{{secondList.MenuName}} {{secondItem.MenuName}}
</div> </div>
<div> <div>
<el-menu :default-active="defaultActive" :unique-opened="true" class="el-menu-vertical-demo"> <el-menu :default-active="defaultActive" :unique-opened="true" class="el-menu-vertical-demo">
<template v-for="(childItem,childIndex) in secondList.SubList"> <template v-for="(childItem,childIndex) in secondItem.SubList">
<el-submenu v-if="childItem.ThirdList.length>0" :index="childItem.MenuId+''" :key="childIndex"> <el-submenu v-if="childItem.ThirdList.length>0" :index="childItem.MenuId+''" :key="childIndex">
<template slot="title"> <template slot="title">
<span>{{childItem.MenuName}}</span> <span>{{childItem.MenuName}}</span>
</template> </template>
<el-menu-item-group> <el-menu-item-group>
<el-menu-item :index="thirdChild.MenuId+''" @click.native="clickMenu(thirdChild)" v-for="(thirdChild,thirdIndex) in childItem.ThirdList" :key="thirdIndex"> <el-menu-item :index="thirdChild.MenuId+''" @click.native="clickMenu(thirdChild,secondItem)"
<div class="checkBlock" :class="defaultActive==thirdChild.MenuId?'isActive':''">{{thirdChild.MenuName}}</div> v-for="(thirdChild,thirdIndex) in childItem.ThirdList" :key="thirdIndex">
<div class="checkBlock" :class="defaultActive==thirdChild.MenuId?'isActive':''">
{{thirdChild.MenuName}}</div>
</el-menu-item> </el-menu-item>
</el-menu-item-group> </el-menu-item-group>
</el-submenu> </el-submenu>
<template v-else> <template v-else>
<el-menu-item :index="childItem.MenuId+''" @click.native="clickMenu(childItem)" :key="childItem.MenuId"> <el-menu-item :index="childItem.MenuId+''" @click.native="clickMenu(childItem,secondItem)"
<div class="checkBlock" style="margin-left:-7px;" :class="defaultActive==childItem.MenuId?'isActive':''">{{childItem.MenuName}}</div> :key="childItem.MenuId">
<div class="checkBlock" style="margin-left:-7px;"
:class="defaultActive==childItem.MenuId?'isActive':''">{{childItem.MenuName}}</div>
</el-menu-item> </el-menu-item>
</template> </template>
</template> </template>
...@@ -364,10 +372,10 @@ ...@@ -364,10 +372,10 @@
showTwo: false, showTwo: false,
defaultActive: '9', defaultActive: '9',
currentUser: {}, currentUser: {},
Height:0, Height: 0,
MenuList: [], //菜单列表 MenuList: [], //菜单列表
secondList:{}, secondItem: {},
firstCked:0 firstCked: 0
}; };
}, },
created() { created() {
...@@ -383,7 +391,6 @@ ...@@ -383,7 +391,6 @@
this.apipost("/api/Tenant/GetMenuList", {}, res => { this.apipost("/api/Tenant/GetMenuList", {}, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.MenuList = res.data.data; this.MenuList = res.data.data;
console.log("this.MenuList",this.MenuList);
} else { } else {
this.Info(res.data.message); this.Info(res.data.message);
} }
...@@ -398,12 +405,22 @@ ...@@ -398,12 +405,22 @@
mouseOver(item) { mouseOver(item) {
this.showTwo = true; this.showTwo = true;
this.isShowOne = false; this.isShowOne = false;
this.secondList=item; this.secondItem = item;
},
//鼠标移除
mouseOutMenu() {
this.MenuList.forEach(item => {
if (item.MenuId == firstCked) {
this.secondItem = item;
}
})
}, },
//菜单点击 //菜单点击
clickMenu(item){ clickMenu(item, secondItem) {
this.defaultActive=item.MenuId+''; //选中当前大类
if(item.MenuUrl&&item.MenuUrl!=''){ this.firstCked = secondItem.MenuId;
this.defaultActive = item.MenuId + '';
if (item.MenuUrl && item.MenuUrl != '') {
this.$router.push({ this.$router.push({
path: item.MenuUrl path: item.MenuUrl
}); });
...@@ -411,12 +428,12 @@ ...@@ -411,12 +428,12 @@
} }
}, },
mounted() { mounted() {
this.getMenuList(); this.getMenuList();
this.Height = document.documentElement.clientHeight - 60; this.Height = document.documentElement.clientHeight - 60;
//监听浏览器窗口变化  //监听浏览器窗口变化 
window.onresize = () => { window.onresize = () => {
this.Height = document.documentElement.clientHeight - 60 this.Height = document.documentElement.clientHeight - 60
} }
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment