6767 style =" width : 120px "
6868 @change =" search_type_change"
6969 >
70- <el-option :label =" $t('views.login.loginForm.username.label')" value =" username" />
71- <el-option :label =" $t('views.userManage.userForm.nick_name.label')" value =" nick_name" />
70+ <el-option :label =" $t('views.login.loginForm.username.label')" value =" username" />
71+ <el-option :label =" $t('views.userManage.userForm.nick_name.label')" value =" nick_name" />
72+ <el-option
73+ :label =" $t('views.userManage.source.label')"
74+ value =" source"
75+ />
7276 </el-select >
7377 <el-input
7478 v-if =" search_type === 'username'"
8488 style =" width : 220px "
8589 clearable
8690 />
91+ <el-select
92+ v-else-if =" search_type === 'source'"
93+ v-model =" search_form.source"
94+ @change =" getList"
95+ style =" width : 220px "
96+ clearable
97+ :placeholder =" $t('common.inputPlaceholder')"
98+ >
99+ <el-option :label =" $t('views.userManage.source.local')" value =" LOCAL" />
100+ <el-option label =" CAS" value =" CAS" />
101+ <el-option label =" LDAP" value =" LDAP" />
102+ <el-option label =" OIDC" value =" OIDC" />
103+ <el-option label =" OAuth2" value =" OAuth2" />
104+ <el-option :label =" $t('views.userManage.source.wecom')" value =" wecom" />
105+ <el-option :label =" $t('views.userManage.source.lark')" value =" lark" />
106+ <el-option :label =" $t('views.userManage.source.dingtalk')" value =" dingtalk" />
107+ </el-select >
87108 </div >
88109 </div >
89110 <app-table
97118 @sort-change =" handleSortChange"
98119 :maxTableHeight =" 270"
99120 >
100- <el-table-column type =" selection" width =" 55" />
121+ <el-table-column type =" selection" width =" 55" />
101122 <el-table-column
102123 prop =" nick_name"
103124 :label =" $t('views.userManage.userForm.nick_name.label')"
114135 <template #default =" { row } " >
115136 <div v-if =" row.is_active" class =" flex align-center" >
116137 <el-icon class =" color-success mr-8" style =" font-size : 16px " >
117- <SuccessFilled />
138+ <SuccessFilled />
118139 </el-icon >
119140 <span class =" color-secondary" >
120141 {{ $t('common.status.enabled') }}
154175 min-width =" 150"
155176 >
156177 <template #default =" { row } " >
157- <TagGroup :tags =" row.user_group_names" />
178+ <TagGroup :tags =" row.user_group_names" />
158179 </template >
159180 </el-table-column >
160181 <el-table-column prop =" source" :label =" $t('views.userManage.source.label')" >
201222 "
202223 />
203224 </span >
204- <el-divider direction =" vertical" />
225+ <el-divider direction =" vertical" />
205226 <span class =" mr-8" >
206227 <el-button
207228 type =" primary"
243264 "
244265 >
245266 <el-icon >
246- <Lock />
267+ <Lock />
247268 </el-icon >
248269 </el-button >
249270 </span >
284305 ref =" UserDrawerRef"
285306 @refresh =" refresh"
286307 />
287- <UserPwdDialog ref =" UserPwdDialogRef" @refresh =" refresh" />
308+ <UserPwdDialog ref =" UserPwdDialogRef" @refresh =" refresh" />
288309 <SetUserGroupsDialog
289310 :optionLoading =" optionLoading"
290311 :chatGroupList =" chatGroupList"
291312 ref =" setUserGroupsRef"
292313 @refresh =" refresh"
293314 />
294- <SyncUsersDialog ref =" syncUsersDialogRef" @refresh =" refresh" />
315+ <SyncUsersDialog ref =" syncUsersDialogRef" @refresh =" refresh" />
295316 </div >
296317</template >
297318
298319<script lang="ts" setup>
299- import { onMounted , ref , reactive } from ' vue'
320+ import {onMounted , ref , reactive } from ' vue'
300321import UserDrawer from ' ./component/UserDrawer.vue'
301322import UserPwdDialog from ' ./component/UserPwdDialog.vue'
302323import SetUserGroupsDialog from ' ./component/SetUserGroupsDialog.vue'
303324import SyncUsersDialog from ' ./component/SyncUsersDialog.vue'
304325import userManageApi from ' @/api/system/chat-user'
305- import { datetimeFormat } from ' @/utils/time'
306- import { MsgSuccess , MsgConfirm } from ' @/utils/message'
307- import { t } from ' @/locales'
308- import type { ChatUserItem } from ' @/api/type/systemChatUser'
326+ import {datetimeFormat } from ' @/utils/time'
327+ import {MsgSuccess , MsgConfirm } from ' @/utils/message'
328+ import {t } from ' @/locales'
329+ import type {ChatUserItem } from ' @/api/type/systemChatUser'
309330import SystemGroupApi from ' @/api/system/user-group'
310- import type { ListItem } from ' @/api/type/common'
311- import { PermissionConst , RoleConst } from ' @/utils/permission/data'
312- import { ComplexPermission } from ' @/utils/permission/type'
313- import { hasPermission } from ' @/utils/permission'
314- import { loadPermissionApi } from ' @/utils/dynamics-api/permission-api.ts'
331+ import type {ListItem } from ' @/api/type/common'
332+ import {PermissionConst , RoleConst } from ' @/utils/permission/data'
333+ import {ComplexPermission } from ' @/utils/permission/type'
334+ import {hasPermission } from ' @/utils/permission'
335+ import {loadPermissionApi } from ' @/utils/dynamics-api/permission-api.ts'
315336
316337const search_type = ref (' username' )
317338const search_form = ref <{
318339 username: string
319340 nick_name? : string
341+ source? : string
320342}>({
321343 username: ' ' ,
322344 nick_name: ' ' ,
345+ source: ' ' ,
323346})
324347const search_type_change = () => {
325- search_form .value = { username: ' ' , nick_name: ' ' }
348+ search_form .value = {username: ' ' , nick_name: ' ' , source: ' ' }
326349}
327350
328351const loading = ref (false )
@@ -357,7 +380,7 @@ function getList() {
357380
358381const orderBy = ref <string >(' ' )
359382
360- function handleSortChange({ prop , order }: { prop: string ; order: string }) {
383+ function handleSortChange({prop , order }: { prop: string ; order: string }) {
361384 orderBy .value = order === ' ascending' ? prop : ` -${prop } `
362385 getList ()
363386}
@@ -412,7 +435,8 @@ function deleteUserManage(row: ChatUserItem) {
412435 getList ()
413436 })
414437 })
415- .catch (() => {})
438+ .catch (() => {
439+ })
416440}
417441
418442const UserPwdDialogRef = ref ()
@@ -443,7 +467,7 @@ async function getChatGroupList() {
443467}
444468
445469function handleBatchDelete() {
446- MsgConfirm (t (' views.chatUser.batchDeleteUser' , { count: multipleSelection .value .length }), ' ' , {
470+ MsgConfirm (t (' views.chatUser.batchDeleteUser' , {count: multipleSelection .value .length }), ' ' , {
447471 confirmButtonText: t (' common.confirm' ),
448472 confirmButtonClass: ' danger' ,
449473 })
@@ -458,7 +482,8 @@ function handleBatchDelete() {
458482 await getList ()
459483 })
460484 })
461- .catch (() => {})
485+ .catch (() => {
486+ })
462487}
463488
464489const setUserGroupsRef = ref <InstanceType <typeof SetUserGroupsDialog >>()
0 commit comments