diff --git a/apps/web-antd/src/views/system/tenant/data.tsx b/apps/web-antd/src/views/system/tenant/data.tsx index 1148a479..d31ca6d7 100644 --- a/apps/web-antd/src/views/system/tenant/data.tsx +++ b/apps/web-antd/src/views/system/tenant/data.tsx @@ -2,7 +2,7 @@ import { getPopupContainer } from '@vben/utils'; import dayjs from 'dayjs'; -import { type FormSchemaGetter, z } from '#/adapter'; +import { type FormSchemaGetter, type VxeGridProps, z } from '#/adapter'; export const querySchema: FormSchemaGetter = () => [ { @@ -27,6 +27,48 @@ export const querySchema: FormSchemaGetter = () => [ }, ]; +export const columns: VxeGridProps['columns'] = [ + { type: 'checkbox', width: 60 }, + { + title: '租户编号', + field: 'tenantId', + }, + { + title: '租户名称', + field: 'companyName', + }, + { + title: '联系人', + field: 'contactUserName', + }, + { + title: '联系电话', + field: 'contactPhone', + }, + { + title: '到期时间', + field: 'expireTime', + formatter: ({ cellValue }) => { + if (!cellValue) { + return '无期限'; + } + return cellValue; + }, + }, + { + title: '租户状态', + field: 'status', + slots: { default: 'status' }, + }, + { + field: 'action', + fixed: 'right', + slots: { default: 'action' }, + title: '操作', + width: 180, + }, +]; + const defaultExpireTime = dayjs() .add(365, 'days') .startOf('day') diff --git a/apps/web-antd/src/views/system/tenant/index.vue b/apps/web-antd/src/views/system/tenant/index.vue index 8c570272..f8033d92 100644 --- a/apps/web-antd/src/views/system/tenant/index.vue +++ b/apps/web-antd/src/views/system/tenant/index.vue @@ -1,55 +1,200 @@