SmartSmsLogListView.config.ts 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. import type { SmartColumn, SmartSearchFormSchema } from '@/components/SmartTable';
  2. /**
  3. * 表格列表
  4. */
  5. export const getTableColumns = (): SmartColumn[] => {
  6. return [
  7. {
  8. type: 'checkbox',
  9. width: 60,
  10. align: 'center',
  11. fixed: 'left',
  12. },
  13. {
  14. field: 'id',
  15. visible: false,
  16. title: '',
  17. width: 120,
  18. },
  19. {
  20. field: 'channelId',
  21. title: '{smart.sms.log.title.channelId}',
  22. width: 120,
  23. },
  24. {
  25. field: 'isSuccess',
  26. title: '{smart.sms.log.title.isSuccess}',
  27. width: 120,
  28. },
  29. {
  30. field: 'sendParameter',
  31. visible: false,
  32. title: '{smart.sms.log.title.sendParameter}',
  33. width: 120,
  34. },
  35. {
  36. field: 'sendResult',
  37. visible: false,
  38. title: '{smart.sms.log.title.sendResult}',
  39. width: 120,
  40. },
  41. {
  42. field: 'errorMessage',
  43. visible: false,
  44. title: '{smart.sms.log.title.errorMessage}',
  45. width: 120,
  46. },
  47. {
  48. field: 'createTime',
  49. title: '{common.table.createTime}',
  50. width: 120,
  51. },
  52. {
  53. field: 'createBy',
  54. title: '{common.table.createUser}',
  55. width: 120,
  56. },
  57. {
  58. title: '{common.table.operation}',
  59. field: 'operation',
  60. width: 120,
  61. fixed: 'right',
  62. slots: {
  63. default: 'table-operation',
  64. },
  65. },
  66. ];
  67. };
  68. export const getSearchFormSchemas = (t: Function): SmartSearchFormSchema[] => {
  69. return [
  70. {
  71. field: 'channelId',
  72. label: t('smart.sms.log.title.channelId'),
  73. component: 'Select',
  74. searchSymbol: '=',
  75. },
  76. {
  77. field: 'isSuccess',
  78. label: t('smart.sms.log.title.isSuccess'),
  79. component: 'Select',
  80. searchSymbol: '=',
  81. },
  82. {
  83. field: 'createTime',
  84. label: t('common.table.createTime'),
  85. component: 'DatePicker',
  86. searchSymbol: '=',
  87. },
  88. ];
  89. };