configuration.data.ts 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. import { ModuleVersionOptions, ModuleChartTypeOptions, ModulePositionOptions, ModuleSizeOptions } from './options';
  2. import { BasicColumn } from '/@/components/Table';
  3. import { FormSchema } from '/@/components/Table';
  4. import _ from 'lodash-es';
  5. export const columns: BasicColumn[] = [
  6. {
  7. title: '所属页面',
  8. dataIndex: 'pageType',
  9. },
  10. {
  11. title: '设备类型',
  12. dataIndex: 'deviceType',
  13. },
  14. {
  15. title: '模块标题',
  16. dataIndex: 'moduleName',
  17. },
  18. {
  19. title: '模块主体配置',
  20. dataIndex: 'moduleData.main',
  21. },
  22. {
  23. title: '模块页头配置',
  24. dataIndex: 'moduleData.header',
  25. },
  26. {
  27. title: '模块图表配置',
  28. dataIndex: 'moduleData.chart',
  29. },
  30. {
  31. title: '模块尺寸',
  32. dataIndex: 'showStyle.size',
  33. },
  34. {
  35. title: '模块版本',
  36. dataIndex: 'showStyle.version',
  37. },
  38. {
  39. title: '模块定位',
  40. dataIndex: 'showStyle.position',
  41. },
  42. {
  43. title: '模块图表类型',
  44. dataIndex: 'showStyle.charttype',
  45. },
  46. ];
  47. export const searchFormSchema: FormSchema[] = [
  48. {
  49. label: '设备类型',
  50. field: 'deviceType',
  51. component: 'JDictSelectTag',
  52. componentProps: {
  53. dictCode: 'devicekind',
  54. placeholder: '请选择设备类型',
  55. },
  56. colProps: { span: 6 },
  57. },
  58. {
  59. label: '所属页面',
  60. field: 'pageType',
  61. component: 'JDictSelectTag',
  62. componentProps: {
  63. dictCode: 'configurable_homepage',
  64. placeholder: '请选择所属页面',
  65. },
  66. colProps: { span: 6 },
  67. },
  68. ];
  69. export const formSchema: FormSchema[] = [
  70. {
  71. label: '',
  72. field: 'id',
  73. component: 'InputNumber',
  74. show: false,
  75. },
  76. {
  77. label: '模块标题',
  78. field: 'moduleName',
  79. component: 'Input',
  80. },
  81. {
  82. label: '设备类型',
  83. field: 'deviceType',
  84. component: 'JDictSelectTag',
  85. required: true,
  86. componentProps: {
  87. dictCode: 'devicekind',
  88. placeholder: '请选择设备类型',
  89. },
  90. },
  91. {
  92. label: '所属页面',
  93. field: 'pageType',
  94. component: 'JDictSelectTag',
  95. required: true,
  96. componentProps: {
  97. dictCode: 'configurable_homepage',
  98. placeholder: '请选择所属页面',
  99. },
  100. },
  101. {
  102. label: '模块主体配置',
  103. field: 'moduleData.main',
  104. component: 'JAddInput',
  105. componentProps: {
  106. min: 0,
  107. placeholders: ['请输入点位', '请输入名称'],
  108. },
  109. },
  110. {
  111. label: '模块页头配置',
  112. field: 'moduleData.header',
  113. component: 'JAddInput',
  114. componentProps: {
  115. min: 0,
  116. placeholders: ['请输入点位', '请输入名称'],
  117. },
  118. },
  119. {
  120. label: '模块图表配置',
  121. field: 'moduleData.chart',
  122. component: 'JAddInput',
  123. componentProps: {
  124. min: 0,
  125. placeholders: ['请输入点位', '请输入名称'],
  126. },
  127. },
  128. {
  129. label: '模块尺寸',
  130. field: 'showStyle.size',
  131. component: 'Select',
  132. componentProps: {
  133. options: ModuleSizeOptions,
  134. },
  135. },
  136. {
  137. label: '模块版本',
  138. field: 'showStyle.version',
  139. component: 'Select',
  140. componentProps: {
  141. options: ModuleVersionOptions,
  142. },
  143. },
  144. {
  145. label: '模块定位',
  146. field: 'showStyle.position',
  147. component: 'Select',
  148. componentProps: {
  149. options: ModulePositionOptions,
  150. },
  151. },
  152. {
  153. label: '模块图表类型',
  154. field: 'showStyle.charttype',
  155. component: 'Select',
  156. componentProps: {
  157. options: ModuleChartTypeOptions,
  158. },
  159. },
  160. ];