feat(user-management): 添加用户状态过滤功能和优化数字讲师管理界面

This commit is contained in:
2025-01-12 13:19:10 +08:00
parent aa0e48baa7
commit 4294d400fc
2 changed files with 69 additions and 34 deletions

View File

@@ -55,6 +55,7 @@ const selectedColumns = ref([...columns.filter(row => {
})])
const page = ref(1)
const pageCount = ref(15)
const state_filter = ref<'verified' | 'unverified'>('verified')
const is_verified = ref(true)
const viewingUser = ref<UserSchema | null>(null)
const isSlideOpen = computed({
@@ -63,6 +64,7 @@ const isSlideOpen = computed({
})
watch([is_verified, pageCount], () => page.value = 1)
watch(state_filter, () => is_verified.value = state_filter.value === 'verified')
const {
data: usersData,
@@ -281,10 +283,10 @@ const setUserStatus = (uid: number, is_verified: boolean) => {
<div class="flex gap-1.5 items-center">
<USelectMenu
v-model="is_verified"
v-model="state_filter"
:options="[
{label: '正常账号', value: true, icon: 'tabler:user-check'},
{label: '停用账号', value: false, icon: 'tabler:user-cancel'},
{label: '正常账号', value: 'verified', icon: 'tabler:user-check'},
{label: '停用账号', value: 'unverified', icon: 'tabler:user-cancel'},
]"
:ui-menu="{width: 'w-fit', option: {size: 'text-xs', icon: {base: 'w-4 h-4'}}}"
size="xs"