log.data.ts 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. import { BasicColumn, FormSchema } from '/@/components/Table';
  2. export const columns: BasicColumn[] = [
  3. {
  4. title: '日志内容',
  5. dataIndex: 'logContent',
  6. width: 100,
  7. align: 'left',
  8. },
  9. {
  10. title: '操作人ID',
  11. dataIndex: 'userid',
  12. width: 80,
  13. },
  14. {
  15. title: '操作人',
  16. dataIndex: 'username',
  17. width: 80,
  18. },
  19. {
  20. title: 'IP',
  21. dataIndex: 'ip',
  22. width: 80,
  23. },
  24. {
  25. title: '耗时(毫秒)',
  26. dataIndex: 'costTime',
  27. width: 80,
  28. },
  29. {
  30. title: '创建时间',
  31. dataIndex: 'createTime',
  32. sorter: true,
  33. width: 80,
  34. },
  35. {
  36. title: '日志类型',
  37. dataIndex: 'logType_dictText',
  38. width: 60,
  39. },
  40. ];
  41. /**
  42. * 操作日志需要操作类型
  43. */
  44. export const operationLogColumn: BasicColumn[] = [
  45. ...columns,
  46. {
  47. title: '操作类型',
  48. dataIndex: 'operateType_dictText',
  49. width: 40,
  50. },
  51. ];
  52. export const searchFormSchema: FormSchema[] = [
  53. {
  54. field: 'keyWord',
  55. label: '搜索日志',
  56. component: 'Input',
  57. colProps: { span: 4 },
  58. },
  59. {
  60. field: 'fieldTime',
  61. component: 'RangePicker',
  62. label: '创建时间',
  63. componentProps: {
  64. valueType: 'Date',
  65. },
  66. colProps: {
  67. span: 4,
  68. },
  69. },
  70. ];
  71. export const browserColumn: BasicColumn[] = [
  72. {
  73. title: '日志内容',
  74. dataIndex: 'logContent',
  75. width: 100,
  76. align: 'left',
  77. },
  78. {
  79. title: '操作人ID',
  80. dataIndex: 'userid',
  81. width: 80,
  82. },
  83. {
  84. title: '操作人',
  85. dataIndex: 'username',
  86. width: 80,
  87. },
  88. {
  89. title: 'IP',
  90. dataIndex: 'ip',
  91. width: 80,
  92. },
  93. {
  94. title: '耗时(秒)',
  95. dataIndex: 'costTime',
  96. width: 80,
  97. },
  98. {
  99. title: '创建时间',
  100. dataIndex: 'createTime',
  101. sorter: true,
  102. width: 80,
  103. },
  104. {
  105. title: '结束时间',
  106. dataIndex: 'endTime',
  107. sorter: true,
  108. width: 80,
  109. },
  110. ];