2727 [PermissionConst.WORKSPACE_USER_GROUP_CREATE, PermissionConst.USER_GROUP_CREATE],
2828 [],'OR',)"
2929 >
30- <el-icon :size =" 18" ><Plus /></el-icon >
30+ <el-icon :size =" 18" >
31+ <Plus />
32+ </el-icon >
3133 </el-button >
3234 </el-tooltip >
3335 </div >
5759 <el-dropdown :teleported =" false" >
5860 <el-button text >
5961 <el-icon class =" color-secondary" >
60- <MoreFilled />
62+ <MoreFilled />
6163 </el-icon >
6264 </el-button >
6365 <template #dropdown >
7072 [PermissionConst.WORKSPACE_USER_GROUP_EDIT, PermissionConst.USER_GROUP_EDIT],
7173 [],'OR',),'OR',)"
7274 >
73- <el-icon ><EditPen /></el-icon >
75+ <el-icon >
76+ <EditPen />
77+ </el-icon >
7478 {{ $t('common.rename') }}
7579 </el-dropdown-item >
7680 <el-dropdown-item
8185 [PermissionConst.WORKSPACE_USER_GROUP_DELETE, PermissionConst.USER_GROUP_DELETE],
8286 [],'OR',),'OR',)"
8387 >
84- <el-icon ><Delete /></el-icon >
88+ <el-icon >
89+ <Delete />
90+ </el-icon >
8591 {{ $t('common.delete') }}
8692 </el-dropdown-item >
8793 </el-dropdown-menu >
102108 <div class =" user-right" v-loading =" rightLoading" >
103109 <div class =" flex align-center" >
104110 <h4 class =" medium" >{{ current?.name }}</h4 >
105- <el-divider direction =" vertical" class =" mr-8 ml-8" />
111+ <el-divider direction =" vertical" class =" mr-8 ml-8" />
106112 <AppIcon
107113 iconName =" app-workspace"
108114 style =" font-size : 16px "
140146 </div >
141147 <div class =" flex-between complex-search" >
142148 <el-select class =" complex-search__left" v-model =" searchType" style =" width : 120px " >
143- <el-option :label =" $t('views.login.loginForm.username.label')" value =" username" />
149+ <el-option :label =" $t('views.login.loginForm.username.label')" value =" username" />
150+ <el-option :label =" $t('views.userManage.userForm.nick_name.label')"
151+ value =" nick_name" />
144152 </el-select >
145153 <el-input
146154 v-if =" searchType === 'username'"
150158 style =" width : 220px "
151159 clearable
152160 />
161+ <el-input
162+ v-else-if =" searchType === 'nick_name'"
163+ v-model =" searchForm.nick_name"
164+ @change =" getList"
165+ :placeholder =" $t('common.searchBar.placeholder')"
166+ style =" width : 220px "
167+ clearable
168+ />
153169 </div >
154170 </div >
155171
160176 @changePage =" getList"
161177 @selection-change =" handleSelectionChange"
162178 >
163- <el-table-column type =" selection" width =" 55" />
179+ <el-table-column type =" selection" width =" 55" />
164180 <el-table-column
165181 prop =" nick_name"
166182 :label =" $t('views.userManage.userForm.nick_name.label')"
167183 />
168- <el-table-column prop =" username" :label =" $t('views.login.loginForm.username.label')" />
184+ <el-table-column prop =" username" :label =" $t('views.login.loginForm.username.label')" />
169185 <el-table-column prop =" source" :label =" $t('views.userManage.source.label')" >
170186 <template #default =" { row } " >
171187 {{
197213 [],'OR',)"
198214 >
199215 <el-icon >
200- <EditPen />
216+ <EditPen />
201217 </el-icon >
202218 </el-button >
203219 </el-tooltip >
208224 </div >
209225 </el-card >
210226
211- <CreateOrUpdateGroupDialog ref =" createOrUpdateGroupDialogRef" @refresh =" refresh" />
212- <CreateGroupUserDialog ref =" createGroupUserDialogRef" @refresh =" getList" />
227+ <CreateOrUpdateGroupDialog ref =" createOrUpdateGroupDialogRef" @refresh =" refresh" />
228+ <CreateGroupUserDialog ref =" createGroupUserDialogRef" @refresh =" getList" />
213229 </div >
214230</template >
215231
216232<script lang="ts" setup>
217- import { onMounted , ref , watch , reactive } from ' vue'
233+ import {onMounted , ref , watch , reactive } from ' vue'
218234import SystemGroupApi from ' @/api/system/user-group'
219- import { t } from ' @/locales'
220- import type { ChatUserGroupUserItem } from ' @/api/type/systemChatUser'
235+ import {t } from ' @/locales'
236+ import type {ChatUserGroupUserItem } from ' @/api/type/systemChatUser'
221237import CreateOrUpdateGroupDialog from ' ./component/CreateOrUpdateGroupDialog.vue'
222238import CreateGroupUserDialog from ' ./component/CreateGroupUserDialog.vue'
223- import type { ListItem } from ' @/api/type/common'
224- import { MsgSuccess , MsgConfirm } from ' @/utils/message'
225- import { PermissionConst , RoleConst } from ' @/utils/permission/data'
226- import { ComplexPermission } from ' @/utils/permission/type'
227- import { hasPermission } from ' @/utils/permission/index'
239+ import type {ListItem } from ' @/api/type/common'
240+ import {MsgSuccess , MsgConfirm } from ' @/utils/message'
241+ import {PermissionConst , RoleConst } from ' @/utils/permission/data'
242+ import {ComplexPermission } from ' @/utils/permission/type'
243+ import {hasPermission } from ' @/utils/permission/index'
228244
229245const filterText = ref (' ' )
230246const loading = ref (false )
@@ -284,7 +300,8 @@ function deleteGroup(item: ListItem) {
284300 current .value = item .id === current .value ?.id ? list .value [0 ] : current .value
285301 })
286302 })
287- .catch (() => {})
303+ .catch (() => {
304+ })
288305}
289306
290307async function refresh(group ? : ListItem ) {
@@ -298,6 +315,7 @@ const rightLoading = ref(false)
298315const searchType = ref (' username' )
299316const searchForm = ref <Record <string , any >>({
300317 username: ' ' ,
318+ nick_name: ' ' ,
301319})
302320const paginationConfig = reactive ({
303321 current_page: 1 ,
@@ -310,10 +328,13 @@ const tableData = ref<ChatUserGroupUserItem[]>([])
310328async function getList() {
311329 if (! current .value ?.id ) return
312330 try {
331+ const params = {
332+ [searchType .value ]: searchForm .value [searchType .value as keyof typeof searchForm .value ],
333+ }
313334 const res = await SystemGroupApi .getUserListByGroup (
314335 current .value ?.id ,
315336 paginationConfig ,
316- searchForm . value . username ,
337+ params ,
317338 rightLoading ,
318339 )
319340 tableData .value = res .data .records
@@ -351,7 +372,7 @@ function handleDeleteUser(item?: ChatUserGroupUserItem) {
351372 MsgConfirm (
352373 item
353374 ? ` ${t (' views.workspace.member.delete.confirmTitle' )}${item .nick_name } ? `
354- : t (' views.chatUser.group.batchDeleteMember' , { count: multipleSelection .value .length }),
375+ : t (' views.chatUser.group.batchDeleteMember' , {count: multipleSelection .value .length }),
355376 ' ' ,
356377 {
357378 confirmButtonText: t (' common.confirm' ),
@@ -372,8 +393,10 @@ function handleDeleteUser(item?: ChatUserGroupUserItem) {
372393 await getList ()
373394 })
374395 })
375- .catch (() => {})
396+ .catch (() => {
397+ })
376398}
399+
377400const mouseId = ref (' ' )
378401
379402function mouseenter(row : any ) {
0 commit comments