jobLog.data.ts 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
  2. // 国际化
  3. const { t } = useI18n()
  4. // CrudSchema
  5. const crudSchemas = reactive<VxeCrudSchema>({
  6. primaryKey: 'id',
  7. primaryType: 'id',
  8. primaryTitle: '日志编号',
  9. action: true,
  10. columns: [
  11. {
  12. title: '任务编号',
  13. field: 'jobId',
  14. isSearch: true
  15. },
  16. {
  17. title: '处理器的名字',
  18. field: 'handlerName',
  19. isSearch: true
  20. },
  21. {
  22. title: '处理器的参数',
  23. field: 'handlerParam'
  24. },
  25. {
  26. title: '第几次执行',
  27. field: 'executeIndex'
  28. },
  29. {
  30. title: '开始执行时间',
  31. field: 'beginTime',
  32. formatter: 'formatDate',
  33. table: {
  34. slots: {
  35. default: 'beginTime_default'
  36. }
  37. },
  38. search: {
  39. show: true,
  40. itemRender: {
  41. name: 'XDataPicker'
  42. }
  43. }
  44. },
  45. {
  46. title: '结束执行时间',
  47. field: 'endTime',
  48. formatter: 'formatDate',
  49. isTable: false,
  50. search: {
  51. show: true,
  52. itemRender: {
  53. name: 'XDataPicker'
  54. }
  55. }
  56. },
  57. {
  58. title: '执行时长',
  59. field: 'duration',
  60. table: {
  61. slots: {
  62. default: 'duration_default'
  63. }
  64. }
  65. },
  66. {
  67. title: t('common.status'),
  68. field: 'status',
  69. dictType: DICT_TYPE.INFRA_JOB_LOG_STATUS,
  70. dictClass: 'number',
  71. isSearch: true
  72. }
  73. ]
  74. })
  75. export const { allSchemas } = useVxeCrudSchemas(crudSchemas)