diff --git a/src/pages/Home.vue b/src/pages/Home.vue index 132d995..94b4c02 100644 --- a/src/pages/Home.vue +++ b/src/pages/Home.vue @@ -191,18 +191,6 @@ let row = data[i]; that.threePermissionList.push(row); } - - //选中第一个权限 - if (data && data.length > 0 && that.refreshFlag) { - let resource = ''; - if (that.threePermissionList[0].resource) { - resource = that.threePermissionList[0].resource; - } - that.subMenuClick(0); - that.$router.push({path: resource}); - //刷新标识 - that.refreshFlag = false; - } that.twoPermissionList.forEach(function (two) { //把三级导航绑定给第二级导航栏 let three = that.threePermissionList.filter(function (data) { @@ -226,20 +214,15 @@ menuInit: function () { let that = this; that.selectedItemName = that.onePermissionList[0].subMenuList[0].id; - that.openName = "['1']"; + that.openName = [that.onePermissionList[0].id]; this.$nextTick(()=>{ this.$refs.menu.updateOpened(); this.$refs.menu.updateActiveName(); }) - debugger + this.selectedMenu = this.onePermissionList[0].name; + this.selectedSubMenu = this.onePermissionList[0].subMenuList[0].name; this.$router.push({path:that.onePermissionList[0].subMenuList[0].resource}); }, - //左侧二级权限展开-传入二级权限id - subMenuUnfold: function (twoPermissionId) { - }, - //左侧三级权限点击-传入三级权限下标 - subMenuClick: function (index) { - }, } }