tableColumns.data.ts 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. import { BasicColumn } from '/@/components/Table';
  2. import { FormSchema } from '/@/components/Table';
  3. import { selectDevice } from './tableColumns.api';
  4. import { rules } from '/@/utils/helper/validator';
  5. import { render } from '/@/utils/common/renderUtils';
  6. export const columns: BasicColumn[] = [
  7. {
  8. title: '显示类型',
  9. dataIndex: 'devicekind',
  10. width: 120,
  11. },
  12. {
  13. title: '显示字段',
  14. dataIndex: 'des',
  15. width: 120,
  16. },
  17. {
  18. title: '字段code',
  19. dataIndex: 'monitorcode',
  20. width: 100,
  21. },
  22. {
  23. title: '数据类型',
  24. dataIndex: 'datatype_dictText',
  25. width: 100,
  26. },
  27. {
  28. title: '排序',
  29. dataIndex: 'sort',
  30. width: 80,
  31. // sorter: true,
  32. // customRender: ({ text }) => {
  33. // return render.renderDict(text, 'sex');
  34. // },
  35. },
  36. ];
  37. export const searchFormSchema: FormSchema[] = [
  38. {
  39. label: '设备类型',
  40. field: 'devicetype',
  41. component: 'MTreeSelect',
  42. colProps: { span: 6 },
  43. },
  44. {
  45. label: '页面类型',
  46. field: 'pagetype',
  47. component: 'JDictSelectTag',
  48. componentProps: {
  49. dictCode: 'pagetype',
  50. placeholder: '请选择状态',
  51. },
  52. colProps: { span: 6 },
  53. },
  54. {
  55. label: '值名称',
  56. field: 'valuename',
  57. component: 'Input',
  58. colProps: { span: 6 },
  59. },
  60. {
  61. label: '值code',
  62. field: 'monitorcode',
  63. component: 'Input',
  64. colProps: { span: 6 },
  65. },
  66. ];
  67. export const formSchema: FormSchema[] = [
  68. {
  69. label: '',
  70. field: 'id',
  71. component: 'Input',
  72. show: false,
  73. },
  74. {
  75. label: '设备类型',
  76. field: 'devicetype',
  77. component: 'MTreeSelect',
  78. componentProps: {
  79. isSearch: false,
  80. },
  81. },
  82. {
  83. label: '页面类型',
  84. field: 'pagetype',
  85. component: 'JDictSelectTag',
  86. componentProps: {
  87. dictCode: 'pagetype',
  88. placeholder: '请选择状态',
  89. },
  90. },
  91. {
  92. label: '字段名称',
  93. field: 'des',
  94. component: 'Input',
  95. },
  96. {
  97. label: '字段Code',
  98. field: 'monitorcode',
  99. component: 'Input',
  100. },
  101. {
  102. label: '是否显示',
  103. field: 'showflag',
  104. component: 'JDictSelectTag',
  105. componentProps: {
  106. dictCode: 'booltype',
  107. placeholder: '请选择状态',
  108. stringToNumber: true,
  109. },
  110. },
  111. {
  112. label: '数据类型',
  113. field: 'datatype',
  114. component: 'JDictSelectTag',
  115. componentProps: {
  116. dictCode: 'datatype',
  117. placeholder: '请选择状态',
  118. stringToNumber: true,
  119. },
  120. },
  121. {
  122. label: '输入类型',
  123. field: 'type',
  124. component: 'JDictSelectTag',
  125. componentProps: {
  126. dictCode: 'type',
  127. placeholder: '请选择状态',
  128. stringToNumber: true,
  129. },
  130. },
  131. {
  132. label: '排序值',
  133. field: 'sort',
  134. component: 'Input',
  135. },
  136. {
  137. label: '宽度',
  138. field: 'width',
  139. component: 'Input',
  140. },
  141. {
  142. label: '单位',
  143. field: 'unit',
  144. component: 'Input',
  145. },
  146. {
  147. label: '提示文字',
  148. field: 'placeholder',
  149. component: 'Input',
  150. },
  151. {
  152. label: '字典值',
  153. field: 'dict',
  154. component: 'Input',
  155. },
  156. {
  157. label: '编辑规则',
  158. field: 'rules',
  159. component: 'InputTextArea',
  160. },
  161. {
  162. label: '坐标轴位置显示',
  163. field: 'yaxispos',
  164. component: 'Input',
  165. },
  166. {
  167. label: '样式',
  168. field: 'linetype',
  169. component: 'Input',
  170. // customRender: render.renderAvatar,
  171. },
  172. {
  173. label: 'y轴名称',
  174. field: 'yname',
  175. component: 'Input',
  176. },
  177. {
  178. label: 'y轴最大值',
  179. field: 'ymax',
  180. component: 'Input',
  181. },
  182. {
  183. label: '图表名',
  184. field: 'legend',
  185. component: 'Input',
  186. },
  187. {
  188. label: '默认值',
  189. field: 'defaultval',
  190. component: 'Input',
  191. },
  192. {
  193. label: '显示范围',
  194. field: 'maxshow',
  195. component: 'Input',
  196. // sorter: true,
  197. // customRender: ({ text }) => {
  198. // return render.renderDict(text, 'sex');
  199. // },
  200. },
  201. ];