index.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <template>
  2. <base-side-page
  3. @cancel="cancelSidePage"
  4. :title="isApplyType ? $t('aice.app_llm_sku') : $t('aice.llm_sku')"
  5. icon="res-sku"
  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
  13. :options="singleActions"
  14. :row="detailData"
  15. button-type="link"
  16. button-size="small" />
  17. </template>
  18. <component
  19. :is="params.windowData.currentTab"
  20. :res-id="data.id"
  21. :id="listId"
  22. :data="detailData"
  23. :getParams="getParams"
  24. :on-manager="onManager"
  25. :columns="columns" />
  26. </base-side-page>
  27. </template>
  28. <script>
  29. import SidePageMixin from '@/mixins/sidePage'
  30. import WindowsMixin from '@/mixins/windows'
  31. import Actions from '@/components/PageList/Actions'
  32. import SingleActionsMixin from '../mixins/singleActions'
  33. import ColumnsMixin from '../mixins/columns'
  34. import Detail from './Detail'
  35. export default {
  36. name: 'LlmSkuSidePage',
  37. components: {
  38. Detail,
  39. Actions,
  40. },
  41. mixins: [SidePageMixin, WindowsMixin, ColumnsMixin, SingleActionsMixin],
  42. data () {
  43. return {
  44. detailTabs: [
  45. { label: this.$t('aice.detail'), key: 'detail' },
  46. { label: this.$t('aice.event'), key: 'event-drawer' },
  47. ],
  48. }
  49. },
  50. computed: {
  51. isApplyType () {
  52. return this.$route.path.includes('app-llm')
  53. },
  54. getParams () {
  55. return null
  56. },
  57. listId () {
  58. switch (this.params.windowData.currentTab) {
  59. case 'event-drawer':
  60. return 'EventListForDesktopSidePage'
  61. default:
  62. return ''
  63. }
  64. },
  65. },
  66. }
  67. </script>