singleActions.js 1.5 KB

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