Detail.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <template>
  2. <detail
  3. resource="networkinterfaces"
  4. :on-manager="onManager"
  5. :data="data"
  6. :base-info="baseInfo"
  7. status-module="network"
  8. :extra-info="extraInfo" />
  9. </template>
  10. <script>
  11. import { getBrandTableColumn } from '@/utils/common/tableColumn'
  12. export default {
  13. name: 'FlexNetworkDetail',
  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. field: 'mac',
  30. title: this.$t('network.text_228'),
  31. },
  32. {
  33. field: 'associate_type',
  34. title: this.$t('network.text_229'),
  35. },
  36. {
  37. field: 'associate_id',
  38. title: this.$t('network.text_234'),
  39. },
  40. ],
  41. columns: [
  42. {
  43. field: 'ip_addr',
  44. title: 'IP',
  45. },
  46. {
  47. field: 'network',
  48. title: this.$t('network.text_235'),
  49. },
  50. {
  51. field: 'networkinterface_id',
  52. title: this.$t('network.text_236'),
  53. },
  54. {
  55. field: 'primary',
  56. title: this.$t('network.text_237'),
  57. formatter: ({ cellValue }) => {
  58. return cellValue ? this.$t('network.text_238') : this.$t('network.text_239')
  59. },
  60. },
  61. ],
  62. extraInfo: [
  63. {
  64. title: this.$t('network.text_240'),
  65. field: 'networks',
  66. slots: {
  67. default: ({ row }, h) => {
  68. return [
  69. <vxe-grid class="mb-2" data={ row.networks } columns={ this.columns } />,
  70. ]
  71. },
  72. },
  73. },
  74. ],
  75. }
  76. },
  77. }
  78. </script>