apiErrorLog.data.ts 1.5 KB

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