process.data.ts 1.5 KB

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