fix: 修复系统角色详情-授权用户,不能删除成员问题

This commit is contained in:
“怀磊” 2022-03-04 16:37:55 +08:00 committed by Jiangjie.Bai
parent 631c03c715
commit c48e1603b9
2 changed files with 12 additions and 7 deletions

View File

@ -51,9 +51,6 @@ export default {
return this.$store.getters.hasValidLicense return this.$store.getters.hasValidLicense
} }
}, },
created() {
this.init()
},
methods: { methods: {
} }
} }

View File

@ -2,12 +2,13 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :md="14" :sm="24"> <el-col :md="14" :sm="24">
<ListTable <ListTable
ref="ListTable"
:table-config="tableConfig" :table-config="tableConfig"
:header-actions="headerActions" :header-actions="headerActions"
/> />
</el-col> </el-col>
<el-col :md="10" :sm="24"> <el-col :md="10" :sm="24">
<RelationCard v-bind="relationConfig" /> <RelationCard ref="userRelation" v-bind="relationConfig" />
</el-col> </el-col>
</el-row> </el-row>
</template> </template>
@ -49,6 +50,11 @@ export default {
} }
}) })
return this.$axios.post(relationUrl, data) return this.$axios.post(relationUrl, data)
},
onAddSuccess: () => {
this.$message.success(this.$t('common.updateSuccessMsg'))
this.$refs.ListTable.reloadTable()
this.$refs.userRelation.$refs.select2.clearSelected()
} }
}, },
tableConfig: { tableConfig: {
@ -61,7 +67,10 @@ export default {
actions: { actions: {
formatterArgs: { formatterArgs: {
hasUpdate: false, hasUpdate: false,
hasClone: false hasClone: false,
canDelete: ({ row }) => {
return this.$hasPerm(`rbac.delete_${row.scope}rolebinding`)
}
} }
} }
} }
@ -73,8 +82,7 @@ export default {
} }
} }
} }
}, }
methods: {}
} }
</script> </script>