From 0bb52ebecf5a4eba938210364044362ecd70ef4e Mon Sep 17 00:00:00 2001 From: liudianxin Date: Tue, 11 Aug 2020 11:20:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E6=9D=83=E9=99=90?= =?UTF-8?q?=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/data-analysis/data-analysis.vue | 57 +++++++++++++---------- 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/src/pages/data-analysis/data-analysis.vue b/src/pages/data-analysis/data-analysis.vue index b3c8e48..82c0653 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(); - } + }, }; -- 2.26.0