sms.log.data.ts 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import { reactive } from 'vue'
  2. import { useI18n } from '@/hooks/web/useI18n'
  3. import { DICT_TYPE } from '@/utils/dict'
  4. import { VxeCrudSchema, useVxeCrudSchemas } from '@/hooks/web/useVxeCrudSchemas'
  5. const { t } = useI18n() // 国际化
  6. // CrudSchema
  7. const crudSchemas = reactive<VxeCrudSchema>({
  8. primaryKey: 'id',
  9. primaryType: 'seq',
  10. action: true,
  11. columns: [
  12. {
  13. title: '手机号',
  14. field: 'mobile',
  15. isSearch: true
  16. },
  17. {
  18. title: '短信内容',
  19. field: 'templateContent'
  20. },
  21. {
  22. title: '短信渠道',
  23. field: 'channelId',
  24. dictType: DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE,
  25. isSearch: true
  26. },
  27. {
  28. title: '发送状态',
  29. field: 'sendStatus',
  30. dictType: DICT_TYPE.SYSTEM_SMS_SEND_STATUS,
  31. isSearch: true
  32. },
  33. {
  34. title: '接收状态',
  35. field: 'receiveStatus',
  36. dictType: DICT_TYPE.SYSTEM_SMS_RECEIVE_STATUS,
  37. isSearch: true
  38. },
  39. {
  40. title: '模板编号',
  41. field: 'templateId',
  42. isSearch: true
  43. },
  44. {
  45. title: '短信类型',
  46. field: 'templateType',
  47. dictType: DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE,
  48. isSearch: true
  49. },
  50. {
  51. title: '接收时间',
  52. field: 'receiveTime'
  53. },
  54. {
  55. title: t('common.createTime'),
  56. field: 'createTime',
  57. formatter: 'formatDate',
  58. search: {
  59. show: true,
  60. itemRender: {
  61. name: 'XDataTimePicker'
  62. }
  63. }
  64. }
  65. ]
  66. })
  67. export const { allSchemas } = useVxeCrudSchemas(crudSchemas)