balancePress.data.ts 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  1. import { BasicColumn } from '/@/components/Table';
  2. import { FormSchema } from '/@/components/Table';
  3. import { rules } from '/@/utils/helper/validator';
  4. export const columns: BasicColumn[] = [
  5. {
  6. title: '名称',
  7. dataIndex: 'strname',
  8. width: 120,
  9. },
  10. {
  11. title: '安装位置',
  12. dataIndex: 'strinstallpos',
  13. width: 100,
  14. },
  15. {
  16. title: '是否为常闭型',
  17. dataIndex: 'bnormalclose',
  18. width: 100,
  19. // customRender: render.renderAvatar,
  20. },
  21. {
  22. title: '净宽',
  23. dataIndex: 'fclearwidth',
  24. width: 80,
  25. },
  26. {
  27. title: '净高',
  28. dataIndex: 'fclearheight',
  29. width: 100,
  30. },
  31. {
  32. title: '风门道数',
  33. dataIndex: 'ndoorcount',
  34. width: 100,
  35. },
  36. {
  37. title: '所属分站',
  38. width: 150,
  39. dataIndex: 'stationname',
  40. },
  41. {
  42. title: '点表',
  43. width: 100,
  44. dataIndex: 'strtype',
  45. },
  46. {
  47. title: '监测类型',
  48. dataIndex: 'monitorflag',
  49. width: 100,
  50. },
  51. {
  52. title: '是否模拟数据',
  53. dataIndex: 'testflag',
  54. width: 100,
  55. },
  56. ];
  57. export const recycleColumns: BasicColumn[] = [
  58. {
  59. title: '名称',
  60. dataIndex: 'strname',
  61. width: 100,
  62. },
  63. {
  64. title: '是否为常闭型',
  65. dataIndex: 'bnormalclose',
  66. width: 100,
  67. },
  68. ];
  69. export const searchFormSchema: FormSchema[] = [
  70. {
  71. label: '名称',
  72. field: 'strname',
  73. component: 'Input',
  74. colProps: { span: 6 },
  75. },
  76. {
  77. label: '安装位置',
  78. field: 'strinstallpos',
  79. component: 'Input',
  80. colProps: { span: 6 },
  81. },
  82. {
  83. label: '是否为常闭型',
  84. field: 'bnormalclose',
  85. component: 'JDictSelectTag',
  86. componentProps: {
  87. dictCode: 'user_status',
  88. placeholder: '请选择读写类型',
  89. stringToNumber: true,
  90. },
  91. colProps: { span: 6 },
  92. },
  93. ];
  94. export const formSchema: FormSchema[] = [
  95. {
  96. label: '',
  97. field: 'id',
  98. component: 'Input',
  99. show: false,
  100. },
  101. {
  102. label: '名称',
  103. field: 'strname',
  104. component: 'Input',
  105. },
  106. {
  107. label: '安装位置',
  108. field: 'strinstallpos',
  109. component: 'Input',
  110. },
  111. {
  112. label: '是否为常闭型',
  113. field: 'bnormalclose',
  114. component: 'RadioGroup',
  115. defaultValue: 1,
  116. componentProps: () => {
  117. return {
  118. options: [
  119. { label: '是', value: 1, key: '1' },
  120. { label: '否', value: 0, key: '2' },
  121. ],
  122. };
  123. },
  124. },
  125. {
  126. label: '净宽',
  127. field: 'fclearwidth',
  128. component: 'Input',
  129. },
  130. {
  131. label: '净高',
  132. field: 'fclearheight',
  133. component: 'Input',
  134. },
  135. {
  136. label: '风门道数',
  137. field: 'ndoorcount',
  138. component: 'Input',
  139. },
  140. {
  141. label: '所属分站',
  142. field: 'stationname',
  143. component: 'JDictSelectTag',
  144. componentProps: {
  145. dictCode: 'user_status',
  146. placeholder: '请选择状态',
  147. stringToNumber: true,
  148. },
  149. },
  150. {
  151. label: '点表',
  152. field: 'strtype',
  153. component: 'JDictSelectTag',
  154. componentProps: {
  155. dictCode: 'user_status',
  156. placeholder: '请选择状态',
  157. stringToNumber: true,
  158. },
  159. },
  160. {
  161. label: '监测类型',
  162. field: 'monitorflag',
  163. component: 'JDictSelectTag',
  164. componentProps: {
  165. dictCode: 'user_status',
  166. placeholder: '请选择状态',
  167. stringToNumber: true,
  168. },
  169. },
  170. {
  171. label: '是否模拟数据',
  172. field: 'testflag',
  173. component: 'RadioGroup',
  174. defaultValue: 1,
  175. componentProps: () => {
  176. return {
  177. options: [
  178. { label: '是', value: 1, key: '1' },
  179. { label: '否', value: 0, key: '2' },
  180. ],
  181. };
  182. },
  183. },
  184. ];
  185. export const formPasswordSchema: FormSchema[] = [
  186. {
  187. label: '用户账号',
  188. field: 'username',
  189. component: 'Input',
  190. componentProps: { readOnly: true },
  191. },
  192. {
  193. label: '登录密码',
  194. field: 'password',
  195. component: 'StrengthMeter',
  196. componentProps: {
  197. placeholder: '请输入登录密码',
  198. },
  199. rules: [
  200. {
  201. required: true,
  202. message: '请输入登录密码',
  203. },
  204. ],
  205. },
  206. {
  207. label: '确认密码',
  208. field: 'confirmPassword',
  209. component: 'InputPassword',
  210. dynamicRules: ({ values }) => rules.confirmPassword(values, true),
  211. },
  212. ];
  213. export const formAgentSchema: FormSchema[] = [
  214. {
  215. label: '',
  216. field: 'id',
  217. component: 'Input',
  218. show: false,
  219. },
  220. {
  221. field: 'userName',
  222. label: '用户名',
  223. component: 'Input',
  224. componentProps: {
  225. readOnly: true,
  226. allowClear: false,
  227. },
  228. },
  229. {
  230. field: 'agentUserName',
  231. label: '代理人用户名',
  232. required: true,
  233. component: 'JSelectUser',
  234. componentProps: {
  235. rowKey: 'username',
  236. labelKey: 'realname',
  237. maxSelectCount: 10,
  238. },
  239. },
  240. {
  241. field: 'startTime',
  242. label: '代理开始时间',
  243. component: 'DatePicker',
  244. required: true,
  245. componentProps: {
  246. showTime: true,
  247. valueFormat: 'YYYY-MM-DD HH:mm:ss',
  248. placeholder: '请选择代理开始时间',
  249. },
  250. },
  251. {
  252. field: 'endTime',
  253. label: '代理结束时间',
  254. component: 'DatePicker',
  255. required: true,
  256. componentProps: {
  257. showTime: true,
  258. valueFormat: 'YYYY-MM-DD HH:mm:ss',
  259. placeholder: '请选择代理结束时间',
  260. },
  261. },
  262. {
  263. field: 'status',
  264. label: '状态',
  265. component: 'JDictSelectTag',
  266. defaultValue: '1',
  267. componentProps: {
  268. dictCode: 'valid_status',
  269. type: 'radioButton',
  270. },
  271. },
  272. ];
  273. export const chartsColumns = [
  274. {
  275. legend: '瓦斯浓度',
  276. seriesName: '瓦斯浓度(%)',
  277. ymax: 100,
  278. yname: '',
  279. linetype: 'bar',
  280. yaxispos: 'left',
  281. color: '#cd5fff',
  282. sort: 1,
  283. dataIndex: '',
  284. xRotate: 0,
  285. },
  286. ];
  287. export const chartsColumns1 = [
  288. {
  289. legend: '风量',
  290. seriesName: 'm³/min',
  291. ymax: 1000,
  292. yname: '',
  293. linetype: 'bar',
  294. yaxispos: 'left',
  295. color: '#755cf8',
  296. sort: 1,
  297. dataIndex: '',
  298. xRotate: 0,
  299. },
  300. ];