增加用户免押额度筛选
This commit is contained in:
@@ -25,12 +25,14 @@ export interface AdminUserItem {
|
||||
export interface AdminUserQuery {
|
||||
keyword?: string
|
||||
status?: '' | UserStatus
|
||||
has_deposit_free_quota?: boolean
|
||||
}
|
||||
|
||||
export async function fetchAdminUsers(page = 1, pageSize = 20, query: AdminUserQuery = {}) {
|
||||
const params: Record<string, unknown> = { page, page_size: pageSize }
|
||||
if (query.keyword) params.keyword = query.keyword
|
||||
if (query.status) params.status = query.status
|
||||
if (query.has_deposit_free_quota) params.has_deposit_free_quota = true
|
||||
const { data } = await apiClient.get<ApiResponse<PaginatedResult<AdminUserItem>>>(
|
||||
'/admin/users',
|
||||
{
|
||||
|
||||
@@ -30,6 +30,7 @@ const quotaAmount = ref(0)
|
||||
const filters = reactive<AdminUserQuery>({
|
||||
keyword: '',
|
||||
status: '',
|
||||
has_deposit_free_quota: false,
|
||||
})
|
||||
|
||||
const {
|
||||
@@ -51,6 +52,7 @@ function queryUsers() {
|
||||
function resetFilters() {
|
||||
filters.keyword = ''
|
||||
filters.status = ''
|
||||
filters.has_deposit_free_quota = false
|
||||
queryUsers()
|
||||
}
|
||||
|
||||
@@ -168,6 +170,11 @@ function moneyCent(value: number | string | undefined) {
|
||||
<el-option label="已禁用" value="disabled" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="免押额度">
|
||||
<el-checkbox v-model="filters.has_deposit_free_quota" @change="queryUsers">
|
||||
仅看有额度
|
||||
</el-checkbox>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" :icon="Search" :loading="loading" @click="queryUsers"
|
||||
>查询</el-button
|
||||
|
||||
Reference in New Issue
Block a user