From 88cd81e95d1061d6815c54e1d901167da4c154d4 Mon Sep 17 00:00:00 2001 From: lingting Date: Sun, 17 Oct 2021 15:28:33 +0800 Subject: [PATCH] =?UTF-8?q?feat(Ballcat):=20=E6=B7=BB=E5=8A=A0=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E6=96=87=E6=A1=A3=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/sample/document/DocumentPage.tsx | 75 +++++++++++++++++++ src/services/ballcat/sample/document/index.ts | 30 ++++++++ .../ballcat/sample/document/typings.ts | 38 ++++++++++ src/services/ballcat/sample/index.ts | 5 ++ 4 files changed, 148 insertions(+) create mode 100644 src/pages/sample/document/DocumentPage.tsx create mode 100644 src/services/ballcat/sample/document/index.ts create mode 100644 src/services/ballcat/sample/document/typings.ts create mode 100644 src/services/ballcat/sample/index.ts diff --git a/src/pages/sample/document/DocumentPage.tsx b/src/pages/sample/document/DocumentPage.tsx new file mode 100644 index 0000000..4512c02 --- /dev/null +++ b/src/pages/sample/document/DocumentPage.tsx @@ -0,0 +1,75 @@ +import Page from '@/components/Page'; +import { document } from '@/services/ballcat/sample'; +import type { DocumentQo, DocumentVo, Document } from '@/services/ballcat/sample'; +import type { ProColumns } from '@ant-design/pro-table'; +import { ProFormText } from '@ant-design/pro-form'; +import Lov from '@/components/Lov'; +import { Form } from 'antd'; + +const dataColumns: ProColumns[] = [ + { + title: 'ID', + dataIndex: 'id', + }, + { + title: '文档名称', + dataIndex: 'name', + hideInSearch: true, + }, + { + title: '所属用户ID', + dataIndex: 'userId', + hideInSearch: true, + }, + { + title: '所属用户', + dataIndex: 'username', + hideInSearch: true, + }, + { + title: '所属组织ID', + dataIndex: 'organizationId', + hideInSearch: true, + }, + { + title: '所属组织', + dataIndex: 'organizationName', + hideInSearch: true, + }, + { + title: '创建时间', + dataIndex: 'createTime', + width: '150px', + sorter: true, + hideInSearch: true, + }, +]; + +export default () => { + return ( + + {...document} + rowKey="id" + title="文档表,用于演示数据权限,可切换不同用户并授予不同角色体验效果(需退出重新登录)" + columns={dataColumns} + toolBarActions={[{ type: 'create', permission: 'sample:document:add' }]} + operateBar={[{ type: 'del', permission: 'sample:document:del' }]} + > +