index.vue 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <template>
  2. <base-side-page
  3. @cancel="cancelSidePage"
  4. :title="$t('dictionary.group')"
  5. icon="res-group"
  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 :is="params.windowData.currentTab" :res-id="data.id" :id="listId" :data="detailData" :onManager="onManager" :getParams="getParams" @tab-change="handleTabChange" />
  16. </base-side-page>
  17. </template>
  18. <script>
  19. import SidePageMixin from '@/mixins/sidePage'
  20. import WindowsMixin from '@/mixins/windows'
  21. import Actions from '@/components/PageList/Actions'
  22. import ColumnsMixin from '../mixins/columns'
  23. import SingleActionsMixin from '../mixins/singleActions'
  24. import GroupDetail from './Detail'
  25. import ProjectList from './ProjectList'
  26. import UserList from './UserList'
  27. export default {
  28. name: 'GroupSidePage',
  29. components: {
  30. GroupDetail,
  31. Actions,
  32. ProjectList,
  33. UserList,
  34. },
  35. mixins: [SidePageMixin, WindowsMixin, ColumnsMixin, SingleActionsMixin],
  36. data () {
  37. return {
  38. detailTabs: [
  39. { label: this.$t('system.text_159'), key: 'group-detail' },
  40. { label: this.$t('system.text_201'), key: 'project-list' },
  41. { label: this.$t('system.user_in_group'), key: 'user-list' },
  42. { label: this.$t('system.text_17'), key: 'event-drawer' },
  43. ],
  44. }
  45. },
  46. computed: {
  47. getParams () {
  48. return null
  49. },
  50. listId () {
  51. switch (this.params.windowData.currentTab) {
  52. case 'event-drawer':
  53. return 'EventListForGroupSidePage'
  54. case 'project-list':
  55. return 'ProjectListForGroupSidePage'
  56. case 'user-list':
  57. return 'UserListForGroupSidePage'
  58. default:
  59. return ''
  60. }
  61. },
  62. },
  63. created () {
  64. if (this.params.tab) {
  65. this.handleTabChange(this.params.tab)
  66. }
  67. },
  68. methods: {
  69. handleOpenSidepage (row, tab) {
  70. this.handleTabChange(tab)
  71. },
  72. },
  73. }
  74. </script>