todo.data.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. searchSpan: 8,
  9. columns: [
  10. {
  11. title: '任务编号',
  12. field: 'id',
  13. table: {
  14. width: 320
  15. }
  16. },
  17. {
  18. title: '任务名称',
  19. field: 'name',
  20. isSearch: true
  21. },
  22. {
  23. title: '所属流程',
  24. field: 'processInstance.name'
  25. },
  26. {
  27. title: '流程发起人',
  28. field: 'processInstance.startUserNickname'
  29. },
  30. {
  31. title: t('common.createTime'),
  32. field: 'createTime',
  33. formatter: 'formatDate',
  34. table: {
  35. width: 180
  36. },
  37. isSearch: true,
  38. search: {
  39. show: true,
  40. itemRender: {
  41. name: 'XDataTimePicker'
  42. }
  43. }
  44. },
  45. {
  46. title: '任务状态',
  47. field: 'suspensionState',
  48. table: {
  49. slots: {
  50. default: 'suspensionState_default'
  51. }
  52. }
  53. }
  54. ]
  55. })
  56. export const { allSchemas } = useVxeCrudSchemas(crudSchemas)