index.vue 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <template>
  2. <base-side-page
  3. @cancel="cancelSidePage"
  4. :title="$t('res.samluser')"
  5. icon="res-cloudaccount"
  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. :is="params.windowData.currentTab"
  17. :data="detailData"
  18. :on-manager="onManager"
  19. :res-id="data.id"
  20. resource="samlusers"
  21. :getParams="getParams" />
  22. </base-side-page>
  23. </template>
  24. <script>
  25. import ColumnsMixin from '../mixins/columns'
  26. import SingleActionsMixin from '../mixins/singleActions'
  27. import SamluserDetail from './Detail'
  28. // import CloudgroupList from './CloudgroupList'
  29. import SidePageMixin from '@/mixins/sidePage'
  30. import WindowsMixin from '@/mixins/windows'
  31. import Actions from '@/components/PageList/Actions'
  32. export default {
  33. name: 'SamluserSidePage',
  34. components: {
  35. SamluserDetail,
  36. // CloudgroupList,
  37. Actions,
  38. },
  39. mixins: [SidePageMixin, WindowsMixin, ColumnsMixin, SingleActionsMixin],
  40. data () {
  41. return {
  42. // cloudaccount: {},
  43. detailTabs: [
  44. { label: this.$t('sidepage.tab.label.detail'), key: 'samluser-detail' },
  45. // { label: this.$t('dictionary.cloudgroup'), key: 'cloudgroup-list' },
  46. { label: this.$t('dictionary.actions'), key: 'event-drawer' },
  47. ],
  48. }
  49. },
  50. computed: {
  51. getParams () {
  52. if (
  53. this.params.windowData.currentTab === 'cloudgroup-list'
  54. ) {
  55. return {
  56. samluser_id: this.data.id,
  57. }
  58. }
  59. return null
  60. },
  61. },
  62. // destroyed () {
  63. // this.cm = null
  64. // },
  65. // created () {
  66. // this.cm = new this.$Manager('cloudaccounts')
  67. // },
  68. // methods: {
  69. // async fetchDataCallback () {
  70. // try {
  71. // const response = await this.cm.get({ id: this.detailData.cloudaccount_id })
  72. // this.cloudaccount = response.data
  73. // return response
  74. // } catch (error) {
  75. // throw error
  76. // }
  77. // },
  78. // },
  79. }
  80. </script>