1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
| import { buildProTableDataSource } from '@/utils/antdUtils';
| import { PageContainer, ProTable } from '@ant-design/pro-components';
| import { Button, Space } from 'antd';
| import { useRef } from 'react';
| import { Access, useAccess, history } from 'umi';
| import moment from 'moment';
| import { getList } from './service';
|
| const Account = () => {
| const actionRef = useRef();
| const access = useAccess();
| const formRef = useRef();
|
| const columns = [
| {
| title: '操作时间',
| dataIndex: 'name',
| hideInTable: true,
| valueType: 'dateRange',
| order: 1,
| },
| {
| title: '操作用户',
| dataIndex: 'reportUserName',
| order: 5,
| },
| {
| title: '联系电话',
| dataIndex: 'reportUserName',
| order: 4,
| },
| {
| title: '操作类型',
| dataIndex: 'reportUserPhone',
| order: 3,
| valueEnum: {
| 1: '登录',
| 2: '添加职位',
| 3: '添加角色',
| 4: '添加账号',
| 5: '工单事项配置',
| 6: '添加问题类型',
| 7: '添加banner',
| 8: '添加党员',
| 9: '党员资料审核',
| 10: '导出社区问题单',
| }
| },
| {
| title: '对象名称',
| dataIndex: 'name',
| hideInSearch: true,
| },
| {
| title: '所在IP',
| dataIndex: 'name',
| order: 2,
| },
| ];
| return (
| <div>
| <PageContainer header={{
| breadcrumb: {},
| }}
| title={'日志记录'}
| >
| <ProTable
| rowKey="id"
| actionRef={actionRef}
| columns={columns}
| formRef={formRef}
| request={async (params) => {
| if (params.time && params.time.length > 0) {
| params.startTime = moment(params.time[0]).format('YYYY-MM-DD HH:mm:ss');
| params.endTime = moment(params.time[1]).format('YYYY-MM-DD 23:59:59');
| delete params.time
| } else {
| delete params.startTime
| delete params.endTime
| }
|
|
| return buildProTableDataSource(getList, params);
| }}
| search={{ labelWidth: 'auto', defaultCollapsed: false }}
| />
| </PageContainer>
| </div>
| );
| };
|
| export default Account;
|
|