|
|
|
@ -11,6 +11,10 @@
|
|
|
|
|
<Menu ref="menu" :active-name="selectedItemName" :open-names="openName" theme="dark" width="auto"
|
|
|
|
|
:class="menuitemClasses"
|
|
|
|
|
@on-select="onSelectLister" :accordion="true">
|
|
|
|
|
<MenuItem :name="0" to="/customer/view">
|
|
|
|
|
<Icon type="ios-paper"/>
|
|
|
|
|
<span style="margin-left: 7px">首页</span>
|
|
|
|
|
</MenuItem>
|
|
|
|
|
<Submenu :name="item.id" v-for="item in onePermissionList" :key="item.id">
|
|
|
|
|
<template slot="title">
|
|
|
|
|
<Icon type="ios-paper"/>
|
|
|
|
@ -108,7 +112,14 @@
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
sessionStorage.setItem("threeLevel",JSON.stringify(i.subMenuList));
|
|
|
|
|
if(i){
|
|
|
|
|
sessionStorage.setItem("threeLevel",JSON.stringify(i.subMenuList));
|
|
|
|
|
}
|
|
|
|
|
//首页
|
|
|
|
|
if(val === 0){
|
|
|
|
|
this.selectedMenu = "首页";
|
|
|
|
|
this.selectedSubMenu = "";
|
|
|
|
|
}
|
|
|
|
|
for (let i = 0; i < this.onePermissionList.length; i++) {
|
|
|
|
|
let item = this.onePermissionList[i];
|
|
|
|
|
for (let k = 0; k < item.subMenuList.length; k++) {
|
|
|
|
@ -231,20 +242,23 @@
|
|
|
|
|
//导航栏点击
|
|
|
|
|
menuInit: function () {
|
|
|
|
|
let that = this;
|
|
|
|
|
that.selectedItemName = that.onePermissionList[0].subMenuList[0].id;
|
|
|
|
|
that.openName = [that.onePermissionList[0].id];
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.$refs.menu.updateOpened();
|
|
|
|
|
this.$refs.menu.updateActiveName();
|
|
|
|
|
});
|
|
|
|
|
this.selectedMenu = this.onePermissionList[0].name;
|
|
|
|
|
this.selectedSubMenu = this.onePermissionList[0].subMenuList[0].name;
|
|
|
|
|
sessionStorage.setItem("threeLevel",JSON.stringify(this.onePermissionList[0].subMenuList[0].subMenuList));
|
|
|
|
|
this.$router.push({path: that.onePermissionList[0].subMenuList[0].resource});
|
|
|
|
|
//默认首页
|
|
|
|
|
that.selectedItemName = 0;
|
|
|
|
|
this.$router.push({path: "/customer/view"});
|
|
|
|
|
// that.selectedItemName = that.onePermissionList[0].subMenuList[0].id;
|
|
|
|
|
// that.openName = [that.onePermissionList[0].id];
|
|
|
|
|
// this.$nextTick(() => {
|
|
|
|
|
// this.$refs.menu.updateOpened();
|
|
|
|
|
// this.$refs.menu.updateActiveName();
|
|
|
|
|
// });
|
|
|
|
|
// this.selectedMenu = this.onePermissionList[0].name;
|
|
|
|
|
// this.selectedSubMenu = this.onePermissionList[0].subMenuList[0].name;
|
|
|
|
|
// sessionStorage.setItem("threeLevel",JSON.stringify(this.onePermissionList[0].subMenuList[0].subMenuList));
|
|
|
|
|
// this.$router.push({path: that.onePermissionList[0].subMenuList[0].resource});
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
//账户管理页面回调方法
|
|
|
|
|
callBack() {
|
|
|
|
|
debugger
|
|
|
|
|
let that = this;
|
|
|
|
|
this.selectedMenu = "设置管理";
|
|
|
|
|
this.selectedSubMenu = "账户管理";
|
|
|
|
|