process.data.ts 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
  2. const { t } = useI18n() // 国际化
  3. // CrudSchema
  4. const crudSchemas = reactive<VxeCrudSchema>({
  5. primaryKey: 'id',
  6. primaryType: null,
  7. primaryTitle: '编号',
  8. action: true,
  9. actionWidth: '200px',
  10. columns: [
  11. {
  12. title: '编号',
  13. field: 'id',
  14. table: {
  15. width: 320
  16. }
  17. },
  18. {
  19. title: '流程名',
  20. field: 'name',
  21. isSearch: true
  22. },
  23. {
  24. title: '所属流程',
  25. field: 'processDefinitionId',
  26. isSearch: true,
  27. isTable: false
  28. },
  29. {
  30. title: '流程分类',
  31. field: 'category',
  32. dictType: DICT_TYPE.BPM_MODEL_CATEGORY,
  33. dictClass: 'number',
  34. isSearch: true
  35. },
  36. {
  37. title: '当前审批任务',
  38. field: 'tasks',
  39. table: {
  40. width: 140,
  41. slots: {
  42. default: 'tasks_default'
  43. }
  44. }
  45. },
  46. {
  47. title: t('common.status'),
  48. field: 'status',
  49. dictType: DICT_TYPE.BPM_PROCESS_INSTANCE_STATUS,
  50. dictClass: 'number',
  51. isSearch: true
  52. },
  53. {
  54. title: '结果',
  55. field: 'result',
  56. dictType: DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT,
  57. dictClass: 'number',
  58. isSearch: true
  59. },
  60. {
  61. title: '提交时间',
  62. field: 'createTime',
  63. formatter: 'formatDate',
  64. table: {
  65. width: 180
  66. },
  67. isForm: false,
  68. isSearch: true,
  69. search: {
  70. show: true,
  71. itemRender: {
  72. name: 'XDataTimePicker'
  73. }
  74. }
  75. },
  76. {
  77. title: '结束时间',
  78. field: 'endTime',
  79. formatter: 'formatDate',
  80. table: {
  81. width: 180
  82. },
  83. isForm: false
  84. }
  85. ]
  86. })
  87. export const { allSchemas } = useVxeCrudSchemas(crudSchemas)