index.vue 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <template>
  2. <base-side-page
  3. @cancel="cancelSidePage"
  4. :title="$t('compute.webapp')"
  5. icon="res-webapp"
  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. import EnvironmentsList from './EnvironmentsList'
  36. import DomainList from './DomainList'
  37. import CertificateList from './CertificateList'
  38. import BackupList from './BackupList'
  39. export default {
  40. name: 'WebAppSidePage',
  41. components: {
  42. Detail,
  43. EnvironmentsList,
  44. Actions,
  45. DomainList,
  46. CertificateList,
  47. BackupList,
  48. },
  49. mixins: [SidePageMixin, WindowsMixin, ColumnsMixin, SingleActionsMixin],
  50. data () {
  51. return {
  52. detailTabs: [
  53. { label: this.$t('compute.text_238'), key: 'detail' },
  54. { label: this.$t('compute.webapp.env'), key: 'environments-list' },
  55. { label: this.$t('network.custom_domain'), key: 'domain-list' },
  56. { label: this.$t('network.text_143'), key: 'certificate-list' },
  57. { label: this.$t('common.backup'), key: 'backup-list' },
  58. { label: this.$t('compute.text_240'), key: 'event-drawer' },
  59. ],
  60. }
  61. },
  62. computed: {
  63. getParams () {
  64. return null
  65. },
  66. listId () {
  67. switch (this.params.windowData.currentTab) {
  68. case 'event-drawer':
  69. return 'EventListForNotifySidePage'
  70. case 'environments-list':
  71. return 'EnvironmentsListForWebAppSidepage'
  72. default:
  73. return ''
  74. }
  75. },
  76. hiddenColumns () {
  77. return this.params.hiddenColumns || []
  78. },
  79. },
  80. }
  81. </script>