singleActions.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import i18n from '@/locales'
  2. export default {
  3. created () {
  4. this.singleActions = [
  5. {
  6. label: i18n.t('storage.text_100'),
  7. permission: 'mount_targets_perform_syncstatus',
  8. action: obj => {
  9. this.onManager('performAction', {
  10. steadyStatus: ['available'],
  11. id: obj.id,
  12. managerArgs: {
  13. action: 'syncstatus',
  14. },
  15. })
  16. },
  17. meta: () => ({
  18. validate: true,
  19. }),
  20. },
  21. {
  22. label: i18n.t('storage.text_65'),
  23. actions: (obj) => {
  24. return [
  25. {
  26. label: i18n.t('storage.text_36'),
  27. permission: 'mount_targets_delete',
  28. action: () => {
  29. this.createDialog('DeleteResDialog', {
  30. vm: this,
  31. title: i18n.t('storage.text_36'),
  32. name: this.$t('dictionary.mount_target'),
  33. data: [obj],
  34. columns: this.columns,
  35. onManager: this.onManager,
  36. refresh: this.refresh,
  37. })
  38. },
  39. meta: () => this.$getDeleteResult(obj),
  40. },
  41. ]
  42. },
  43. },
  44. ]
  45. },
  46. }