index.vue 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <template>
  2. <base-side-page
  3. @cancel="cancelSidePage"
  4. :title="$t('db.text_228')"
  5. icon="res-rds-backup"
  6. :res-name="detailData.name"
  7. :tabs="detailTabs"
  8. :current-tab="params.windowData.currentTab"
  9. :loaded="loaded"
  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" :data="detailData" :on-manager="onManager" :params="getParams" :res-id="getParams.resId" :id="listId" taskResource="compute-tasks" />
  15. </base-side-page>
  16. </template>
  17. <script>
  18. import SidePageMixin from '@/mixins/sidePage'
  19. import WindowsMixin from '@/mixins/windows'
  20. import Actions from '@/components/PageList/Actions'
  21. import SingleActionsMixin from '../mixins/singleActions'
  22. import ColumnsMixin from '../mixins/columns'
  23. import RdsBackupDetail from './Detail'
  24. export default {
  25. name: 'RDSBackupSidePage',
  26. components: {
  27. RdsBackupDetail,
  28. Actions,
  29. },
  30. mixins: [SidePageMixin, WindowsMixin, ColumnsMixin, SingleActionsMixin],
  31. data () {
  32. return {
  33. detailTabs: [
  34. { label: this.$t('db.text_187'), key: 'rds-backup-detail' },
  35. { label: this.$t('table.title.task'), key: 'task-drawer' },
  36. { label: this.$t('db.text_192'), key: 'event-drawer' },
  37. ],
  38. }
  39. },
  40. computed: {
  41. getParams () {
  42. return {
  43. resId: this.detailData.id,
  44. details: true,
  45. }
  46. },
  47. listId () {
  48. switch (this.params.windowData.currentTab) {
  49. case 'event-drawer':
  50. return 'EventListForRDSBackupSidePage'
  51. default:
  52. return ''
  53. }
  54. },
  55. },
  56. }
  57. </script>