diff --git a/src/pages/data-analysis/data-analysis.vue b/src/pages/data-analysis/data-analysis.vue index b3c8e48e6331de001b45e8ad2c092961200295fe..82c0653f404383d5482c28250d0ca28913d05023 100644 --- a/src/pages/data-analysis/data-analysis.vue +++ b/src/pages/data-analysis/data-analysis.vue @@ -17,50 +17,59 @@ import sideNavBar from "@/components/side-nav-bar"; export default { components: { - sideNavBar + sideNavBar, }, data: () => ({ userNav: [ { name: "服务分析", - path: `/data_analysis/my_service` + path: `/data_analysis/my_service`, }, { 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: { "$route.fullPath"(path) { this.initNavList(); - } + }, }, methods: { initNavList() { - this.navList = this.userNav; - } + if (this.$store.state.role == 0) { + 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() { this.initNavList(); - } + }, };