index.vue 1.5 KB

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