diff --git a/src/pages/log/index.tsx b/src/pages/log/index.tsx index 6ff1559..8796b27 100644 --- a/src/pages/log/index.tsx +++ b/src/pages/log/index.tsx @@ -1,9 +1,52 @@ -import React from 'react' +import React from 'react'; +import { Form, Table, Input, Button, Space } from 'antd'; +import ProTable, { ProColumns } from '@ant-design/pro-table'; +import styles from './log.less'; + +enum LogActionType { + Download, + Delete, + Upload, +} + +const tableColumns: Array> = [ + { dataIndex: 'archName', title: '名称' }, + { dataIndex: 'folderName', title: '所属文件夹', search: false }, + { dataIndex: 'size', title: '大小', search: false }, + { + dataIndex: 'actionType', + title: '操作类型', + search: false, + valueEnum: { + [LogActionType.Download]: '下载', + [LogActionType.Delete]: '删除', + [LogActionType.Upload]: '上传', + }, + }, + { dataIndex: 'operator', title: '操作人' }, + { dataIndex: 'operateTime', title: '操作时间', search: false }, + // { + // search: false, + // render() { + // return ( + //
+ // 查看 + //
+ // ) + // } + // }, +]; export default function LogView() { return ( -
- 操作日志界面 +
+
- ) -} \ No newline at end of file + ); +} diff --git a/src/pages/log/log.less b/src/pages/log/log.less new file mode 100644 index 0000000..145cb82 --- /dev/null +++ b/src/pages/log/log.less @@ -0,0 +1,42 @@ +.logView { + display: flex; + flex-direction: column; + height: 100%; + padding: 12px; +} + +.controller { + flex-direction: row; + justify-content: flex-end; + margin-bottom: 12px; + :global(.ant-form-item) { + margin-bottom: 0; + } +} + +.tableWrapper { + flex: 1; + display: flex; + flex-direction: column; + :global { + .ant-pro-table-search { + flex: none; + background-color: transparent; + padding: 0; + margin-bottom: 12px; + .ant-form-item { + margin-bottom: 0; + } + } + .ant-card { + flex: 1; + } + th.ant-table-cell { + background: rgba(235, 235, 242, 0.8); + box-shadow: 0px 0px 0px 0px #f1f4f6; + &:before { + content: none !important; + } + } + } +}