|
|
|
@ -31,7 +31,7 @@
|
|
|
|
|
<!-- <Header :style="{background: '#fff', boxShadow: '0 2px 3px 2px rgba(0,0,0,.1)'}"></Header>-->
|
|
|
|
|
<Content :style="{padding: '0 16px 16px'}">
|
|
|
|
|
<Breadcrumb :style="{margin: '16px 0'}">
|
|
|
|
|
<BreadcrumbItem>{{selectedMenu}}</BreadcrumbItem>
|
|
|
|
|
<BreadcrumbItem><span style="cursor: pointer" @click="breadcrumbClick">{{selectedMenu}}</span></BreadcrumbItem>
|
|
|
|
|
<BreadcrumbItem>{{selectedSubMenu}}</BreadcrumbItem>
|
|
|
|
|
</Breadcrumb>
|
|
|
|
|
<Card>
|
|
|
|
@ -51,10 +51,12 @@
|
|
|
|
|
provide() {
|
|
|
|
|
return {
|
|
|
|
|
checkParamBlank: this.checkParamBlank,
|
|
|
|
|
setMenuName: this.setMenuName,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
mainUrl: "/customer/view",
|
|
|
|
|
isCollapsed: false,
|
|
|
|
|
mHeight: 600,
|
|
|
|
|
selectedItemName: null,
|
|
|
|
@ -71,6 +73,8 @@
|
|
|
|
|
twoPermissionList: [],
|
|
|
|
|
//3级权限
|
|
|
|
|
threePermissionList: [],
|
|
|
|
|
//面包屑点击跳转路径
|
|
|
|
|
breadcrumbUrl: "",
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
@ -127,6 +131,7 @@
|
|
|
|
|
if (cItem.id === val) {
|
|
|
|
|
this.selectedMenu = item.name;
|
|
|
|
|
this.selectedSubMenu = cItem.name;
|
|
|
|
|
this.breadcrumbUrl = cItem.resource;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -239,12 +244,14 @@
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
//导航栏点击
|
|
|
|
|
//导航栏初始化
|
|
|
|
|
menuInit: function () {
|
|
|
|
|
let that = this;
|
|
|
|
|
//默认首页
|
|
|
|
|
that.selectedItemName = 0;
|
|
|
|
|
this.$router.push({path: "/customer/view"});
|
|
|
|
|
this.$router.push({path: that.mainUrl});
|
|
|
|
|
this.selectedMenu = "首页";
|
|
|
|
|
this.breadcrumbUrl = this.mainUrl;
|
|
|
|
|
// that.selectedItemName = that.onePermissionList[0].subMenuList[0].id;
|
|
|
|
|
// that.openName = [that.onePermissionList[0].id];
|
|
|
|
|
// this.$nextTick(() => {
|
|
|
|
@ -273,6 +280,18 @@
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
that.$refs.menu.updateActiveName();
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
//手动设置面包屑
|
|
|
|
|
setMenuName: function (menu1, menu2) {
|
|
|
|
|
this.selectedMenu = menu1;
|
|
|
|
|
this.selectedSubMenu = menu2;
|
|
|
|
|
},
|
|
|
|
|
//面包屑点击跳转
|
|
|
|
|
breadcrumbClick: function () {
|
|
|
|
|
if(this.selectedMenu === "首页"){
|
|
|
|
|
this.selectedSubMenu = "";
|
|
|
|
|
}
|
|
|
|
|
this.$router.push(this.breadcrumbUrl);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|