Detail.vue 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <template>
  2. <detail
  3. :data="data"
  4. :onManager="onManager"
  5. :base-info="baseInfo" />
  6. </template>
  7. <script>
  8. import i18n from '@/locales'
  9. import {
  10. // getCopyWithContentTableColumn,
  11. // getPublicScopeTableColumn,
  12. getEnabledTableColumn,
  13. getPublicScopeTableColumn,
  14. } from '@/utils/common/tableColumn'
  15. export default {
  16. name: 'ProjectMappingDetail',
  17. props: {
  18. data: {
  19. type: Object,
  20. required: true,
  21. },
  22. onManager: {
  23. type: Function,
  24. required: true,
  25. },
  26. },
  27. data () {
  28. return {
  29. baseInfo: [
  30. getPublicScopeTableColumn(),
  31. getEnabledTableColumn(),
  32. {
  33. title: i18n.t('cloudenv.text_582'),
  34. filed: 'rules',
  35. slots: {
  36. default: ({ row }) => {
  37. if (!row.rules) return '-'
  38. return <a onClick={ () => this.$emit('tab-change', 'rule-list') }>{row.rules.length}</a>
  39. },
  40. },
  41. },
  42. // getPublicScopeTableColumn({ vm: this, resource: 'proxysettings' }),
  43. // getCopyWithContentTableColumn({
  44. // field: 'https_proxy',
  45. // title: this.$t('cloudenv.text_395'),
  46. // }),
  47. // getCopyWithContentTableColumn({
  48. // field: 'http_proxy',
  49. // title: this.$t('cloudenv.text_398'),
  50. // }),
  51. // getCopyWithContentTableColumn({
  52. // field: 'no_proxy',
  53. // title: this.$t('cloudenv.text_401'),
  54. // }),
  55. ],
  56. }
  57. },
  58. computed: {
  59. },
  60. }
  61. </script>