tableColumns.data.ts 4.0 KB

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