|
|
|
@ -17,7 +17,6 @@
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<Menu ref="menu" :active-name="selectedItemName" :open-names="openName" theme="dark" width="auto"
|
|
|
|
|
:class="menuitemClasses"
|
|
|
|
|
@on-select="onSelectLister" :accordion="true">
|
|
|
|
|
<MenuItem v-if="roleCode === 'GLY-ADMIN' || roleCode === 'DG-YUNYING' || roleCode === 'GL-YUNYING'" :name="0" to="/customer/view">
|
|
|
|
|
<Icon type="ios-paper"/>
|
|
|
|
@ -43,7 +42,7 @@
|
|
|
|
|
<BreadcrumbItem>{{selectedSubMenu}}</BreadcrumbItem>
|
|
|
|
|
</Breadcrumb>
|
|
|
|
|
<Card>
|
|
|
|
|
<div :style="{'height':mHeight + 'px'}">
|
|
|
|
|
<div :style="{'min-height':mHeight + 'px'}">
|
|
|
|
|
<router-view/>
|
|
|
|
|
</div>
|
|
|
|
|
</Card>
|
|
|
|
@ -68,7 +67,7 @@
|
|
|
|
|
mainUrl: "/customer/view",
|
|
|
|
|
isCollapsed: false,
|
|
|
|
|
mHeight: 600,
|
|
|
|
|
selectedItemName: null,
|
|
|
|
|
selectedItemName: "",
|
|
|
|
|
openName: [],
|
|
|
|
|
selectedMenu: '',
|
|
|
|
|
selectedSubMenu: '',
|
|
|
|
@ -88,32 +87,32 @@
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
let that = this;
|
|
|
|
|
this.bus.$on('callBack', function () {
|
|
|
|
|
that.callBack();
|
|
|
|
|
})
|
|
|
|
|
this.bus.$on('setHeader', function (data) {
|
|
|
|
|
that.setHeader(data);
|
|
|
|
|
this.bus.$on('callBack', function (item) {
|
|
|
|
|
that.callBack(item);
|
|
|
|
|
})
|
|
|
|
|
// this.bus.$on('setHeader', function (data) {
|
|
|
|
|
// that.setHeader(data);
|
|
|
|
|
// })
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.mHeight = window.screen.availHeight - 22;
|
|
|
|
|
// this.mHeight = window.screen.availHeight - 22;
|
|
|
|
|
|
|
|
|
|
//获取导航栏权限
|
|
|
|
|
this.listOnePermission(this.onePermissionLevel);
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
rotateIcon() {
|
|
|
|
|
return [
|
|
|
|
|
'menu-icon',
|
|
|
|
|
this.isCollapsed ? 'rotate-icon' : ''
|
|
|
|
|
];
|
|
|
|
|
},
|
|
|
|
|
menuitemClasses() {
|
|
|
|
|
return [
|
|
|
|
|
'menu-item',
|
|
|
|
|
this.isCollapsed ? 'collapsed-menu' : ''
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
watch: {
|
|
|
|
|
'selectedItemName' (val) {
|
|
|
|
|
console.log(val);
|
|
|
|
|
let that = this;
|
|
|
|
|
// that.openName = [that.onePermissionList[2]];
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
that.$refs.menu.updateActiveName();
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
onSelectLister(val) {
|
|
|
|
@ -134,6 +133,7 @@
|
|
|
|
|
this.selectedSubMenu = "";
|
|
|
|
|
this.breadcrumbUrl = this.mainUrl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for (let i = 0; i < this.onePermissionList.length; i++) {
|
|
|
|
|
let item = this.onePermissionList[i];
|
|
|
|
|
for (let k = 0; k < item.subMenuList.length; k++) {
|
|
|
|
@ -141,6 +141,7 @@
|
|
|
|
|
if (cItem.id === val) {
|
|
|
|
|
this.selectedMenu = item.name;
|
|
|
|
|
this.selectedSubMenu = cItem.name;
|
|
|
|
|
this.selectedItemName = cItem.id;
|
|
|
|
|
this.breadcrumbUrl = cItem.resource;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -266,29 +267,25 @@
|
|
|
|
|
}else{
|
|
|
|
|
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.$nextTick(() => {
|
|
|
|
|
// this.$refs.menu.updateOpened();
|
|
|
|
|
// this.$refs.menu.updateActiveName();
|
|
|
|
|
// });
|
|
|
|
|
this.$router.push({path: that.onePermissionList[0].subMenuList[0].resource});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
//账户管理页面回调方法
|
|
|
|
|
callBack() {
|
|
|
|
|
callBack(item) {
|
|
|
|
|
let that = this;
|
|
|
|
|
debugger
|
|
|
|
|
this.selectedMenu = "设置管理";
|
|
|
|
|
this.selectedSubMenu = "账户管理";
|
|
|
|
|
this.selectedItemName = this.onePermissionList[2].subMenuList[0].id;
|
|
|
|
|
|
|
|
|
|
// this.$router.push({path: '/account/manager',query:item});
|
|
|
|
|
// this.$nextTick(() => {
|
|
|
|
|
// that.$refs.menu.updateActiveName();
|
|
|
|
|
// })
|
|
|
|
|
this.$router.push({path: '/account/manager',query:item});
|
|
|
|
|
},
|
|
|
|
|
setHeader(data){
|
|
|
|
|
let that = this;
|
|
|
|
@ -318,7 +315,6 @@
|
|
|
|
|
this.$Message.info("登出成功");
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style scoped>
|
|
|
|
@ -327,35 +323,6 @@
|
|
|
|
|
height: 100%;
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.menu-item span {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
width: 69px;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
vertical-align: bottom;
|
|
|
|
|
transition: width .2s ease .2s;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.menu-item i {
|
|
|
|
|
transform: translateX(0px);
|
|
|
|
|
transition: font-size .2s ease, transform .2s ease;
|
|
|
|
|
vertical-align: middle;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.collapsed-menu span {
|
|
|
|
|
width: 0px;
|
|
|
|
|
transition: width .2s ease;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.collapsed-menu i {
|
|
|
|
|
transform: translateX(5px);
|
|
|
|
|
transition: font-size .2s ease .2s, transform .2s ease .2s;
|
|
|
|
|
vertical-align: middle;
|
|
|
|
|
font-size: 22px;
|
|
|
|
|
}
|
|
|
|
|
/*项目标题*/
|
|
|
|
|
.project-title{
|
|
|
|
|
font-size: 22px;
|
|
|
|
|