singleActions.js 778 B

12345678910111213141516171819202122232425262728293031
  1. import { mapGetters } from 'vuex'
  2. import expectStatus from '@/constants/expectStatus'
  3. import i18n from '@/locales'
  4. export default {
  5. computed: mapGetters(['isAdminMode']),
  6. created () {
  7. this.singleActions = [
  8. {
  9. label: i18n.t('cloudenv.text_354'),
  10. permission: 'policydefinition_perform_syncstatus',
  11. action: (obj) => {
  12. this.onManager('performAction', {
  13. id: obj.id,
  14. steadyStatus: { status: Object.values(expectStatus.policydefinition).flat() },
  15. managerArgs: {
  16. action: 'syncstatus',
  17. data: {},
  18. },
  19. })
  20. },
  21. meta: () => {
  22. return {
  23. validate: true,
  24. tooltip: '',
  25. }
  26. },
  27. },
  28. ]
  29. },
  30. }