Blame view

Yi.Vben5.Vue3/apps/web-antd/src/views/monitor/operlog/data.tsx 1.53 KB
515fceeb   “wangming”   框架初始化
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
  import type { FormSchemaGetter } from '#/adapter/form';
  import type { VxeGridProps } from '#/adapter/vxe-table';
  
  import { DictEnum } from '@vben/constants';
  
  import { getDictOptions } from '#/utils/dict';
  import { renderDict } from '#/utils/render';
  
  export const querySchema: FormSchemaGetter = () => [
    {
      component: 'Input',
      fieldName: 'title',
      label: '系统模块',
    },
    {
      component: 'Input',
      fieldName: 'operUser',
      label: '操作人员',
    },
    {
      component: 'Select',
      componentProps: {
        options: getDictOptions(DictEnum.SYS_OPER_TYPE),
      },
      fieldName: 'operType',
      label: '操作类型',
    },
    {
      component: 'Input',
      fieldName: 'operIp',
      label: '操作IP',
    },
    {
      component: 'RangePicker',
      fieldName: 'creationTime',
      label: '操作时间',
      componentProps: {
        valueFormat: 'YYYY-MM-DD HH:mm:ss',
      },
    },
  ];
  
  export const columns: VxeGridProps['columns'] = [
    { type: 'checkbox', width: 60 },
    { field: 'title', title: '系统模块' },
    {
      title: '操作类型',
      field: 'operType',
      slots: {
        default: ({ row }) => {
          return renderDict(row.operType, DictEnum.SYS_OPER_TYPE);
        },
      },
    },
    { field: 'operUser', title: '操作人员' },
    { field: 'operIp', title: 'IP地址' },
    { field: 'operLocation', title: 'IP信息' },
    { field: 'creationTime', title: '操作日期', sortable: true },
    {
      field: 'action',
      fixed: 'right',
      slots: { default: 'action' },
      title: '操作',
      resizable: false,
      width: 'auto',
    },
  ];