index.vue 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <template>
  2. <base-side-page
  3. @cancel="cancelSidePage"
  4. :title="$t('cloudenv.text_14')"
  5. icon="res-proxysetting"
  6. :res-name="detailData.name"
  7. :current-tab="params.windowData.currentTab"
  8. :loaded="loaded"
  9. :tabs="detailTabs"
  10. @tab-change="handleTabChange">
  11. <template v-slot:actions>
  12. <actions :options="singleActions" :row="detailData" button-type="link" button-size="small" />
  13. </template>
  14. <component :is="params.windowData.currentTab" :res-id="data.id" :id="listId" :data="detailData" :on-manager="onManager" :getParams="getParams" />
  15. </base-side-page>
  16. </template>
  17. <script>
  18. import ColumnsMixin from '../mixins/columns'
  19. import SingleActionsMixin from '../mixins/singleActions'
  20. import detail from './Detail'
  21. import CloudaccountList from '@Cloudenv/views/cloudaccount/components/List'
  22. import Actions from '@/components/PageList/Actions'
  23. import SidePageMixin from '@/mixins/sidePage'
  24. import WindowsMixin from '@/mixins/windows'
  25. export default {
  26. name: 'ProxysettingSidePage',
  27. components: {
  28. Actions,
  29. detail,
  30. CloudaccountList,
  31. },
  32. mixins: [SidePageMixin, WindowsMixin, ColumnsMixin, SingleActionsMixin],
  33. data () {
  34. return {
  35. detailTabs: [
  36. { label: this.$t('cloudenv.text_237'), key: 'detail' },
  37. { label: this.$t('cloudenv.text_12'), key: 'cloudaccount-list' },
  38. { label: this.$t('cloudenv.text_15'), key: 'event-drawer' },
  39. ],
  40. }
  41. },
  42. computed: {
  43. getParams () {
  44. return {
  45. proxy_setting: this.detailData.id,
  46. }
  47. },
  48. listId () {
  49. switch (this.params.windowData.currentTab) {
  50. case 'event-drawer':
  51. return 'EventListForProxysettingSidePage'
  52. case 'cloudaccount-list':
  53. return 'CloudaccountListForProxysettingSidePage'
  54. default:
  55. return ''
  56. }
  57. },
  58. },
  59. }
  60. </script>