From 8f08614a172e9530eb02b2cf1d371a016193b5fc Mon Sep 17 00:00:00 2001 From: Mrx <18278715334@163.com> Date: Mon, 2 Feb 2026 14:55:34 +0800 Subject: [PATCH] --- apps/web-antd/src/api/platform-user/index.ts | 10 ++++--- apps/web-antd/src/views/platform-user/data.ts | 30 +++++++++++++++++++ 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/apps/web-antd/src/api/platform-user/index.ts b/apps/web-antd/src/api/platform-user/index.ts index 47a2a14..1bcac4e 100644 --- a/apps/web-antd/src/api/platform-user/index.ts +++ b/apps/web-antd/src/api/platform-user/index.ts @@ -9,6 +9,7 @@ export namespace PlatformUserApi { nickname: string; info: string; inside: number; + disable: number; // 0 可用 1 禁用 create_time: string; update_time: string; } @@ -19,10 +20,11 @@ export namespace PlatformUserApi { } export interface UpdatePlatformUserRequest { - mobile: string; - nickname: string; - info: string; - inside: number; + mobile?: string; + nickname?: string; + info?: string; + inside?: number; + disable?: number; // 0 可用 1 禁用 } } diff --git a/apps/web-antd/src/views/platform-user/data.ts b/apps/web-antd/src/views/platform-user/data.ts index f7fcf03..fce3b71 100644 --- a/apps/web-antd/src/views/platform-user/data.ts +++ b/apps/web-antd/src/views/platform-user/data.ts @@ -36,6 +36,18 @@ export function useFormSchema(): VbenFormSchema[] { }, defaultValue: 0, }, + { + component: 'Switch', + fieldName: 'disable', + label: '是否封禁', + componentProps: { + checkedChildren: '已封禁', + unCheckedChildren: '正常', + checkedValue: 1, + unCheckedValue: 0, + }, + defaultValue: 0, + }, ]; } @@ -64,6 +76,18 @@ export function useGridFormSchema(): VbenFormSchema[] { ], }, }, + { + component: 'Select', + fieldName: 'disable', + label: '封禁状态', + componentProps: { + allowClear: true, + options: [ + { label: '正常', value: 0 }, + { label: '已封禁', value: 1 }, + ], + }, + }, { component: 'RangePicker', fieldName: 'create_time', @@ -104,6 +128,12 @@ export function useColumns( width: 100, formatter: ({ cellValue }) => (cellValue === 1 ? '是' : '否'), }, + { + field: 'disable', + title: '封禁状态', + width: 100, + formatter: ({ cellValue }) => (cellValue === 1 ? '已封禁' : '正常'), + }, { field: 'create_time', title: '创建时间',