sms.log.data.ts 1.7 KB

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