【修改】按钮权限

This commit is contained in:
zhoulingpo
2023-05-18 13:45:11 +08:00
parent 9f962a6bf7
commit e7f4fcc3ec
2 changed files with 14 additions and 3 deletions
+12 -1
View File
@@ -90,7 +90,7 @@ import tabs from '../userCenter/processCenter/tabs.vue'
},
checkList:[],
flag:'',//是不是同意
isShowbtn:this.$store.getters.activeTab =='' || this.$store.getters.activeTab =='first'
isShowbtn:false
}
},
watch:{
@@ -110,8 +110,19 @@ import tabs from '../userCenter/processCenter/tabs.vue'
console.log(data)
this.checkList=data
});
let name=this.controlNode('RXXTU4A5YN')?'first':''
this.isShowbtn= name =='first'?true:false
},
methods: {
controlNode(node) {
const permissionId = this.$store.getters.btnPerssion.map(item=>{
return item.id
})
let result = permissionId.includes(node)
return result
},
cancel(){
this.dialogVisible=false
},
+2 -2
View File
@@ -55,8 +55,8 @@ export default {
this.form = JSON.parse(JSON.stringify(data))
console.log(this.form,"hhh")
})
let name=this.controlNode('RXXTU4A5YN')?'first':'five'
this.$store.commit('setActiveTabIndex',this.activeName)
let name=this.controlNode('RXXTU4A5YN')?'first':(this.controlNode('NXQ54Q9QP4')?'fourth':'five')
this.$store.commit('setActiveTabIndex',name)
this.activeName=this.$store.getters.activeTab ?this.$store.getters.activeTab:name
},
methods: {