fix: 修复资产管理-平台列表权限位不准确问题

This commit is contained in:
“huailei000” 2022-03-15 20:30:46 +08:00 committed by Jiangjie.Bai
parent 8467a64e9f
commit 167b5df2d8

View File

@ -9,6 +9,7 @@ export default {
GenericListPage GenericListPage
}, },
data() { data() {
const vm = this
return { return {
tableConfig: { tableConfig: {
url: '/api/v1/assets/platforms/', url: '/api/v1/assets/platforms/',
@ -22,13 +23,9 @@ export default {
}, },
actions: { actions: {
formatterArgs: { formatterArgs: {
canClone: true, canClone: vm.$hasPerm('assets.add_platform'),
canDelete: ({ row }) => { canUpdate: ({ row }) => !row.internal && vm.$hasPerm('assets.change_platform'),
return !row.internal canDelete: ({ row }) => !row.internal && vm.$hasPerm('assets.delete_platform')
},
canUpdate: ({ row }) => {
return !row.internal
}
} }
} }
} }
@ -37,7 +34,6 @@ export default {
hasRightActions: true, hasRightActions: true,
hasMoreActions: false, hasMoreActions: false,
hasBulkDelete: false, hasBulkDelete: false,
canCreate: true,
createRoute: 'PlatformCreate' createRoute: 'PlatformCreate'
} }
} }