From 63ad2c3598400370dd7da5534659fd7e768a0a4a Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Mon, 16 May 2022 17:29:46 +0800
Subject: [PATCH] 地址替换
---
src/page/index/tags.vue | 31 ++++++++++++++++++++++++++++++-
1 files changed, 30 insertions(+), 1 deletions(-)
diff --git a/src/page/index/tags.vue b/src/page/index/tags.vue
index ab14485..1ddfab4 100644
--- a/src/page/index/tags.vue
+++ b/src/page/index/tags.vue
@@ -65,6 +65,35 @@
},
mounted() {
this.setActive();
+ this.tagList.forEach((item, index) => {
+ if (item.label == "首页" && (this.userInfo.role_name == "policeAdmin" || this.userInfo.role_name == "administrator")){
+ this.$store.commit("set_hideHome", false);
+ }else if (item.label == "首页" && (this.userInfo.role_name == "操作员")) {
+ this.tagList.splice(index, 1);
+ this.$store.commit("set_hideHome", true);
+ var d = this.$router.options.routes,
+ path = "";
+ for (var k in d) {
+ if (d[k].peixun == true) {
+ // console.log(d[k]);
+ path = d[k].path;
+ }
+ }
+ this.$router.push({ path: path });
+ } else if (item.label == "首页"){
+ this.tagList.splice(index, 1);
+ this.$store.commit("set_hideHome", true);
+ var d = this.$router.options.routes,
+ path = "";
+ for (var k in d) {
+ if (d[k].kby == true) {
+ // console.log(d[k]);
+ path = d[k].path;
+ }
+ }
+ this.$router.push({ path: path });
+ }
+ });
},
watch: {
tag() {
@@ -75,7 +104,7 @@
}
},
computed: {
- ...mapGetters(["tagWel", "tagList", "tag", "website"]),
+ ...mapGetters(["tagWel", "tagList", "tag", "website", "userInfo"]),
...mapState({
showTag: state => state.common.showTag
}),
--
Gitblit v1.9.3