权限控制

master
Caps 6 years ago
parent ca6809af7d
commit 055e2e7e3a

@ -18,10 +18,13 @@ moment.locale('zh-cn');
Vue.use(Vuex); Vue.use(Vuex);
// Vue.use(ViewUI); // Vue.use(ViewUI);
//实现了全局的事件总线对象
Vue.prototype.bus = new Vue();
new Vue({ new Vue({
render: h => h(App), render: h => h(App),
router, router,
}).$mount('#app') }).$mount('#app')

@ -69,6 +69,12 @@
threePermissionList: [], threePermissionList: [],
} }
}, },
mounted(){
let that = this;
this.bus.$on('callBack', function () {
that.callBack();
})
},
created() { created() {
this.mHeight = window.screen.availHeight - 22; this.mHeight = window.screen.availHeight - 22;
@ -223,7 +229,19 @@
this.selectedSubMenu = this.onePermissionList[0].subMenuList[0].name; this.selectedSubMenu = this.onePermissionList[0].subMenuList[0].name;
this.$router.push({path:that.onePermissionList[0].subMenuList[0].resource}); this.$router.push({path:that.onePermissionList[0].subMenuList[0].resource});
}, },
} //
callBack(){
debugger
let that = this;
this.selectedMenu = "设置管理";
this.selectedSubMenu = "账户管理";
this.selectedItemName = this.onePermissionList[0].subMenuList[0].id;
this.$nextTick(()=>{
that.$refs.menu.updateActiveName();
})
}
},
} }
</script> </script>
<style scoped> <style scoped>

@ -179,15 +179,17 @@
changeRoleId: null, changeRoleId: null,
updateAccountId: 0, updateAccountId: 0,
updateUserId: 0, updateUserId: 0,
item:this.$route.query, item:null,
} }
}, },
mounted: function () { mounted: function () {
this.listRoleInfo(); this.listRoleInfo();
this.listOfShop(); this.listOfShop();
if(this.item != null){ if(this.$route.query != null){
this.item = this.$route.query;
// //
this.changeRoleId = this.item.id; this.changeRoleId = this.item.id;
this.bus.$emit('callBack');
} }
this.listAccountInfoFunction(); this.listAccountInfoFunction();
}, },

Loading…
Cancel
Save