Detail.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <template>
  2. <detail
  3. :on-manager="onManager"
  4. :data="data"
  5. :base-info="baseInfo"
  6. status-module="instanceGroup" />
  7. </template>
  8. <script>
  9. import { getEnabledTableColumn } from '@/utils/common/tableColumn'
  10. export default {
  11. name: 'InstanceGroupDetail',
  12. props: {
  13. onManager: {
  14. type: Function,
  15. required: true,
  16. },
  17. data: {
  18. type: Object,
  19. required: true,
  20. },
  21. },
  22. data () {
  23. return {
  24. baseInfo: [
  25. getEnabledTableColumn(),
  26. {
  27. field: 'guest_count',
  28. title: this.$t('compute.associated_instances'),
  29. slots: {
  30. default: ({ row }) => {
  31. return [(
  32. <a onClick={ () => this.$emit('tab-change', 'associated-instances') }>{ row.guest_count }</a>
  33. )]
  34. },
  35. },
  36. },
  37. {
  38. field: 'force_dispersion',
  39. title: this.$t('compute.text_694'),
  40. formatter: ({ cellValue }) => {
  41. let ret = this.$t('compute.text_696')
  42. if (cellValue) ret = this.$t('compute.text_695')
  43. return ret
  44. },
  45. },
  46. {
  47. field: 'granularity',
  48. title: this.$t('compute.text_697'),
  49. },
  50. ],
  51. }
  52. },
  53. }
  54. </script>