index.vue 1.6 KB

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