cloudprovidersProps.js 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. import { getAccountTableColumn } from '../utils/columns'
  2. import {
  3. getNameDescriptionTableColumn,
  4. getCopyWithContentTableColumn,
  5. getBrandTableColumn,
  6. } from '@/utils/common/tableColumn'
  7. import {
  8. getNameFilter,
  9. getBrandFilter,
  10. getAccountFilter,
  11. } from '@/utils/common/tableFilter'
  12. export default {
  13. data () {
  14. return {}
  15. },
  16. computed: {
  17. cloudprovidersProps () {
  18. return {
  19. list: this.$list.createList(this, {
  20. resource: 'cloudproviders',
  21. getParams: this.params,
  22. filterOptions: {
  23. name: getNameFilter(),
  24. brand: getBrandFilter(),
  25. cloudaccount: getAccountFilter(),
  26. },
  27. }),
  28. columns: [
  29. getNameDescriptionTableColumn({
  30. onManager: this.onManager,
  31. hideField: true,
  32. slotCallback: row => {
  33. return (
  34. <side-page-trigger onTrigger={() => this.handleOpenSidepage(row)}>{ row.name }</side-page-trigger>
  35. )
  36. },
  37. }),
  38. getAccountTableColumn(),
  39. getBrandTableColumn(),
  40. getCopyWithContentTableColumn({
  41. field: 'cloudaccount',
  42. title: this.$t('cloudenv.text_12'),
  43. }),
  44. getCopyWithContentTableColumn({
  45. field: 'project_domain',
  46. title: this.$t('cloudenv.text_355', [this.$t('dictionary.domain')]),
  47. }),
  48. getCopyWithContentTableColumn({
  49. field: 'tenant',
  50. title: this.$t('cloudenv.text_356', [this.$t('dictionary.project')]),
  51. minWidth: 140,
  52. }),
  53. ],
  54. }
  55. },
  56. },
  57. }