Blame view

yudao-ui-admin-vue3/src/views/infra/apiAccessLog/apiAccessLog.data.ts 1.44 KB
80a3ae8d   xingyu   feat: add vue3(el...
1
  import { reactive } from 'vue'
80a3ae8d   xingyu   feat: add vue3(el...
2
  import { DICT_TYPE } from '@/utils/dict'
fd4bc8cc   xingyu4j   refactor: vxe
3
  import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
80a3ae8d   xingyu   feat: add vue3(el...
4
5
  
  // CrudSchema
fd4bc8cc   xingyu4j   refactor: vxe
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
  const crudSchemas = reactive<VxeCrudSchema>({
    primaryKey: 'id',
    primaryType: 'seq',
    action: true,
    actionWidth: '80px',
    columns: [
      {
        title: '链路追踪',
        field: 'traceId'
      },
      {
        title: '用户编号',
        field: 'userId',
        isSearch: true
      },
      {
        title: '用户类型',
        field: 'userType',
        dictType: DICT_TYPE.USER_TYPE,
        dictClass: 'number',
        isSearch: true
      },
      {
        title: '应用名',
        field: 'applicationName',
        isSearch: true
      },
      {
        title: '请求方法名',
        field: 'requestMethod'
      },
      {
        title: '请求地址',
        field: 'requestUrl',
        isSearch: true
      },
      {
        title: '请求时间',
        field: 'beginTime',
        formatter: 'formatDate',
        search: {
          show: true,
          itemRender: {
            name: 'XDataTimePicker'
          }
93a97cd5   xingyu   perf: 优化表单校验和查询参数
51
        }
80a3ae8d   xingyu   feat: add vue3(el...
52
      },
fd4bc8cc   xingyu4j   refactor: vxe
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
      {
        title: '执行时长',
        field: 'duration',
        table: {
          slots: {
            default: 'duration_default'
          }
        }
      },
      {
        title: '操作结果',
        field: 'resultCode',
        isSearch: true,
        table: {
          slots: {
            default: 'resultCode_default'
          }
        }
80a3ae8d   xingyu   feat: add vue3(el...
71
      }
fd4bc8cc   xingyu4j   refactor: vxe
72
73
74
    ]
  })
  export const { allSchemas } = useVxeCrudSchemas(crudSchemas)