index.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <template>
  2. <base-side-page
  3. @cancel="cancelSidePage"
  4. :title="$t('dictionary.vpc_peer_connect')"
  5. icon="res-vpc-peerconnect"
  6. :res-name="detailData.name"
  7. :actions="params.actions"
  8. :current-tab="params.windowData.currentTab"
  9. :tabs="detailTabs"
  10. :loaded="loaded"
  11. @tab-change="handleTabChange">
  12. <template v-slot:actions>
  13. <actions :options="singleActions" :row="detailData" button-type="link" button-size="small" />
  14. </template>
  15. <component
  16. :is="params.windowData.currentTab"
  17. :id="listId"
  18. :res-id="detailData.id"
  19. :data="detailData"
  20. :on-manager="onManager"
  21. :columns="columns"
  22. :getParams="getParams"
  23. taskResource="compute-tasks"
  24. @side-page-trigger-handle="sidePageTriggerHandle"
  25. @init-side-page-tab="initSidePageTab"
  26. @refresh="refresh"
  27. @single-refresh="singleRefresh"
  28. @tab-change="handleTabChange" />
  29. </base-side-page>
  30. </template>
  31. <script>
  32. import SidePageMixin from '@/mixins/sidePage'
  33. import WindowsMixin from '@/mixins/windows'
  34. import Actions from '@/components/PageList/Actions'
  35. import SingleActionsMixin from '../mixins/singleActions'
  36. import ColumnsMixin from '../mixins/columns'
  37. import Detail from './Detail'
  38. // import Vpc from './Vpc'
  39. import RouteSet from './RouteSet'
  40. export default {
  41. name: 'VpcPeerConnectSidePage',
  42. components: {
  43. Detail,
  44. // Vpc,
  45. RouteSet,
  46. Actions,
  47. },
  48. mixins: [SidePageMixin, WindowsMixin, ColumnsMixin, SingleActionsMixin],
  49. data () {
  50. return {
  51. }
  52. },
  53. computed: {
  54. detailTabs () {
  55. const tabs = [
  56. { label: this.$t('network.text_67'), key: 'detail' },
  57. // { label: 'VPC', key: 'vpc' },
  58. { label: this.$t('network.vpc_network.route'), key: 'route-set' },
  59. { label: this.$t('table.title.task'), key: 'task-drawer' },
  60. { label: this.$t('network.text_150'), key: 'event-drawer' },
  61. ]
  62. return tabs
  63. },
  64. getParams () {
  65. return null
  66. },
  67. listId () {
  68. switch (this.params.windowData.currentTab) {
  69. case 'event-drawer':
  70. return 'EventListForVpcSidePage'
  71. default:
  72. return ''
  73. }
  74. },
  75. },
  76. created () {
  77. if (this.params.tab) {
  78. this.handleTabChange(this.params.tab)
  79. }
  80. },
  81. }
  82. </script>