List.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <div>
  3. <a-alert class="mb-2" :message="$t('cloudenv.smal_provider_tips')" />
  4. <page-list
  5. :list="list"
  6. :columns="columns"
  7. :group-actions="groupActions"
  8. :single-actions="singleActions"
  9. :export-data-options="exportDataOptions" />
  10. </div>
  11. </template>
  12. <script>
  13. import { getNameFilter } from '@/utils/common/tableFilter'
  14. import WindowsMixin from '@/mixins/windows'
  15. import ListMixin from '@/mixins/list'
  16. import ColumnsMixin from '../mixins/columns'
  17. import SingleActionsMixin from '../mixins/singleActions'
  18. export default {
  19. name: 'SamlProviderList',
  20. mixins: [WindowsMixin, ListMixin, ColumnsMixin, SingleActionsMixin],
  21. props: {
  22. id: String,
  23. getParams: {
  24. type: Object,
  25. },
  26. },
  27. data () {
  28. return {
  29. list: this.$list.createList(this, {
  30. id: this.id || 'SamlProviderList',
  31. resource: 'saml_providers',
  32. getParams: this.getParams,
  33. filterOptions: {
  34. name: getNameFilter(),
  35. },
  36. hiddenColumns: ['created_at'],
  37. }),
  38. groupActions: [],
  39. }
  40. },
  41. computed: {
  42. exportDataOptions () {
  43. return {
  44. downloadType: 'local',
  45. title: this.$t('cloudenv.saml_provider'),
  46. items: [
  47. { field: 'id', title: 'ID' },
  48. ...this.columns,
  49. ],
  50. }
  51. },
  52. },
  53. created () {
  54. this.list.fetchData()
  55. },
  56. methods: {
  57. handleOpenSidepage (row) {
  58. this.sidePageTriggerHandle(this, 'SamlProviderSidePage', {
  59. id: row.id,
  60. resource: 'saml_providers',
  61. getParams: this.getParam,
  62. }, {
  63. list: this.list,
  64. tab: 'event-drawer',
  65. })
  66. },
  67. },
  68. }
  69. </script>