index.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. <component
  12. :is="params.windowData.currentTab"
  13. :res-id="data.id"
  14. :id="listId"
  15. :data="detailData"
  16. :resource="resource"
  17. :on-manager="onManager"
  18. :columns="columns"
  19. :getParams="getParams"
  20. taskResource="image-tasks"
  21. @refresh="refresh" />
  22. </base-side-page>
  23. </template>
  24. <script>
  25. import SidePageMixin from '@/mixins/sidePage'
  26. import WindowsMixin from '@/mixins/windows'
  27. import Detail from './Detail'
  28. export default {
  29. name: 'SystemCachedImageSidePage',
  30. components: {
  31. Detail,
  32. },
  33. mixins: [SidePageMixin, WindowsMixin],
  34. computed: {
  35. detailTabs () {
  36. return [
  37. { label: this.$t('compute.text_238'), key: 'detail' },
  38. // { label: this.$t('compute.text_240'), key: 'event-drawer' },
  39. ]
  40. },
  41. listId () {
  42. switch (this.params.windowData.currentTab) {
  43. case 'event-drawer':
  44. return 'EventListForSystemImageSidePage'
  45. default:
  46. return ''
  47. }
  48. },
  49. getParams () {
  50. if (this.params.windowData.currentTab === 'event-drawer') {
  51. return { obj_type: 'cachedimage' }
  52. }
  53. return {}
  54. },
  55. },
  56. methods: {
  57. beforeShowMenu () {
  58. return this.$store.dispatch('scopedPolicy/get', {
  59. category: ['image_hidden_menus'],
  60. })
  61. },
  62. },
  63. }
  64. </script>