my.data.ts 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
  2. // CrudSchema
  3. const crudSchemas = reactive<VxeCrudSchema>({
  4. primaryKey: 'id',
  5. primaryTitle: ' ',
  6. primaryType: 'checkbox',
  7. action: true,
  8. actionWidth: '200', // 3个按钮默认200,如有删减对应增减即可
  9. columns: [
  10. {
  11. title: '发送人名称',
  12. field: 'templateNickname',
  13. table: {
  14. width: 120
  15. }
  16. },
  17. {
  18. title: '发送时间',
  19. field: 'createTime',
  20. isForm: false,
  21. formatter: 'formatDate',
  22. search: {
  23. show: true,
  24. itemRender: {
  25. name: 'XDataTimePicker'
  26. }
  27. },
  28. table: {
  29. width: 180
  30. }
  31. },
  32. {
  33. title: '类型',
  34. field: 'templateType',
  35. dictType: DICT_TYPE.SYSTEM_NOTIFY_TEMPLATE_TYPE,
  36. dictClass: 'number',
  37. table: {
  38. width: 80
  39. }
  40. },
  41. {
  42. title: '内容',
  43. field: 'templateContent'
  44. },
  45. {
  46. title: '是否已读',
  47. field: 'readStatus',
  48. dictType: DICT_TYPE.INFRA_BOOLEAN_STRING,
  49. dictClass: 'boolean',
  50. table: {
  51. width: 80
  52. },
  53. isSearch: true
  54. }
  55. ]
  56. })
  57. export const { allSchemas } = useVxeCrudSchemas(crudSchemas)