tableColumns.data.ts 4.1 KB

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