feat: add source selection option in user search and improve code formatting
This commit is contained in:
parent
6e1fb1d4ce
commit
b5fe64d619
@ -69,6 +69,10 @@
|
|||||||
>
|
>
|
||||||
<el-option :label="$t('views.login.loginForm.username.label')" value="username"/>
|
<el-option :label="$t('views.login.loginForm.username.label')" value="username"/>
|
||||||
<el-option :label="$t('views.userManage.userForm.nick_name.label')" value="nick_name"/>
|
<el-option :label="$t('views.userManage.userForm.nick_name.label')" value="nick_name"/>
|
||||||
|
<el-option
|
||||||
|
:label="$t('views.userManage.source.label')"
|
||||||
|
value="source"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-input
|
<el-input
|
||||||
v-if="search_type === 'username'"
|
v-if="search_type === 'username'"
|
||||||
@ -84,6 +88,23 @@
|
|||||||
style="width: 220px"
|
style="width: 220px"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
|
<el-select
|
||||||
|
v-else-if="search_type === 'source'"
|
||||||
|
v-model="search_form.source"
|
||||||
|
@change="getList"
|
||||||
|
style="width: 220px"
|
||||||
|
clearable
|
||||||
|
:placeholder="$t('common.inputPlaceholder')"
|
||||||
|
>
|
||||||
|
<el-option :label="$t('views.userManage.source.local')" value="LOCAL"/>
|
||||||
|
<el-option label="CAS" value="CAS"/>
|
||||||
|
<el-option label="LDAP" value="LDAP"/>
|
||||||
|
<el-option label="OIDC" value="OIDC"/>
|
||||||
|
<el-option label="OAuth2" value="OAuth2"/>
|
||||||
|
<el-option :label="$t('views.userManage.source.wecom')" value="wecom"/>
|
||||||
|
<el-option :label="$t('views.userManage.source.lark')" value="lark"/>
|
||||||
|
<el-option :label="$t('views.userManage.source.dingtalk')" value="dingtalk"/>
|
||||||
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<app-table
|
<app-table
|
||||||
@ -317,12 +338,14 @@ const search_type = ref('username')
|
|||||||
const search_form = ref<{
|
const search_form = ref<{
|
||||||
username: string
|
username: string
|
||||||
nick_name?: string
|
nick_name?: string
|
||||||
|
source?: string
|
||||||
}>({
|
}>({
|
||||||
username: '',
|
username: '',
|
||||||
nick_name: '',
|
nick_name: '',
|
||||||
|
source: '',
|
||||||
})
|
})
|
||||||
const search_type_change = () => {
|
const search_type_change = () => {
|
||||||
search_form.value = { username: '', nick_name: '' }
|
search_form.value = {username: '', nick_name: '', source: ''}
|
||||||
}
|
}
|
||||||
|
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
@ -412,7 +435,8 @@ function deleteUserManage(row: ChatUserItem) {
|
|||||||
getList()
|
getList()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(() => {
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const UserPwdDialogRef = ref()
|
const UserPwdDialogRef = ref()
|
||||||
@ -458,7 +482,8 @@ function handleBatchDelete() {
|
|||||||
await getList()
|
await getList()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(() => {
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const setUserGroupsRef = ref<InstanceType<typeof SetUserGroupsDialog>>()
|
const setUserGroupsRef = ref<InstanceType<typeof SetUserGroupsDialog>>()
|
||||||
|
|||||||
@ -163,6 +163,10 @@
|
|||||||
:label="$t('views.userManage.userForm.nick_name.label')"
|
:label="$t('views.userManage.userForm.nick_name.label')"
|
||||||
value="nick_name"
|
value="nick_name"
|
||||||
/>
|
/>
|
||||||
|
<el-option
|
||||||
|
:label="$t('views.userManage.source.label')"
|
||||||
|
value="source"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-input
|
<el-input
|
||||||
v-if="searchType === 'username'"
|
v-if="searchType === 'username'"
|
||||||
@ -180,6 +184,23 @@
|
|||||||
style="width: 220px"
|
style="width: 220px"
|
||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
|
<el-select
|
||||||
|
v-else-if="searchType === 'source'"
|
||||||
|
v-model="searchForm.source"
|
||||||
|
@change="getList"
|
||||||
|
style="width: 220px"
|
||||||
|
clearable
|
||||||
|
:placeholder="$t('common.inputPlaceholder')"
|
||||||
|
>
|
||||||
|
<el-option :label="$t('views.userManage.source.local')" value="LOCAL"/>
|
||||||
|
<el-option label="CAS" value="CAS"/>
|
||||||
|
<el-option label="LDAP" value="LDAP"/>
|
||||||
|
<el-option label="OIDC" value="OIDC"/>
|
||||||
|
<el-option label="OAuth2" value="OAuth2"/>
|
||||||
|
<el-option :label="$t('views.userManage.source.wecom')" value="wecom"/>
|
||||||
|
<el-option :label="$t('views.userManage.source.lark')" value="lark"/>
|
||||||
|
<el-option :label="$t('views.userManage.source.dingtalk')" value="dingtalk"/>
|
||||||
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -347,7 +368,8 @@ function deleteGroup(item: ListItem) {
|
|||||||
current.value = item.id === current.value?.id ? list.value[0] : current.value
|
current.value = item.id === current.value?.id ? list.value[0] : current.value
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(() => {
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
async function refresh(group?: ListItem) {
|
async function refresh(group?: ListItem) {
|
||||||
@ -366,6 +388,7 @@ const searchType = ref('username')
|
|||||||
const searchForm = ref<Record<string, any>>({
|
const searchForm = ref<Record<string, any>>({
|
||||||
username: '',
|
username: '',
|
||||||
nick_name: '',
|
nick_name: '',
|
||||||
|
source: '',
|
||||||
})
|
})
|
||||||
const paginationConfig = reactive({
|
const paginationConfig = reactive({
|
||||||
current_page: 1,
|
current_page: 1,
|
||||||
@ -445,7 +468,8 @@ function handleDeleteUser(item?: ChatUserGroupUserItem) {
|
|||||||
await getList()
|
await getList()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(() => {
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const mouseId = ref('')
|
const mouseId = ref('')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user