columns.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. import {
  2. getNameDescriptionTableColumn,
  3. } from '@/utils/common/tableColumn'
  4. import i18n from '@/locales'
  5. export default {
  6. created () {
  7. this.columns = [
  8. getNameDescriptionTableColumn({
  9. onManager: this.onManager,
  10. hideField: true,
  11. edit: false,
  12. editDesc: false,
  13. title: i18n.t('network.text_21'),
  14. slotCallback: row => {
  15. return (
  16. <side-page-trigger onTrigger={ () => this.handleOpenSidepage(row) }>{ row.name }</side-page-trigger>
  17. )
  18. },
  19. }),
  20. {
  21. field: 'match_scope',
  22. title: i18n.t('network.ssh-proxy-match.match_scope'),
  23. slots: {
  24. default: ({ row }) => {
  25. return row.match_scope === 'vpc' ? this.$t('cloudenv.res_vpcs') : this.$t('network.text_565')
  26. },
  27. },
  28. },
  29. {
  30. field: 'match_value',
  31. title: i18n.t('network.ssh-proxy-match.vpc_ip_subnet'),
  32. slots: {
  33. default: ({ row }) => {
  34. const m = this.list.extraData[row.match_scope]
  35. return m && m[row.match_value] ? m[row.match_value] : row.match_value
  36. },
  37. },
  38. },
  39. ]
  40. },
  41. }