singleActions.js 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. import i18n from '@/locales'
  2. export default {
  3. created () {
  4. this.singleActions = [
  5. {
  6. label: i18n.t('db.text_69'),
  7. permission: 'mongodbs_perform_syncstatus',
  8. action: (obj) => {
  9. this.onManager('performAction', {
  10. id: obj.id,
  11. steadyStatus: 'running',
  12. managerArgs: {
  13. action: 'syncstatus',
  14. },
  15. })
  16. },
  17. },
  18. {
  19. label: i18n.t('db.text_155'),
  20. actions: (obj) => {
  21. return [
  22. {
  23. label: i18n.t('common_277'),
  24. permission: 'mongodbs_update',
  25. action: (row) => {
  26. this.createDialog('ChangeDisableDelete', {
  27. name: this.$t('dictionary.mongodb'),
  28. columns: this.columns,
  29. onManager: this.onManager,
  30. data: [row],
  31. })
  32. },
  33. },
  34. {
  35. label: i18n.t('db.text_42'),
  36. permission: 'mongodbs_delete',
  37. action: () => {
  38. this.createDialog('DeleteResDialog', {
  39. vm: this,
  40. title: i18n.t('db.text_42'),
  41. name: this.$t('dictionary.mongodb'),
  42. data: [obj],
  43. columns: this.columns,
  44. onManager: this.onManager,
  45. refresh: this.refresh,
  46. })
  47. },
  48. meta: () => this.$getDeleteResult(obj),
  49. },
  50. ]
  51. },
  52. },
  53. ]
  54. },
  55. }