configuration.data.ts 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. // import { ModuleVersionOptions, ModuleChartTypeOptions, ModulePositionOptions, ModuleSizeOptions } from './options';
  2. import { ModulePositionOptions, ModuleSizeOptions, ModuleVersionOptions } from './options';
  3. import { BasicColumn } from '/@/components/Table';
  4. import { FormSchema } from '/@/components/Table';
  5. import _ from 'lodash-es';
  6. export const columns: BasicColumn[] = [
  7. {
  8. title: '所属页面',
  9. dataIndex: 'pageType',
  10. },
  11. {
  12. title: '设备类型',
  13. dataIndex: 'deviceType',
  14. },
  15. {
  16. title: '模块标题',
  17. dataIndex: 'moduleName',
  18. },
  19. {
  20. title: '预设类型',
  21. dataIndex: 'moduleData.main',
  22. },
  23. {
  24. title: '模块尺寸',
  25. dataIndex: 'showStyle.size',
  26. },
  27. {
  28. title: '模块版本',
  29. dataIndex: 'showStyle.version',
  30. },
  31. {
  32. title: '模块定位',
  33. dataIndex: 'showStyle.position',
  34. },
  35. ];
  36. export const searchFormSchema: FormSchema[] = [
  37. {
  38. label: '设备类型',
  39. field: 'deviceType',
  40. component: 'JDictSelectTag',
  41. componentProps: {
  42. dictCode: 'devicekind',
  43. placeholder: '请选择设备类型',
  44. },
  45. colProps: { span: 6 },
  46. },
  47. {
  48. label: '所属页面',
  49. field: 'pageType',
  50. component: 'JDictSelectTag',
  51. componentProps: {
  52. dictCode: 'configurable_homepage',
  53. placeholder: '请选择所属页面',
  54. },
  55. colProps: { span: 6 },
  56. },
  57. ];
  58. export const formSchema: FormSchema[] = [
  59. {
  60. label: '',
  61. field: 'id',
  62. component: 'InputNumber',
  63. show: false,
  64. },
  65. {
  66. label: '模块标题',
  67. field: 'moduleName',
  68. component: 'Input',
  69. },
  70. {
  71. label: '设备类型',
  72. field: 'deviceType',
  73. component: 'JDictSelectTag',
  74. required: true,
  75. componentProps: {
  76. dictCode: 'devicekind',
  77. placeholder: '请选择设备类型',
  78. },
  79. },
  80. {
  81. label: '所属页面',
  82. field: 'pageType',
  83. component: 'JDictSelectTag',
  84. required: true,
  85. componentProps: {
  86. dictCode: 'configurable_homepage',
  87. placeholder: '请选择所属页面',
  88. },
  89. },
  90. {
  91. label: '模块尺寸',
  92. field: 'showStyle.size',
  93. component: 'Select',
  94. componentProps: {
  95. options: ModuleSizeOptions,
  96. },
  97. },
  98. {
  99. label: '模块版本',
  100. field: 'showStyle.version',
  101. component: 'Select',
  102. componentProps: {
  103. options: ModuleVersionOptions,
  104. },
  105. },
  106. {
  107. label: '模块定位',
  108. field: 'showStyle.position',
  109. component: 'Select',
  110. componentProps: {
  111. options: ModulePositionOptions,
  112. },
  113. },
  114. ];