index.vue 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <template>
  2. <base-side-page
  3. @cancel="cancelSidePage"
  4. :title="$t('cloudenv.saml_provider')"
  5. icon="res-saml-provider"
  6. :res-name="detailData.name"
  7. :actions="params.actions"
  8. :current-tab="params.windowData.currentTab"
  9. :tabs="detailTabs"
  10. :loaded="loaded"
  11. @tab-change="handleTabChange">
  12. <template v-slot:actions>
  13. <actions :options="singleActions" :row="detailData" button-type="link" button-size="small" />
  14. </template>
  15. <component
  16. res-type="saml-provider"
  17. :is="params.windowData.currentTab"
  18. :res-id="data.id"
  19. :id="listId"
  20. :data="detailData"
  21. :on-manager="onManager"
  22. :getParams="getParams" />
  23. </base-side-page>
  24. </template>
  25. <script>
  26. import SidePageMixin from '@/mixins/sidePage'
  27. import WindowsMixin from '@/mixins/windows'
  28. import Actions from '@/components/PageList/Actions'
  29. import SingleActionsMixin from '../mixins/singleActions'
  30. import ColumnsMixin from '../mixins/columns'
  31. export default {
  32. name: 'SamlProviderSidePage',
  33. components: {
  34. Actions,
  35. },
  36. mixins: [SidePageMixin, WindowsMixin, ColumnsMixin, SingleActionsMixin],
  37. data () {
  38. return {
  39. detailTabs: [
  40. { label: this.$t('compute.text_240'), key: 'event-drawer' },
  41. ],
  42. }
  43. },
  44. computed: {
  45. listId () {
  46. switch (this.params.windowData.currentTab) {
  47. case 'event-drawer':
  48. return 'EventListForSamlProviderSidePage'
  49. default:
  50. return ''
  51. }
  52. },
  53. },
  54. created () {
  55. if (this.params.tab) this.handleTabChange(this.params.tab)
  56. },
  57. }
  58. </script>