apiErrorLog.data.ts 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. import { DICT_TYPE } from '@/utils/dict'
  2. import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
  3. // CrudSchema
  4. const crudSchemas = reactive<VxeCrudSchema>({
  5. primaryKey: 'id',
  6. primaryType: 'seq',
  7. primaryTitle: '日志编号',
  8. action: true,
  9. actionWidth: '300',
  10. columns: [
  11. {
  12. title: '链路追踪',
  13. field: 'traceId',
  14. isTable: false
  15. },
  16. {
  17. title: '用户编号',
  18. field: 'userId',
  19. isSearch: true
  20. },
  21. {
  22. title: '用户类型',
  23. field: 'userType',
  24. dictType: DICT_TYPE.USER_TYPE,
  25. isSearch: true
  26. },
  27. {
  28. title: '应用名',
  29. field: 'applicationName',
  30. isSearch: true
  31. },
  32. {
  33. title: '请求方法名',
  34. field: 'requestMethod'
  35. },
  36. {
  37. title: '请求地址',
  38. field: 'requestUrl',
  39. isSearch: true
  40. },
  41. {
  42. title: '异常发生时间',
  43. field: 'exceptionTime',
  44. formatter: 'formatDate',
  45. search: {
  46. show: true,
  47. itemRender: {
  48. name: 'XDataTimePicker'
  49. }
  50. }
  51. },
  52. {
  53. title: '异常名',
  54. field: 'exceptionName'
  55. },
  56. {
  57. title: '处理状态',
  58. field: 'processStatus',
  59. dictType: DICT_TYPE.INFRA_API_ERROR_LOG_PROCESS_STATUS,
  60. dictClass: 'number',
  61. isSearch: true
  62. },
  63. {
  64. title: '处理人',
  65. field: 'processUserId',
  66. isTable: false
  67. },
  68. {
  69. title: '处理时间',
  70. field: 'processTime',
  71. formatter: 'formatDate',
  72. isTable: false
  73. }
  74. ]
  75. })
  76. export const { allSchemas } = useVxeCrudSchemas(crudSchemas)