columns.js 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. import {
  2. getStatusTableColumn,
  3. getBrandTableColumn,
  4. getNameDescriptionTableColumn,
  5. getCopyWithContentTableColumn,
  6. getPublicScopeTableColumn,
  7. getProjectDomainTableColumn,
  8. getTagTableColumn,
  9. } from '@/utils/common/tableColumn'
  10. import i18n from '@/locales'
  11. export default {
  12. created () {
  13. this.columns = [
  14. getNameDescriptionTableColumn({
  15. vm: this,
  16. hideField: true,
  17. slotCallback: row => {
  18. return (
  19. <side-page-trigger onTrigger={ () => this.handleOpenSidepage(row) }>{ row.name }</side-page-trigger>
  20. )
  21. },
  22. }),
  23. getTagTableColumn({ onManager: this.onManager, resource: 'networkinterface', columns: () => this.columns }),
  24. getCopyWithContentTableColumn({ field: 'mac', title: i18n.t('network.text_228') }),
  25. getStatusTableColumn({ statusModule: 'network' }),
  26. getPublicScopeTableColumn({ vm: this, resource: 'networkinterfaces' }),
  27. getProjectDomainTableColumn(),
  28. getBrandTableColumn(),
  29. getCopyWithContentTableColumn({
  30. field: 'account',
  31. title: i18n.t('network.text_196'),
  32. minWidth: 110,
  33. }),
  34. getCopyWithContentTableColumn({
  35. field: 'cloudregion',
  36. title: i18n.t('network.text_199'),
  37. minWidth: 120,
  38. }),
  39. getCopyWithContentTableColumn({
  40. field: 'associate_type',
  41. title: i18n.t('network.text_230'),
  42. minWidth: 160,
  43. }),
  44. getCopyWithContentTableColumn({ field: 'associate_id', title: i18n.t('network.text_234') }),
  45. ]
  46. },
  47. }