fix: 使用导航点击图标无权限时关闭bug

This commit is contained in:
@changcode
2021-05-18 10:27:23 +08:00
parent 5052aeb853
commit 3d3e7d5c85

View File

@@ -157,22 +157,6 @@ export default {
this.$store.commit('openConsole') this.$store.commit('openConsole')
}, },
jump (route) { jump (route) {
this.$emit('close')
// if(!this.hasButton('dc_add')){
// return
// } else if(!this.hasButton('agent_add')){
// return
// } else if(!this.hasButton('asset_add')){
// return
// } else if(!this.hasButton('project_add')){
// return
// } else if(!this.hasButton('panel_add')){
// return
// } else if (!this.hasButton('alertRule_add')){
// return
// }else{
// console.log('有权限')
// }
let buttonPermissions = true let buttonPermissions = true
this.guideList.forEach(ele => { this.guideList.forEach(ele => {
if (!this.hasButton(ele.buttonPermissions)){ if (!this.hasButton(ele.buttonPermissions)){
@@ -182,6 +166,7 @@ export default {
if (!buttonPermissions){ if (!buttonPermissions){
return return
} }
this.$emit('close')
this.$router.push({ this.$router.push({
path: route, path: route,
query: { query: {
@@ -318,7 +303,7 @@ export default {
} }
}, },
watch: { watch: {
showDialog (n) { showDialog (n, o) {
this.visible = n this.visible = n
}, },
activeIndex (n) { activeIndex (n) {