singleActions.js 978 B

12345678910111213141516171819202122232425262728293031323334
  1. import i18n from '@/locales'
  2. import { getSetPublicAction } from '@/utils/common/tableActions'
  3. export default {
  4. created () {
  5. this.singleActions = [
  6. getSetPublicAction(this, {
  7. name: this.$t('compute.text_108'),
  8. scope: 'project',
  9. resource: 'keypairs',
  10. noCandidateDomains: true,
  11. projectExtraParams: {
  12. domain_id: this.$store.getters.userInfo.domain?.id,
  13. },
  14. }, {
  15. permission: 'keypairs_perform_public',
  16. }),
  17. {
  18. label: i18n.t('compute.perform_delete'),
  19. permission: 'keypairs_delete',
  20. action: obj => {
  21. this.createDialog('DeleteResDialog', {
  22. vm: this,
  23. data: [obj],
  24. columns: this.columns,
  25. title: i18n.t('compute.perform_delete'),
  26. name: this.$t('dictionary.keypair'),
  27. onManager: this.onManager,
  28. })
  29. },
  30. meta: obj => this.$getDeleteResult(obj),
  31. },
  32. ]
  33. },
  34. }