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' }]} + > +