Commit 0bb52ebe authored by 刘殿昕's avatar 刘殿昕

初始化权限菜单

parent 3d36203a
...@@ -17,50 +17,59 @@ import sideNavBar from "@/components/side-nav-bar"; ...@@ -17,50 +17,59 @@ import sideNavBar from "@/components/side-nav-bar";
export default { export default {
components: { components: {
sideNavBar sideNavBar,
}, },
data: () => ({ data: () => ({
userNav: [ userNav: [
{ {
name: "服务分析", name: "服务分析",
path: `/data_analysis/my_service` path: `/data_analysis/my_service`,
}, },
{ {
name: "应用分析", name: "应用分析",
path: `/data_analysis/my_application` path: `/data_analysis/my_application`,
}, },
// {
// name: "组织服务数据分析",
// path: `/data_analysis/org_service`
// },
// {
// name: "组织应用数据分析",
// path: `/data_analysis/org_application`
// },
// {
// name: "运行概况-组织",
// path: `/data_analysis/operation_overview`
// },
// {
// name: "服务管控-组织",
// path: `/data_analysis/service_control`
// }
], ],
navList: [] userNav1: [
{
name: "组织服务数据分析",
path: `/data_analysis/org_service`,
},
{
name: "组织应用数据分析",
path: `/data_analysis/org_application`,
},
{
name: "运行概况-组织",
path: `/data_analysis/operation_overview`,
},
{
name: "服务管控-组织",
path: `/data_analysis/service_control`,
},
],
userNav1: [],
navList: [],
}), }),
watch: { watch: {
"$route.fullPath"(path) { "$route.fullPath"(path) {
this.initNavList(); this.initNavList();
} },
}, },
methods: { methods: {
initNavList() { initNavList() {
if (this.$store.state.role == 0) {
this.navList = this.userNav; this.navList = this.userNav;
} else if (this.$store.state.role == 1) {
this.navList = this.userNav1;
} else if (this.$store.state.role == 2) {
this.navList = this.userNav2;
} }
}, },
},
mounted() { mounted() {
this.initNavList(); this.initNavList();
} },
}; };
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment