index.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <template>
  2. <base-side-page
  3. @cancel="cancelSidePage"
  4. :title="$t('dictionary.tablestore')"
  5. icon="res-table-storage"
  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 :columns="columns" :is="params.windowData.currentTab" :data="detailData" :on-manager="onManager" :refresh="refresh" :getParams="getParams" :params="getParams" :res-id="getParams.storage" :id="listId" />
  15. </base-side-page>
  16. </template>
  17. <script>
  18. // import SingleActionsMixin from '../mixins/singleActions'
  19. import SidePageMixin from '@/mixins/sidePage'
  20. import WindowsMixin from '@/mixins/windows'
  21. import Actions from '@/components/PageList/Actions'
  22. import ColumnsMixin from '../mixins/columns'
  23. import TablestoreDetail from './Detail'
  24. export default {
  25. name: 'TablestoreSidePage',
  26. components: {
  27. Actions,
  28. TablestoreDetail,
  29. },
  30. mixins: [SidePageMixin, WindowsMixin, ColumnsMixin],
  31. data () {
  32. return {
  33. detailTabs: [
  34. { label: this.$t('storage.text_81'), key: 'tablestore-detail' },
  35. { label: this.$t('storage.text_85'), key: 'event-drawer' },
  36. ],
  37. }
  38. },
  39. computed: {
  40. getParams () {
  41. return {
  42. storage: this.data.id,
  43. details: true,
  44. }
  45. },
  46. listId () {
  47. switch (this.params.windowData.currentTab) {
  48. case 'event-drawer':
  49. return 'EventListForBucketStorageSidePage'
  50. default:
  51. return ''
  52. }
  53. },
  54. },
  55. }
  56. </script>