| | |
| | | }, |
| | | 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 { |
| | | 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() { |
| | |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["tagWel", "tagList", "tag", "website"]), |
| | | ...mapGetters(["tagWel", "tagList", "tag", "website", "userInfo"]), |
| | | ...mapState({ |
| | | showTag: state => state.common.showTag |
| | | }), |