todo.data.ts 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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.createTime'),
  31. field: 'createTime',
  32. formatter: 'formatDate',
  33. table: {
  34. width: 180
  35. },
  36. isSearch: true,
  37. search: {
  38. show: true,
  39. itemRender: {
  40. name: 'XDataTimePicker'
  41. }
  42. }
  43. },
  44. {
  45. title: '任务状态',
  46. field: 'suspensionState',
  47. table: {
  48. slots: {
  49. default: 'suspensionState_default'
  50. }
  51. }
  52. }
  53. ]
  54. })
  55. export const { allSchemas } = useVxeCrudSchemas(crudSchemas)