|
14 | 14 | <div class="user-left border-r p-16"> |
15 | 15 | <div class="user-left_title flex-between"> |
16 | 16 | <h4 class="medium">{{ $t('views.chatUser.group.title') }}</h4> |
17 | | - <el-tooltip effect="dark" |
18 | | - :content="`${$t('common.create')}${$t('views.chatUser.group.title')}`" |
19 | | - placement="top"> |
| 17 | + <el-tooltip effect="dark" :content="`${$t('common.create')}${$t('views.chatUser.group.title')}`" |
| 18 | + placement="top"> |
20 | 19 | <el-button type="primary" text @click="createOrUpdate()"> |
21 | 20 | <AppIcon iconName="app-copy"></AppIcon> |
22 | 21 | </el-button> |
23 | 22 | </el-tooltip> |
24 | 23 | </div> |
25 | 24 |
|
26 | 25 | <div class="p-8"> |
27 | | - <el-input v-model="filterText" :placeholder="$t('common.search')" prefix-icon="Search" |
28 | | - clearable/> |
| 26 | + <el-input v-model="filterText" :placeholder="$t('common.search')" prefix-icon="Search" clearable /> |
29 | 27 | </div> |
30 | 28 | <div class="list-height-left"> |
31 | 29 | <el-scrollbar v-loading="loading"> |
32 | 30 | <common-list :data="filterList" @click="clickUserGroup" :default-active="current?.id"> |
33 | 31 | <template #default="{ row }"> |
34 | 32 | <div class="flex-between"> |
35 | | - <span>{{ row.name }}</span> |
| 33 | + <span class="ellipsis" style="max-width: initial;">{{ row.name }}</span> |
36 | 34 | <el-dropdown :teleported="false"> |
37 | 35 | <el-button text> |
38 | 36 | <el-icon class="color-secondary"> |
39 | | - <MoreFilled/> |
| 37 | + <MoreFilled /> |
40 | 38 | </el-icon> |
41 | 39 | </el-button> |
42 | 40 | <template #dropdown> |
|
70 | 68 | <div class="user-right" v-loading="rightLoading"> |
71 | 69 | <div class="flex align-center"> |
72 | 70 | <h4 class="medium">{{ current?.name }}</h4> |
73 | | - <el-divider direction="vertical" class="mr-8 ml-8"/> |
74 | | - <AppIcon iconName="app-wordspace" style="font-size: 16px" |
75 | | - class="color-input-placeholder"></AppIcon> |
| 71 | + <el-divider direction="vertical" class="mr-8 ml-8" /> |
| 72 | + <AppIcon iconName="app-wordspace" style="font-size: 16px" class="color-input-placeholder"></AppIcon> |
76 | 73 | <span class="color-input-placeholder ml-4"> |
77 | 74 | {{ paginationConfig.total }} |
78 | 75 | </span> |
|
89 | 86 | </div> |
90 | 87 | <div class="flex-between complex-search"> |
91 | 88 | <el-select class="complex-search__left" v-model="searchType" style="width: 120px"> |
92 | | - <el-option :label="$t('views.login.loginForm.username.label')" value="username"/> |
| 89 | + <el-option :label="$t('views.login.loginForm.username.label')" value="username" /> |
93 | 90 | </el-select> |
94 | | - <el-input v-if="searchType === 'username'" v-model="searchForm.username" |
95 | | - @change="getList" |
96 | | - :placeholder="$t('common.searchBar.placeholder')" style="width: 220px" |
97 | | - clearable/> |
| 91 | + <el-input v-if="searchType === 'username'" v-model="searchForm.username" @change="getList" |
| 92 | + :placeholder="$t('common.searchBar.placeholder')" style="width: 220px" clearable /> |
98 | 93 | </div> |
99 | 94 | </div> |
100 | 95 |
|
101 | | - <app-table :data="tableData" :pagination-config="paginationConfig" |
102 | | - @sizeChange="handleSizeChange" |
103 | | - @changePage="getList" @selection-change="handleSelectionChange"> |
104 | | - <el-table-column type="selection" width="55"/> |
105 | | - <el-table-column prop="nick_name" |
106 | | - :label="$t('views.userManage.userForm.nick_name.label')"/> |
107 | | - <el-table-column prop="username" :label="$t('views.login.loginForm.username.label')"/> |
| 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')" /> |
108 | 101 | <el-table-column prop="source" :label="$t('views.userManage.source.label')"> |
109 | 102 | <template #default="{ row }"> |
110 | 103 | {{ |
|
124 | 117 | </el-table-column> |
125 | 118 | <el-table-column :label="$t('common.operation')" width="100" fixed="right"> |
126 | 119 | <template #default="{ row }"> |
127 | | - <el-tooltip effect="dark" :content="`${$t('views.role.member.delete.button')}`" |
128 | | - placement="top"> |
| 120 | + <el-tooltip effect="dark" :content="`${$t('views.role.member.delete.button')}`" placement="top"> |
129 | 121 | <el-button type="primary" text @click.stop="handleDeleteUser(row)"> |
130 | 122 | <el-icon> |
131 | | - <EditPen/> |
| 123 | + <EditPen /> |
132 | 124 | </el-icon> |
133 | 125 | </el-button> |
134 | 126 | </el-tooltip> |
|
139 | 131 | </div> |
140 | 132 | </el-card> |
141 | 133 | </ContentContainer> |
142 | | - <CreateOrUpdateGroupDialog ref="createOrUpdateGroupDialogRef" @refresh="refresh"/> |
143 | | - <CreateGroupUserDialog ref="createGroupUserDialogRef" @refresh="getList"/> |
| 134 | + <CreateOrUpdateGroupDialog ref="createOrUpdateGroupDialogRef" @refresh="refresh" /> |
| 135 | + <CreateGroupUserDialog ref="createGroupUserDialogRef" @refresh="getList" /> |
144 | 136 | </template> |
145 | 137 |
|
146 | 138 | <script lang="ts" setup> |
147 | | -import {onMounted, ref, watch, reactive} from 'vue' |
| 139 | +import { onMounted, ref, watch, reactive } from 'vue' |
148 | 140 | import SystemGroupApi from '@/api/system/user-group' |
149 | | -import {t} from '@/locales' |
150 | | -import type {ChatUserGroupUserItem} from '@/api/type/systemChatUser' |
| 141 | +import { t } from '@/locales' |
| 142 | +import type { ChatUserGroupUserItem } from '@/api/type/systemChatUser' |
151 | 143 | import iconMap from '@/components/app-icon/icons/common' |
152 | 144 | import CreateOrUpdateGroupDialog from './component/CreateOrUpdateGroupDialog.vue' |
153 | 145 | import CreateGroupUserDialog from './component/CreateGroupUserDialog.vue' |
154 | | -import type {ListItem} from '@/api/type/common' |
155 | | -import {MsgSuccess, MsgConfirm} from '@/utils/message' |
| 146 | +import type { ListItem } from '@/api/type/common' |
| 147 | +import { MsgSuccess, MsgConfirm } from '@/utils/message' |
156 | 148 |
|
157 | 149 | const filterText = ref('') |
158 | 150 | const loading = ref(false) |
@@ -274,15 +266,15 @@ function handleSelectionChange(val: any[]) { |
274 | 266 |
|
275 | 267 | function handleDeleteUser(item?: ChatUserGroupUserItem) { |
276 | 268 | MsgConfirm( |
277 | | - item ? `${t('views.workspace.member.delete.confirmTitle')}${item.nick_name} ?` : t('views.chatUser.group.batchDeleteMember', {count: multipleSelection.value.length}), |
| 269 | + item ? `${t('views.workspace.member.delete.confirmTitle')}${item.nick_name} ?` : t('views.chatUser.group.batchDeleteMember', { count: multipleSelection.value.length }), |
278 | 270 | '', |
279 | 271 | { |
280 | 272 | confirmButtonText: t('common.confirm'), |
281 | 273 | confirmButtonClass: 'danger', |
282 | 274 | }, |
283 | 275 | ) |
284 | 276 | .then(() => { |
285 | | - SystemGroupApi.postRemoveMember(current.value?.id as string, {group_relation_ids: item ? [item.user_group_relation_id] : multipleSelection.value.map(item => (item.user_group_relation_id))}, loading).then(async () => { |
| 277 | + SystemGroupApi.postRemoveMember(current.value?.id as string, { group_relation_ids: item ? [item.user_group_relation_id] : multipleSelection.value.map(item => (item.user_group_relation_id)) }, loading).then(async () => { |
286 | 278 | MsgSuccess(t('common.deleteSuccess')) |
287 | 279 | await getList() |
288 | 280 | }) |
|
0 commit comments