|
1 | 1 | <template> |
2 | | - <ContentContainer> |
3 | | - <template #header> |
4 | | - <div class="shared-header"> |
5 | | - <span class="title">{{ t('views.chatUser.title') }}</span> |
6 | | - <el-icon size="12"> |
7 | | - <rightOutlined></rightOutlined> |
8 | | - </el-icon> |
9 | | - <span class="sub-title">{{ t('views.chatUser.group.title') }}</span> |
10 | | - </div> |
11 | | - </template> |
12 | | - <el-card style="--el-card-padding: 0" class="user-card"> |
13 | | - <div class="flex h-full"> |
14 | | - <div class="user-left border-r p-16"> |
15 | | - <div class="user-left_title flex-between"> |
16 | | - <h4 class="medium">{{ $t('views.chatUser.group.title') }}</h4> |
17 | | - <el-tooltip effect="dark" :content="`${$t('common.create')}${$t('views.chatUser.group.title')}`" |
18 | | - placement="top"> |
19 | | - <el-button type="primary" text @click="createOrUpdate()"> |
20 | | - <AppIcon iconName="app-copy"></AppIcon> |
21 | | - </el-button> |
22 | | - </el-tooltip> |
23 | | - </div> |
24 | | - |
25 | | - <div class="p-8"> |
26 | | - <el-input v-model="filterText" :placeholder="$t('common.search')" prefix-icon="Search" clearable /> |
27 | | - </div> |
28 | | - <div class="list-height-left"> |
29 | | - <el-scrollbar v-loading="loading"> |
30 | | - <common-list :data="filterList" @click="clickUserGroup" :default-active="current?.id"> |
31 | | - <template #default="{ row }"> |
32 | | - <div class="flex-between"> |
33 | | - <span class="ellipsis" style="max-width: initial;">{{ row.name }}</span> |
34 | | - <el-dropdown :teleported="false"> |
35 | | - <el-button text> |
36 | | - <el-icon class="color-secondary"> |
37 | | - <MoreFilled /> |
38 | | - </el-icon> |
39 | | - </el-button> |
40 | | - <template #dropdown> |
41 | | - <el-dropdown-menu style="min-width: 80px"> |
42 | | - <el-dropdown-item @click.stop="createOrUpdate(row)" class="p-8"> |
43 | | - <AppIcon iconName="app-copy"></AppIcon> |
44 | | - {{ |
45 | | - $t('common.rename') |
46 | | - }} |
47 | | - </el-dropdown-item> |
48 | | - <el-dropdown-item @click.stop="deleteGroup(row)" class="border-t p-8"> |
49 | | - <AppIcon iconName="app-copy"></AppIcon> |
50 | | - {{ |
51 | | - $t('common.delete') |
52 | | - }} |
53 | | - </el-dropdown-item> |
54 | | - </el-dropdown-menu> |
55 | | - </template> |
56 | | - </el-dropdown> |
57 | | - </div> |
58 | | - </template> |
59 | | - <template #empty> |
60 | | - <span></span> |
61 | | - </template> |
62 | | - </common-list> |
63 | | - </el-scrollbar> |
64 | | - </div> |
| 2 | + <div class="h-full"> |
| 3 | + <ContentContainer> |
| 4 | + <template #header> |
| 5 | + <div class="shared-header"> |
| 6 | + <span class="title">{{ t('views.chatUser.title') }}</span> |
| 7 | + <el-icon size="12"> |
| 8 | + <rightOutlined></rightOutlined> |
| 9 | + </el-icon> |
| 10 | + <span class="sub-title">{{ t('views.chatUser.group.title') }}</span> |
65 | 11 | </div> |
| 12 | + </template> |
| 13 | + <el-card style="--el-card-padding: 0" class="user-card"> |
| 14 | + <div class="flex h-full"> |
| 15 | + <div class="user-left border-r p-16"> |
| 16 | + <div class="user-left_title flex-between"> |
| 17 | + <h4 class="medium">{{ $t('views.chatUser.group.title') }}</h4> |
| 18 | + <el-tooltip effect="dark" :content="`${$t('common.create')}${$t('views.chatUser.group.title')}`" |
| 19 | + placement="top"> |
| 20 | + <el-button type="primary" text @click="createOrUpdate()"> |
| 21 | + <AppIcon iconName="app-copy"></AppIcon> |
| 22 | + </el-button> |
| 23 | + </el-tooltip> |
| 24 | + </div> |
66 | 25 |
|
67 | | - <!-- 右边 --> |
68 | | - <div class="user-right" v-loading="rightLoading"> |
69 | | - <div class="flex align-center"> |
70 | | - <h4 class="medium">{{ current?.name }}</h4> |
71 | | - <el-divider direction="vertical" class="mr-8 ml-8" /> |
72 | | - <AppIcon iconName="app-wordspace" style="font-size: 16px" class="color-input-placeholder"></AppIcon> |
73 | | - <span class="color-input-placeholder ml-4"> |
74 | | - {{ paginationConfig.total }} |
75 | | - </span> |
| 26 | + <div class="p-8"> |
| 27 | + <el-input v-model="filterText" :placeholder="$t('common.search')" prefix-icon="Search" clearable /> |
| 28 | + </div> |
| 29 | + <div class="list-height-left"> |
| 30 | + <el-scrollbar v-loading="loading"> |
| 31 | + <common-list :data="filterList" @click="clickUserGroup" :default-active="current?.id"> |
| 32 | + <template #default="{ row }"> |
| 33 | + <div class="flex-between"> |
| 34 | + <span class="ellipsis" style="max-width: initial;">{{ row.name }}</span> |
| 35 | + <el-dropdown :teleported="false"> |
| 36 | + <el-button text> |
| 37 | + <el-icon class="color-secondary"> |
| 38 | + <MoreFilled /> |
| 39 | + </el-icon> |
| 40 | + </el-button> |
| 41 | + <template #dropdown> |
| 42 | + <el-dropdown-menu style="min-width: 80px"> |
| 43 | + <el-dropdown-item @click.stop="createOrUpdate(row)" class="p-8"> |
| 44 | + <AppIcon iconName="app-copy"></AppIcon> |
| 45 | + {{ |
| 46 | + $t('common.rename') |
| 47 | + }} |
| 48 | + </el-dropdown-item> |
| 49 | + <el-dropdown-item @click.stop="deleteGroup(row)" class="border-t p-8"> |
| 50 | + <AppIcon iconName="app-copy"></AppIcon> |
| 51 | + {{ |
| 52 | + $t('common.delete') |
| 53 | + }} |
| 54 | + </el-dropdown-item> |
| 55 | + </el-dropdown-menu> |
| 56 | + </template> |
| 57 | + </el-dropdown> |
| 58 | + </div> |
| 59 | + </template> |
| 60 | + <template #empty> |
| 61 | + <span></span> |
| 62 | + </template> |
| 63 | + </common-list> |
| 64 | + </el-scrollbar> |
| 65 | + </div> |
76 | 66 | </div> |
77 | 67 |
|
78 | | - <div class="flex-between mb-16" style="margin-top: 20px;"> |
79 | | - <div> |
80 | | - <el-button type="primary" @click="createUser()"> |
81 | | - {{ t('views.role.member.add') }} |
82 | | - </el-button> |
83 | | - <el-button :disabled="multipleSelection.length === 0" @click="handleDeleteUser()"> |
84 | | - {{ $t('common.delete') }} |
85 | | - </el-button> |
| 68 | + <!-- 右边 --> |
| 69 | + <div class="user-right" v-loading="rightLoading"> |
| 70 | + <div class="flex align-center"> |
| 71 | + <h4 class="medium">{{ current?.name }}</h4> |
| 72 | + <el-divider direction="vertical" class="mr-8 ml-8" /> |
| 73 | + <AppIcon iconName="app-wordspace" style="font-size: 16px" class="color-input-placeholder"></AppIcon> |
| 74 | + <span class="color-input-placeholder ml-4"> |
| 75 | + {{ paginationConfig.total }} |
| 76 | + </span> |
86 | 77 | </div> |
87 | | - <div class="flex-between complex-search"> |
88 | | - <el-select class="complex-search__left" v-model="searchType" style="width: 120px"> |
89 | | - <el-option :label="$t('views.login.loginForm.username.label')" value="username" /> |
90 | | - </el-select> |
91 | | - <el-input v-if="searchType === 'username'" v-model="searchForm.username" @change="getList" |
92 | | - :placeholder="$t('common.searchBar.placeholder')" style="width: 220px" clearable /> |
| 78 | + |
| 79 | + <div class="flex-between mb-16" style="margin-top: 20px;"> |
| 80 | + <div> |
| 81 | + <el-button type="primary" @click="createUser()"> |
| 82 | + {{ t('views.role.member.add') }} |
| 83 | + </el-button> |
| 84 | + <el-button :disabled="multipleSelection.length === 0" @click="handleDeleteUser()"> |
| 85 | + {{ $t('common.delete') }} |
| 86 | + </el-button> |
| 87 | + </div> |
| 88 | + <div class="flex-between complex-search"> |
| 89 | + <el-select class="complex-search__left" v-model="searchType" style="width: 120px"> |
| 90 | + <el-option :label="$t('views.login.loginForm.username.label')" value="username" /> |
| 91 | + </el-select> |
| 92 | + <el-input v-if="searchType === 'username'" v-model="searchForm.username" @change="getList" |
| 93 | + :placeholder="$t('common.searchBar.placeholder')" style="width: 220px" clearable /> |
| 94 | + </div> |
93 | 95 | </div> |
94 | | - </div> |
95 | 96 |
|
96 | | - <app-table :data="tableData" :pagination-config="paginationConfig" @sizeChange="handleSizeChange" |
97 | | - @changePage="getList" @selection-change="handleSelectionChange"> |
98 | | - <el-table-column type="selection" width="55" /> |
99 | | - <el-table-column prop="nick_name" :label="$t('views.userManage.userForm.nick_name.label')" /> |
100 | | - <el-table-column prop="username" :label="$t('views.login.loginForm.username.label')" /> |
101 | | - <el-table-column prop="source" :label="$t('views.userManage.source.label')"> |
102 | | - <template #default="{ row }"> |
103 | | - {{ |
104 | | - row.source === 'LOCAL' |
105 | | - ? $t('views.userManage.source.local') |
106 | | - : row.source === 'wecom' |
107 | | - ? $t('views.userManage.source.wecom') |
108 | | - : row.source === 'lark' |
109 | | - ? $t('views.userManage.source.lark') |
110 | | - : row.source === 'dingtalk' |
111 | | - ? $t('views.userManage.source.dingtalk') |
112 | | - : row.source === 'OAUTH2' || row.source === 'OAuth2' |
113 | | - ? 'OAuth2' |
114 | | - : row.source |
115 | | - }} |
116 | | - </template> |
117 | | - </el-table-column> |
118 | | - <el-table-column :label="$t('common.operation')" width="100" fixed="right"> |
119 | | - <template #default="{ row }"> |
120 | | - <el-tooltip effect="dark" :content="`${$t('views.role.member.delete.button')}`" placement="top"> |
121 | | - <el-button type="primary" text @click.stop="handleDeleteUser(row)"> |
122 | | - <el-icon> |
123 | | - <EditPen /> |
124 | | - </el-icon> |
125 | | - </el-button> |
126 | | - </el-tooltip> |
127 | | - </template> |
128 | | - </el-table-column> |
129 | | - </app-table> |
| 97 | + <app-table :data="tableData" :pagination-config="paginationConfig" @sizeChange="handleSizeChange" |
| 98 | + @changePage="getList" @selection-change="handleSelectionChange"> |
| 99 | + <el-table-column type="selection" width="55" /> |
| 100 | + <el-table-column prop="nick_name" :label="$t('views.userManage.userForm.nick_name.label')" /> |
| 101 | + <el-table-column prop="username" :label="$t('views.login.loginForm.username.label')" /> |
| 102 | + <el-table-column prop="source" :label="$t('views.userManage.source.label')"> |
| 103 | + <template #default="{ row }"> |
| 104 | + {{ |
| 105 | + row.source === 'LOCAL' |
| 106 | + ? $t('views.userManage.source.local') |
| 107 | + : row.source === 'wecom' |
| 108 | + ? $t('views.userManage.source.wecom') |
| 109 | + : row.source === 'lark' |
| 110 | + ? $t('views.userManage.source.lark') |
| 111 | + : row.source === 'dingtalk' |
| 112 | + ? $t('views.userManage.source.dingtalk') |
| 113 | + : row.source === 'OAUTH2' || row.source === 'OAuth2' |
| 114 | + ? 'OAuth2' |
| 115 | + : row.source |
| 116 | + }} |
| 117 | + </template> |
| 118 | + </el-table-column> |
| 119 | + <el-table-column :label="$t('common.operation')" width="100" fixed="right"> |
| 120 | + <template #default="{ row }"> |
| 121 | + <el-tooltip effect="dark" :content="`${$t('views.role.member.delete.button')}`" placement="top"> |
| 122 | + <el-button type="primary" text @click.stop="handleDeleteUser(row)"> |
| 123 | + <el-icon> |
| 124 | + <EditPen /> |
| 125 | + </el-icon> |
| 126 | + </el-button> |
| 127 | + </el-tooltip> |
| 128 | + </template> |
| 129 | + </el-table-column> |
| 130 | + </app-table> |
| 131 | + </div> |
130 | 132 | </div> |
131 | | - </div> |
132 | | - </el-card> |
133 | | - </ContentContainer> |
134 | | - <CreateOrUpdateGroupDialog ref="createOrUpdateGroupDialogRef" @refresh="refresh" /> |
135 | | - <CreateGroupUserDialog ref="createGroupUserDialogRef" @refresh="getList" /> |
| 133 | + </el-card> |
| 134 | + </ContentContainer> |
| 135 | + <CreateOrUpdateGroupDialog ref="createOrUpdateGroupDialogRef" @refresh="refresh" /> |
| 136 | + <CreateGroupUserDialog ref="createGroupUserDialogRef" @refresh="getList" /> |
| 137 | + </div> |
136 | 138 | </template> |
137 | 139 |
|
138 | 140 | <script lang="ts" setup> |
|
0 commit comments