设置管理-角色管理,点击右侧数字调整到账户管理页面,左侧应选中账户管理而不是角色管理修改。

master
kevin jiang 6 years ago
parent bc426abc16
commit c946e581f2

@ -17,7 +17,6 @@
</div> </div>
<Menu ref="menu" :active-name="selectedItemName" :open-names="openName" theme="dark" width="auto" <Menu ref="menu" :active-name="selectedItemName" :open-names="openName" theme="dark" width="auto"
:class="menuitemClasses"
@on-select="onSelectLister" :accordion="true"> @on-select="onSelectLister" :accordion="true">
<MenuItem v-if="roleCode === 'GLY-ADMIN' || roleCode === 'DG-YUNYING' || roleCode === 'GL-YUNYING'" :name="0" to="/customer/view"> <MenuItem v-if="roleCode === 'GLY-ADMIN' || roleCode === 'DG-YUNYING' || roleCode === 'GL-YUNYING'" :name="0" to="/customer/view">
<Icon type="ios-paper"/> <Icon type="ios-paper"/>
@ -43,7 +42,7 @@
<BreadcrumbItem>{{selectedSubMenu}}</BreadcrumbItem> <BreadcrumbItem>{{selectedSubMenu}}</BreadcrumbItem>
</Breadcrumb> </Breadcrumb>
<Card> <Card>
<div :style="{'height':mHeight + 'px'}"> <div :style="{'min-height':mHeight + 'px'}">
<router-view/> <router-view/>
</div> </div>
</Card> </Card>
@ -68,7 +67,7 @@
mainUrl: "/customer/view", mainUrl: "/customer/view",
isCollapsed: false, isCollapsed: false,
mHeight: 600, mHeight: 600,
selectedItemName: null, selectedItemName: "",
openName: [], openName: [],
selectedMenu: '', selectedMenu: '',
selectedSubMenu: '', selectedSubMenu: '',
@ -88,32 +87,32 @@
}, },
mounted() { mounted() {
let that = this; let that = this;
this.bus.$on('callBack', function () { this.bus.$on('callBack', function (item) {
that.callBack(); that.callBack(item);
})
this.bus.$on('setHeader', function (data) {
that.setHeader(data);
}) })
// this.bus.$on('setHeader', function (data) {
// that.setHeader(data);
// })
}, },
created() { created() {
this.mHeight = window.screen.availHeight - 22; // this.mHeight = window.screen.availHeight - 22;
// //
this.listOnePermission(this.onePermissionLevel); this.listOnePermission(this.onePermissionLevel);
}, },
computed: { computed: {
rotateIcon() {
return [ },
'menu-icon', watch: {
this.isCollapsed ? 'rotate-icon' : '' 'selectedItemName' (val) {
]; console.log(val);
}, let that = this;
menuitemClasses() { // that.openName = [that.onePermissionList[2]];
return [ this.$nextTick(() => {
'menu-item', that.$refs.menu.updateActiveName();
this.isCollapsed ? 'collapsed-menu' : '' });
]
} }
}, },
methods: { methods: {
onSelectLister(val) { onSelectLister(val) {
@ -134,6 +133,7 @@
this.selectedSubMenu = ""; this.selectedSubMenu = "";
this.breadcrumbUrl = this.mainUrl; this.breadcrumbUrl = this.mainUrl;
} }
for (let i = 0; i < this.onePermissionList.length; i++) { for (let i = 0; i < this.onePermissionList.length; i++) {
let item = this.onePermissionList[i]; let item = this.onePermissionList[i];
for (let k = 0; k < item.subMenuList.length; k++) { for (let k = 0; k < item.subMenuList.length; k++) {
@ -141,6 +141,7 @@
if (cItem.id === val) { if (cItem.id === val) {
this.selectedMenu = item.name; this.selectedMenu = item.name;
this.selectedSubMenu = cItem.name; this.selectedSubMenu = cItem.name;
this.selectedItemName = cItem.id;
this.breadcrumbUrl = cItem.resource; this.breadcrumbUrl = cItem.resource;
} }
} }
@ -266,29 +267,25 @@
}else{ }else{
that.selectedItemName = that.onePermissionList[0].subMenuList[0].id; that.selectedItemName = that.onePermissionList[0].subMenuList[0].id;
that.openName = [that.onePermissionList[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.selectedMenu = this.onePermissionList[0].name;
this.selectedSubMenu = this.onePermissionList[0].subMenuList[0].name; this.selectedSubMenu = this.onePermissionList[0].subMenuList[0].name;
sessionStorage.setItem("threeLevel",JSON.stringify(this.onePermissionList[0].subMenuList[0].subMenuList)); 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}); this.$router.push({path: that.onePermissionList[0].subMenuList[0].resource});
} }
}, },
// //
callBack() { callBack(item) {
let that = this; let that = this;
debugger
this.selectedMenu = "设置管理"; this.selectedMenu = "设置管理";
this.selectedSubMenu = "账户管理"; this.selectedSubMenu = "账户管理";
this.selectedItemName = this.onePermissionList[2].subMenuList[0].id; this.selectedItemName = this.onePermissionList[2].subMenuList[0].id;
this.$router.push({path: '/account/manager',query:item});
// this.$router.push({path: '/account/manager',query:item});
// this.$nextTick(() => {
// that.$refs.menu.updateActiveName();
// })
}, },
setHeader(data){ setHeader(data){
let that = this; let that = this;
@ -318,7 +315,6 @@
this.$Message.info("登出成功"); this.$Message.info("登出成功");
} }
}, },
} }
</script> </script>
<style scoped> <style scoped>
@ -327,35 +323,6 @@
height: 100%; height: 100%;
width: 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{ .project-title{
font-size: 22px; font-size: 22px;

@ -449,9 +449,9 @@
}, },
// //
goToAccManagerPage: function (item) { goToAccManagerPage: function (item) {
this.$router.push({path: '/account/manager',query:item}); // this.$router.push({path: '/account/manager',query:item});
// //
this.bus.$emit("callBack"); this.bus.$emit("callBack",item);
}, },
// //
selectRole: function (id) { selectRole: function (id) {

Loading…
Cancel
Save