logs-constants.js 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. // 表格列信息
  2. const table = {
  3. columns: [
  4. {
  5. title: 'ID',
  6. align: 'center',
  7. dataIndex: 'id'
  8. },
  9. {
  10. title: '用户ID',
  11. align: 'center',
  12. dataIndex: 'userId'
  13. },
  14. {
  15. title: '日志类型',
  16. align: 'center',
  17. dataIndex: 'codeName'
  18. },
  19. {
  20. title: 'ip地址',
  21. align: 'center',
  22. dataIndex: 'ip'
  23. },
  24. {
  25. title: '请求URL',
  26. align: 'center',
  27. dataIndex: 'url',
  28. scopedSlots: { customRender: 'url' }
  29. },
  30. {
  31. title: '请求参数',
  32. align: 'center',
  33. dataIndex: 'parameter',
  34. scopedSlots: { customRender: 'parameter' }
  35. },
  36. {
  37. title: '设备',
  38. align: 'center',
  39. dataIndex: 'device'
  40. },
  41. {
  42. title: '执行时间',
  43. align: 'center',
  44. dataIndex: 'runTime'
  45. },
  46. {
  47. title: '创建时间',
  48. align: 'center',
  49. dataIndex: 'createTime',
  50. scopedSlots: { customRender: 'createTime' }
  51. },
  52. {
  53. title: '浏览器名称',
  54. align: 'center',
  55. dataIndex: 'browserName'
  56. },
  57. {
  58. title: '浏览器版本号',
  59. align: 'center',
  60. dataIndex: 'browserVersion'
  61. },
  62. {
  63. title: '操作',
  64. dataIndex: 'action',
  65. align: 'center',
  66. fixed: 'right',
  67. width: '250px',
  68. scopedSlots: { customRender: 'action' }
  69. }
  70. ]
  71. }
  72. // 表格里面的列key value
  73. const filters = {
  74. syncStatusFilter (status) {
  75. const statusMap = {
  76. 0: '未同步',
  77. 1: '已同步'
  78. }
  79. return statusMap[status]
  80. },
  81. syncStatusTypeFilter (status) {
  82. const statusMap = {
  83. 0: 'error',
  84. 1: 'success'
  85. }
  86. return statusMap[status]
  87. },
  88. statusFilter (status) {
  89. const statusMap = {
  90. 1: '草稿箱',
  91. 2: '已发布'
  92. }
  93. return statusMap[status]
  94. },
  95. statusTypeFilter (status) {
  96. const statusMap = {
  97. 1: 'error',
  98. 2: 'success'
  99. }
  100. return statusMap[status]
  101. }
  102. }
  103. // md配置
  104. const markdownOption = {
  105. bold: true, // 粗体
  106. italic: true, // 斜体
  107. header: true, // 标题
  108. underline: true, // 下划线
  109. strikethrough: false, // 中划线
  110. mark: true, // 标记
  111. superscript: false, // 上角标
  112. subscript: false, // 下角标
  113. quote: true, // 引用
  114. ol: true, // 有序列表
  115. ul: true, // 无序列表
  116. link: true, // 链接
  117. imagelink: true, // 图片链接
  118. code: true, // code
  119. table: true, // 表格
  120. fullscreen: false, // 全屏编辑
  121. readmodel: false, // 沉浸式阅读
  122. help: true, // 帮助
  123. undo: true, // 上一步
  124. redo: true, // 下一步
  125. trash: true, // 清空
  126. save: true, // 保存(触发events中的save事件)
  127. navigation: true, // 导航目录
  128. subfield: true, // 单双栏模式
  129. preview: true, // 预览
  130. htmlcode: true// 展示html源码
  131. }
  132. export { table, filters, markdownOption }