process.data.ts 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. import { useI18n } from '@/hooks/web/useI18n'
  2. import { CrudSchema, useCrudSchemas } from '@/hooks/web/useCrudSchemas'
  3. import { DICT_TYPE } from '@/utils/dict'
  4. const { t } = useI18n() // 国际化
  5. // CrudSchema
  6. const crudSchemas = reactive<CrudSchema[]>([
  7. {
  8. label: t('common.index'),
  9. field: 'id',
  10. type: 'index',
  11. form: {
  12. show: false
  13. },
  14. detail: {
  15. show: false
  16. }
  17. },
  18. {
  19. label: '流程名',
  20. field: 'name',
  21. search: {
  22. show: true
  23. }
  24. },
  25. {
  26. label: '流程分类',
  27. field: 'category',
  28. dictType: DICT_TYPE.BPM_MODEL_CATEGORY,
  29. dictClass: 'number',
  30. search: {
  31. show: true
  32. }
  33. },
  34. {
  35. label: '当前审批任务',
  36. field: 'tasks'
  37. },
  38. {
  39. label: t('common.status'),
  40. field: 'status',
  41. dictType: DICT_TYPE.BPM_PROCESS_INSTANCE_STATUS,
  42. dictClass: 'number',
  43. search: {
  44. show: true
  45. }
  46. },
  47. {
  48. label: '结果',
  49. field: 'result',
  50. dictType: DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT,
  51. dictClass: 'number',
  52. search: {
  53. show: true
  54. }
  55. },
  56. {
  57. label: '提交时间',
  58. field: 'createTime',
  59. form: {
  60. show: false
  61. },
  62. search: {
  63. show: true
  64. }
  65. },
  66. {
  67. label: '结束时间',
  68. field: 'endTime',
  69. form: {
  70. show: false
  71. }
  72. },
  73. {
  74. label: t('table.action'),
  75. field: 'action',
  76. width: '240px',
  77. form: {
  78. show: false
  79. },
  80. detail: {
  81. show: false
  82. }
  83. }
  84. ])
  85. export const { allSchemas } = useCrudSchemas(crudSchemas)