done.data.ts 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
  2. const { t } = useI18n() // 国际化
  3. // crudSchemas
  4. const crudSchemas = reactive<VxeCrudSchema>({
  5. primaryKey: 'id',
  6. primaryType: null,
  7. action: true,
  8. columns: [
  9. {
  10. title: '任务编号',
  11. field: 'id',
  12. table: {
  13. width: 320
  14. }
  15. },
  16. {
  17. title: '任务名称',
  18. field: 'name',
  19. isSearch: true
  20. },
  21. {
  22. title: '所属流程',
  23. field: 'processInstance.name'
  24. },
  25. {
  26. title: '流程发起人',
  27. field: 'processInstance.startUserNickname'
  28. },
  29. {
  30. title: t('common.status'),
  31. field: 'result',
  32. dictType: DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT,
  33. dictClass: 'number',
  34. isSearch: true
  35. },
  36. {
  37. title: '原因',
  38. field: 'reason'
  39. },
  40. {
  41. title: t('common.createTime'),
  42. field: 'createTime',
  43. formatter: 'formatDate',
  44. table: {
  45. width: 180
  46. }
  47. }
  48. ]
  49. })
  50. export const { allSchemas } = useVxeCrudSchemas(crudSchemas)