singleActions.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. import { getSetPublicAction } from '@/utils/common/tableActions'
  2. export default {
  3. created () {
  4. this.singleActions = [
  5. {
  6. label: this.$t('table.action.modify'),
  7. permission: 'llm_skus_update',
  8. action: obj => {
  9. this.createDialog('LlmSkuCreateDialog', {
  10. type: 'edit',
  11. data: [obj],
  12. onManager: this.onManager,
  13. })
  14. },
  15. },
  16. // 更改项目
  17. {
  18. label: this.$t('compute.perform_change_owner', [this.$t('dictionary.project')]),
  19. permission: 'llm_skus_perform_public',
  20. action: (obj) => {
  21. this.createDialog('ChangeOwenrDialog', {
  22. data: [obj],
  23. columns: this.columns,
  24. onManager: this.onManager,
  25. refresh: this.refresh,
  26. resource: 'llm_skus',
  27. })
  28. },
  29. },
  30. getSetPublicAction(this, {
  31. name: this.$t('aice.spec'),
  32. scope: 'project',
  33. resource: 'llm_skus',
  34. }, {
  35. permission: 'llm_skus_perform_public',
  36. }),
  37. {
  38. label: this.$t('table.action.delete'),
  39. action: obj => {
  40. this.createDialog('DeleteResDialog', {
  41. vm: this,
  42. data: [obj],
  43. columns: this.columns,
  44. title: this.$t('table.action.delete'),
  45. name: this.$t('aice.spec'),
  46. onManager: this.onManager,
  47. })
  48. },
  49. meta: obj => this.$getDeleteResult(obj),
  50. },
  51. ]
  52. },
  53. }