Detail.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <detail
  3. :on-manager="onManager"
  4. :data="data"
  5. :base-info="baseInfo"
  6. :extra-info="extraInfo" />
  7. </template>
  8. <script>
  9. import { getCopyWithContentTableColumn, getBrandTableColumn } from '@/utils/common/tableColumn'
  10. import WindowsMixin from '@/mixins/windows'
  11. export default {
  12. name: 'LoadbalancerbackendgroupDetail',
  13. mixins: [WindowsMixin],
  14. props: {
  15. data: {
  16. type: Object,
  17. required: true,
  18. },
  19. onManager: {
  20. type: Function,
  21. required: true,
  22. },
  23. },
  24. data () {
  25. return {
  26. baseInfo: [
  27. getBrandTableColumn(),
  28. ],
  29. extraInfo: [
  30. {
  31. title: this.$t('network.text_38'),
  32. items: [
  33. getCopyWithContentTableColumn({
  34. field: 'loadbalancer',
  35. title: this.$t('network.text_137'),
  36. hideField: true,
  37. slotCallback: row => {
  38. if (!row.loadbalancer) return '-'
  39. return [
  40. <side-page-trigger permission='lb_loadbalancers_get' name='LbSidePage' id={row.loadbalancer_id} vm={this}>{ row.loadbalancer }</side-page-trigger>,
  41. ]
  42. },
  43. }),
  44. {
  45. field: 'vpc',
  46. title: 'VPC',
  47. },
  48. {
  49. field: 'cloudregion',
  50. title: this.$t('network.text_199'),
  51. },
  52. {
  53. field: 'zone',
  54. title: this.$t('network.text_24'),
  55. },
  56. {
  57. field: 'loadbalancer_health_check',
  58. title: this.$t('network.health_check'),
  59. formatter: ({ row }) => {
  60. return row.loadbalancer_health_check || '-'
  61. },
  62. },
  63. ],
  64. },
  65. ],
  66. }
  67. },
  68. }
  69. </script>