index.vue 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <template>
  2. <base-side-page
  3. @cancel="cancelSidePage"
  4. :title="$t('aice.mounted_apps')"
  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
  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="getResId"
  21. cloud-env="onpremise"
  22. :id="listId"
  23. :data="detailData"
  24. :getParams="getParams"
  25. :on-manager="onManager"
  26. :columns="columns"
  27. @refresh="refresh" />
  28. </base-side-page>
  29. </template>
  30. <script>
  31. import CachedImageEventDrawer from '@Compute/views/image/sidepage/CachedImageEventList'
  32. import SidePageMixin from '@/mixins/sidePage'
  33. import WindowsMixin from '@/mixins/windows'
  34. import Actions from '@/components/PageList/Actions'
  35. import CacheList from '@Compute/views/image/sidepage/Cache'
  36. import SingleActionsMixin from '../mixins/singleActions'
  37. import ColumnsMixin from '../mixins/columns'
  38. import Detail from './Detail'
  39. export default {
  40. name: 'LlmInstantModelSidePage',
  41. components: {
  42. Detail,
  43. CacheList,
  44. Actions,
  45. CachedImageEventDrawer,
  46. },
  47. mixins: [SidePageMixin, WindowsMixin, ColumnsMixin, SingleActionsMixin],
  48. data () {
  49. return {
  50. detailTabs: [
  51. { label: this.$t('aice.detail'), key: 'detail' },
  52. // { label: this.$t('compute.text_692'), key: 'cache-list' },
  53. { label: this.$t('aice.event'), key: 'event-drawer' },
  54. // { label: this.$t('dictionary.cachedimage') + this.$t('compute.text_240'), key: 'cached-image-event-drawer' },
  55. ],
  56. }
  57. },
  58. computed: {
  59. getResId () {
  60. switch (this.params.windowData.currentTab) {
  61. case 'cache-list':
  62. return this.data.data.image_id
  63. case 'cached-image-event-drawer':
  64. return this.data.data.image_id
  65. }
  66. return this.data.id
  67. },
  68. getParams () {
  69. if (this.params.windowData.currentTab === 'event-drawer') {
  70. return { obj_type: 'llm_instant_model' }
  71. }
  72. if (this.params.windowData.currentTab === 'cached-image-event-drawer') {
  73. return { obj_type: 'cachedimage' }
  74. }
  75. return {}
  76. },
  77. listId () {
  78. switch (this.params.windowData.currentTab) {
  79. case 'event-drawer':
  80. return 'EventListForInstantAppSidePage'
  81. case 'cached-image-event-drawer':
  82. return 'EventListForCachedSystemImageSidePage'
  83. default:
  84. return ''
  85. }
  86. },
  87. },
  88. }
  89. </script>