process.data.ts 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. table: {
  36. slots: {
  37. default: 'category_default'
  38. }
  39. }
  40. },
  41. {
  42. title: '当前审批任务',
  43. field: 'tasks',
  44. table: {
  45. width: 140,
  46. slots: {
  47. default: 'tasks_default'
  48. }
  49. }
  50. },
  51. {
  52. title: t('common.status'),
  53. field: 'status',
  54. dictType: DICT_TYPE.BPM_PROCESS_INSTANCE_STATUS,
  55. dictClass: 'number',
  56. isSearch: true
  57. },
  58. {
  59. title: '结果',
  60. field: 'result',
  61. dictType: DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT,
  62. dictClass: 'number',
  63. isSearch: true
  64. },
  65. {
  66. title: '提交时间',
  67. field: 'createTime',
  68. formatter: 'formatDate',
  69. table: {
  70. width: 180
  71. },
  72. isForm: false,
  73. isSearch: true,
  74. search: {
  75. show: true,
  76. itemRender: {
  77. name: 'XDataTimePicker'
  78. }
  79. }
  80. },
  81. {
  82. title: '结束时间',
  83. field: 'endTime',
  84. formatter: 'formatDate',
  85. table: {
  86. width: 180
  87. },
  88. isForm: false
  89. }
  90. ]
  91. })
  92. export const { allSchemas } = useVxeCrudSchemas(crudSchemas)