Detail.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <template>
  2. <detail
  3. :data="data"
  4. :onManager="onManager"
  5. :base-info="baseInfo"
  6. :extra-info="extraInfo"
  7. :hiddenKeys="['tenant']"
  8. status-module="cloudaccount" />
  9. </template>
  10. <script>
  11. import {
  12. getStatusTableColumn,
  13. getEnabledTableColumn,
  14. getBrandTableColumn,
  15. } from '@/utils/common/tableColumn'
  16. import {
  17. getResourceMatchProjectTableColumn,
  18. } from '../utils/columns'
  19. export default {
  20. name: 'CloudproviderDetail',
  21. props: {
  22. onManager: {
  23. type: Function,
  24. required: true,
  25. },
  26. data: {
  27. type: Object,
  28. required: true,
  29. },
  30. },
  31. data () {
  32. return {
  33. baseInfo: [
  34. getResourceMatchProjectTableColumn(),
  35. getBrandTableColumn({ field: 'provider' }),
  36. {
  37. field: 'account',
  38. title: this.$t('cloudenv.text_94'),
  39. slots: {
  40. default: ({ row }) => {
  41. return [
  42. <div class='text-truncate'>
  43. <list-body-cell-wrap copy row={ row } field='account' title={ row.account } />
  44. </div>,
  45. ]
  46. },
  47. },
  48. },
  49. getEnabledTableColumn(),
  50. {
  51. field: 'last_sync',
  52. title: this.$t('cloudenv.text_103'),
  53. formatter: ({ row }) => {
  54. return this.$moment(row.last_sync).format()
  55. },
  56. },
  57. ],
  58. extraInfo: [
  59. {
  60. title: this.$t('cloudenv.text_359'),
  61. items: [
  62. getStatusTableColumn({ statusModule: 'cloudaccountHealthStatus', title: this.$t('cloudenv.text_93'), field: 'health_status' }),
  63. ],
  64. },
  65. ],
  66. }
  67. },
  68. }
  69. </script>