columns.js 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. import {
  2. getNameDescriptionTableColumn,
  3. getCopyWithContentTableColumn,
  4. getStatusTableColumn,
  5. } from '@/utils/common/tableColumn'
  6. import i18n from '@/locales'
  7. export default {
  8. created () {
  9. this.columns = [
  10. getNameDescriptionTableColumn({
  11. field: 'network_type',
  12. hideField: true,
  13. edit: false,
  14. title: i18n.t('common.network.type'),
  15. slotCallback: row => {
  16. let name = i18n.t('common.network.type.vpc')
  17. if (row.network_type === 'classic') {
  18. name = i18n.t('common.network.type.classic')
  19. }
  20. return (
  21. <side-page-trigger onTrigger={ () => this.handleOpenSidepage(row) }>{ name }</side-page-trigger>
  22. )
  23. },
  24. }),
  25. getCopyWithContentTableColumn({ field: 'vpc', title: i18n.t('dictionary.vpc') }),
  26. getCopyWithContentTableColumn({ field: 'network', title: i18n.t('dictionary.network') }),
  27. getCopyWithContentTableColumn({ field: 'domain_name', title: i18n.t('storage.mount.target.domain.name') }),
  28. getCopyWithContentTableColumn({ field: 'access_group', title: i18n.t('dictionary.access_group') }),
  29. getStatusTableColumn({ statusModule: 'mountTarget' }),
  30. ]
  31. },
  32. }