sms.log.data.ts 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. import type { VxeCrudSchema } from '@/hooks/web/useVxeCrudSchemas'
  2. import { DICT_TYPE, getStrDictOptions } from '@/utils/dict'
  3. const { t } = useI18n() // 国际化
  4. const authorizedGrantOptions = getStrDictOptions(DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE)
  5. // CrudSchema
  6. const crudSchemas = reactive<VxeCrudSchema>({
  7. primaryKey: 'id',
  8. primaryType: 'id',
  9. primaryTitle: '日志编号',
  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: 'templateId',
  24. isSearch: true
  25. },
  26. {
  27. title: '短信渠道',
  28. field: 'channelId',
  29. // dictType: DICT_TYPE.SYSTEM_SMS_CHANNEL_CODE,
  30. // dictClass: 'number',
  31. isSearch: true,
  32. // table: {
  33. // component: 'Select',
  34. componentProps: {
  35. options: authorizedGrantOptions
  36. // multiple: false,
  37. // filterable: true
  38. }
  39. // }
  40. },
  41. {
  42. title: '发送状态',
  43. field: 'sendStatus',
  44. dictType: DICT_TYPE.SYSTEM_SMS_SEND_STATUS,
  45. dictClass: 'number',
  46. isSearch: true
  47. },
  48. {
  49. title: '发送时间',
  50. field: 'sendTime',
  51. formatter: 'formatDate',
  52. search: {
  53. show: true,
  54. itemRender: {
  55. name: 'XDataTimePicker'
  56. }
  57. }
  58. },
  59. {
  60. title: '短信类型',
  61. field: 'templateType',
  62. dictType: DICT_TYPE.SYSTEM_SMS_TEMPLATE_TYPE,
  63. dictClass: 'number',
  64. isSearch: true
  65. },
  66. {
  67. title: '接收状态',
  68. field: 'receiveStatus',
  69. dictType: DICT_TYPE.SYSTEM_SMS_RECEIVE_STATUS,
  70. dictClass: 'number',
  71. isSearch: true
  72. },
  73. {
  74. title: '接收时间',
  75. field: 'receiveTime',
  76. formatter: 'formatDate',
  77. search: {
  78. show: true,
  79. itemRender: {
  80. name: 'XDataTimePicker'
  81. }
  82. }
  83. },
  84. {
  85. title: t('common.createTime'),
  86. field: 'createTime',
  87. formatter: 'formatDate'
  88. }
  89. ]
  90. })
  91. export const { allSchemas } = useVxeCrudSchemas(crudSchemas)