sms.log.data.ts 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. primaryTitle: '日志编号',
  11. action: true,
  12. columns: [
  13. {
  14. title: '手机号',
  15. field: 'mobile',
  16. isSearch: true
  17. },
  18. {
  19. title: '短信内容',
  20. field: 'templateContent'
  21. },
  22. {
  23. title: '模板编号',
  24. field: 'templateId',
  25. isSearch: true
  26. },
  27. {
  28. title: '短信渠道',
  29. field: 'channelId',
  30. dictType: DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE,
  31. dictClass: 'number',
  32. isSearch: true
  33. },
  34. {
  35. title: '发送状态',
  36. field: 'sendStatus',
  37. dictType: DICT_TYPE.SYSTEM_SMS_SEND_STATUS,
  38. dictClass: 'number',
  39. isSearch: true
  40. },
  41. {
  42. title: '发送时间',
  43. field: 'sendTime',
  44. formatter: 'formatDate',
  45. search: {
  46. show: true,
  47. itemRender: {
  48. name: 'XDataTimePicker'
  49. }
  50. }
  51. },
  52. {
  53. title: '短信类型',
  54. field: 'templateType',
  55. dictType: DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE,
  56. dictClass: 'number',
  57. isSearch: true
  58. },
  59. {
  60. title: '接收状态',
  61. field: 'receiveStatus',
  62. dictType: DICT_TYPE.SYSTEM_SMS_RECEIVE_STATUS,
  63. dictClass: 'number',
  64. isSearch: true
  65. },
  66. {
  67. title: '接收时间',
  68. field: 'receiveTime',
  69. formatter: 'formatDate',
  70. search: {
  71. show: true,
  72. itemRender: {
  73. name: 'XDataTimePicker'
  74. }
  75. }
  76. },
  77. {
  78. title: t('common.createTime'),
  79. field: 'createTime',
  80. formatter: 'formatDate'
  81. }
  82. ]
  83. })
  84. export const { allSchemas } = useVxeCrudSchemas(crudSchemas)