[优化]-初始化进入系统必须进入首页修改成初始化进入第一个有权限的页面,无首页权限不显示首页tab标签

This commit is contained in:
zhaoxiao
2021-10-22 13:34:54 +08:00
parent 982ddaf1c0
commit 3a499e7cf8
2 changed files with 23 additions and 3 deletions
+3 -1
View File
@@ -80,7 +80,9 @@
}
},
created() {
if (this.$route.path != indexKey) {
// if (this.$route.path != indexKey) {
// 在当前页面不是首页 并且有首页权限的时候,把首页增加到面板的第一位
if (this.$route.path !== indexKey && this.$store.state.user.permissionList.find(item => item.component === 'dashboard/Analysis')) {
this.addIndexToFirst()
}
// 复制一个route对象出来,不能影响原route