sms.log.data.ts 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. dictClass: 'number',
  26. isSearch: true
  27. },
  28. {
  29. title: '发送状态',
  30. field: 'sendStatus',
  31. dictType: DICT_TYPE.SYSTEM_SMS_SEND_STATUS,
  32. dictClass: 'number',
  33. isSearch: true
  34. },
  35. {
  36. title: '接收状态',
  37. field: 'receiveStatus',
  38. dictType: DICT_TYPE.SYSTEM_SMS_RECEIVE_STATUS,
  39. dictClass: 'number',
  40. isSearch: true
  41. },
  42. {
  43. title: '模板编号',
  44. field: 'templateId',
  45. isSearch: true
  46. },
  47. {
  48. title: '短信类型',
  49. field: 'templateType',
  50. dictType: DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE,
  51. dictClass: 'number',
  52. isSearch: true
  53. },
  54. {
  55. title: '接收时间',
  56. field: 'receiveTime'
  57. },
  58. {
  59. title: t('common.createTime'),
  60. field: 'createTime',
  61. formatter: 'formatDate',
  62. search: {
  63. show: true,
  64. itemRender: {
  65. name: 'XDataTimePicker'
  66. }
  67. }
  68. }
  69. ]
  70. })
  71. export const { allSchemas } = useVxeCrudSchemas(crudSchemas)