6969 >
7070 <el-option :label =" $t('views.login.loginForm.username.label')" value =" username" />
7171 <el-option :label =" $t('views.userManage.userForm.nick_name.label')" value =" nick_name" />
72+ <el-option :label =" $t('common.status.label')" value =" is_active" />
7273 <el-option
7374 :label =" $t('views.userManage.source.label')"
7475 value =" source"
8889 style =" width : 220px "
8990 clearable
9091 />
92+ <el-select
93+ v-else-if =" search_type === 'is_active'"
94+ v-model =" search_form.is_active"
95+ @change =" getList"
96+ style =" width : 220px "
97+ >
98+ <el-option :label =" $t('common.status.enabled')" :value =" true" />
99+ <el-option :label =" $t('common.status.disabled')" :value =" false" />
100+ </el-select >
91101 <el-select
92102 v-else-if =" search_type === 'source'"
93103 v-model =" search_form.source"
@@ -339,13 +349,15 @@ const search_form = ref<{
339349 username: string
340350 nick_name? : string
341351 source? : string
352+ is_active? : boolean | null
342353}>({
343354 username: ' ' ,
344355 nick_name: ' ' ,
345356 source: ' ' ,
357+ is_active: null ,
346358})
347359const search_type_change = () => {
348- search_form .value = {username: ' ' , nick_name: ' ' , source: ' ' }
360+ search_form .value = {username: ' ' , nick_name: ' ' , source: ' ' , is_active: null }
349361}
350362
351363const loading = ref (false )
@@ -366,9 +378,9 @@ const userTableData = ref<ChatUserItem[]>([])
366378
367379function getList() {
368380 const params: any = {}
369- if ( search_form .value [search_type .value as keyof typeof search_form .value ]) {
370- params [ search_type . value ] =
371- search_form . value [search_type .value as keyof typeof search_form . value ]
381+ const searchValue = search_form .value [search_type .value as keyof typeof search_form .value ]
382+ if ( searchValue !== undefined && searchValue !== null && searchValue !== ' ' ) {
383+ params [search_type .value ] = searchValue
372384 }
373385 return loadPermissionApi (' chatUser' )
374386 .getUserManage (paginationConfig , params , loading )
0 commit comments