reactor:【system 系统管理】dept 部门管理的实现,对齐 ele 和 antd

This commit is contained in:
YunaiV
2025-09-05 20:28:47 +08:00
parent 817a157645
commit 5776bf99f8
8 changed files with 195 additions and 160 deletions

View File

@@ -93,7 +93,7 @@ export function useFormSchema(): VbenFormSchema[] {
componentProps: {
placeholder: '请输入邮箱',
},
rules: z.string().email('请输入正确的邮箱地址').optional(),
rules: z.string().email('邮箱格式不正确').or(z.literal('')).optional(),
},
{
fieldName: 'status',
@@ -118,6 +118,7 @@ export function useGridColumns(
{
field: 'name',
title: '部门名称',
minWidth: 150,
align: 'left',
fixed: 'left',
treeNode: true,
@@ -125,15 +126,18 @@ export function useGridColumns(
{
field: 'leaderUserId',
title: '负责人',
minWidth: 150,
formatter: ({ cellValue }) => getLeaderName?.(cellValue) || '-',
},
{
field: 'sort',
title: '显示顺序',
minWidth: 100,
},
{
field: 'status',
title: '部门状态',
minWidth: 100,
cellRender: {
name: 'CellDict',
props: { type: DICT_TYPE.COMMON_STATUS },
@@ -142,6 +146,7 @@ export function useGridColumns(
{
field: 'createTime',
title: '创建时间',
minWidth: 180,
formatter: 'formatDateTime',
},
{