fiber.data.ts 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  1. import { BasicColumn } from '/@/components/Table';
  2. import { FormSchema } from '/@/components/Table';
  3. import { rules } from '/@/utils/helper/validator';
  4. export const resultColumns: BasicColumn[] = [
  5. // {
  6. // title: '测风描述',
  7. // dataIndex: 'strremark',
  8. // width: 120,
  9. // align: 'center',
  10. // },
  11. {
  12. title: '测风设备数量',
  13. dataIndex: 'totalcount',
  14. width: 100,
  15. align: 'center',
  16. },
  17. {
  18. title: '同时运行数量',
  19. dataIndex: 'count',
  20. width: 100,
  21. align: 'center',
  22. },
  23. {
  24. title: '总时长',
  25. dataIndex: 'runtime',
  26. width: 100,
  27. align: 'center',
  28. },
  29. {
  30. title: '开始测风时间',
  31. dataIndex: 'begintime',
  32. width: 80,
  33. align: 'center',
  34. },
  35. {
  36. title: '结束测风时间',
  37. dataIndex: 'endtime',
  38. width: 100,
  39. align: 'center',
  40. sorter: (a: any, b: any) => new Date(a.endtime) - new Date(b.endtime),
  41. },
  42. {
  43. title: '用时(s)',
  44. dataIndex: 'runtime',
  45. width: 100,
  46. align: 'center',
  47. },
  48. {
  49. title: '操作',
  50. dataIndex: 'action',
  51. width: 100,
  52. align: 'center',
  53. },
  54. ];
  55. export const innerResultColumns: BasicColumn[] = [
  56. {
  57. title: '设备名称',
  58. dataIndex: 'strname',
  59. align: 'center',
  60. width: 120,
  61. },
  62. {
  63. title: 'v1a',
  64. dataIndex: 'v1a',
  65. align: 'center',
  66. width: 100,
  67. },
  68. {
  69. title: 'v1b',
  70. dataIndex: 'v1b',
  71. align: 'center',
  72. width: 100,
  73. },
  74. {
  75. title: 'v1c',
  76. dataIndex: 'v1c',
  77. align: 'center',
  78. width: 100,
  79. },
  80. {
  81. title: 'v2a',
  82. dataIndex: 'v2a',
  83. align: 'center',
  84. width: 80,
  85. },
  86. {
  87. title: 'v2b',
  88. dataIndex: 'v2b',
  89. align: 'center',
  90. width: 100,
  91. },
  92. {
  93. title: 'v2c',
  94. dataIndex: 'v2c',
  95. align: 'center',
  96. width: 100,
  97. },
  98. {
  99. title: 'v3a',
  100. dataIndex: 'v3a',
  101. align: 'center',
  102. width: 100,
  103. },
  104. {
  105. title: 'v3b',
  106. dataIndex: 'v3b',
  107. align: 'center',
  108. width: 80,
  109. },
  110. {
  111. title: 'v3c',
  112. dataIndex: 'v3c',
  113. align: 'center',
  114. width: 100,
  115. },
  116. {
  117. title: '平均风速',
  118. dataIndex: 'va',
  119. align: 'center',
  120. width: 100,
  121. },
  122. {
  123. title: '风量',
  124. dataIndex: 'm3',
  125. align: 'center',
  126. width: 100,
  127. },
  128. {
  129. title: '用时(s)',
  130. dataIndex: 'runtime',
  131. align: 'center',
  132. width: 80,
  133. },
  134. ];
  135. export const columns: BasicColumn[] = [
  136. {
  137. title: '名称',
  138. dataIndex: 'strname',
  139. width: 120,
  140. },
  141. {
  142. title: '安装位置',
  143. dataIndex: 'strinstallpos',
  144. width: 100,
  145. },
  146. {
  147. title: '是否为常闭型',
  148. dataIndex: 'bnormalclose',
  149. width: 100,
  150. // customRender: render.renderAvatar,
  151. },
  152. {
  153. title: '净宽',
  154. dataIndex: 'fclearwidth',
  155. width: 80,
  156. },
  157. {
  158. title: '净高',
  159. dataIndex: 'fclearheight',
  160. width: 100,
  161. },
  162. {
  163. title: '风门道数',
  164. dataIndex: 'ndoorcount',
  165. width: 100,
  166. },
  167. {
  168. title: '所属分站',
  169. width: 150,
  170. dataIndex: 'stationname',
  171. },
  172. {
  173. title: '点表',
  174. width: 100,
  175. dataIndex: 'strtype',
  176. },
  177. {
  178. title: '监测类型',
  179. dataIndex: 'monitorflag',
  180. width: 100,
  181. },
  182. {
  183. title: '是否模拟数据',
  184. dataIndex: 'testflag',
  185. width: 100,
  186. },
  187. ];
  188. export const recycleColumns: BasicColumn[] = [
  189. {
  190. title: '名称',
  191. dataIndex: 'strname',
  192. width: 100,
  193. },
  194. {
  195. title: '是否为常闭型',
  196. dataIndex: 'bnormalclose',
  197. width: 100,
  198. },
  199. ];
  200. export const searchFormSchema: FormSchema[] = [
  201. {
  202. label: '名称',
  203. field: 'strname',
  204. component: 'Input',
  205. colProps: { span: 6 },
  206. },
  207. {
  208. label: '安装位置',
  209. field: 'strinstallpos',
  210. component: 'Input',
  211. colProps: { span: 6 },
  212. },
  213. {
  214. label: '是否为常闭型',
  215. field: 'bnormalclose',
  216. component: 'JDictSelectTag',
  217. componentProps: {
  218. dictCode: 'user_status',
  219. placeholder: '请选择读写类型',
  220. stringToNumber: true,
  221. },
  222. colProps: { span: 6 },
  223. },
  224. ];
  225. export const formSchema: FormSchema[] = [
  226. {
  227. label: '',
  228. field: 'id',
  229. component: 'Input',
  230. show: false,
  231. },
  232. {
  233. label: '名称',
  234. field: 'strname',
  235. component: 'Input',
  236. },
  237. {
  238. label: '安装位置',
  239. field: 'strinstallpos',
  240. component: 'Input',
  241. },
  242. {
  243. label: '是否为常闭型',
  244. field: 'bnormalclose',
  245. component: 'RadioGroup',
  246. defaultValue: 1,
  247. componentProps: () => {
  248. return {
  249. options: [
  250. { label: '是', value: 1, key: '1' },
  251. { label: '否', value: 0, key: '2' },
  252. ],
  253. };
  254. },
  255. },
  256. {
  257. label: '净宽',
  258. field: 'fclearwidth',
  259. component: 'Input',
  260. },
  261. {
  262. label: '净高',
  263. field: 'fclearheight',
  264. component: 'Input',
  265. },
  266. {
  267. label: '风门道数',
  268. field: 'ndoorcount',
  269. component: 'Input',
  270. },
  271. {
  272. label: '所属分站',
  273. field: 'stationname',
  274. component: 'JDictSelectTag',
  275. componentProps: {
  276. dictCode: 'user_status',
  277. placeholder: '请选择状态',
  278. stringToNumber: true,
  279. },
  280. },
  281. {
  282. label: '点表',
  283. field: 'strtype',
  284. component: 'JDictSelectTag',
  285. componentProps: {
  286. dictCode: 'user_status',
  287. placeholder: '请选择状态',
  288. stringToNumber: true,
  289. },
  290. },
  291. {
  292. label: '监测类型',
  293. field: 'monitorflag',
  294. component: 'JDictSelectTag',
  295. componentProps: {
  296. dictCode: 'user_status',
  297. placeholder: '请选择状态',
  298. stringToNumber: true,
  299. },
  300. },
  301. {
  302. label: '是否模拟数据',
  303. field: 'testflag',
  304. component: 'RadioGroup',
  305. defaultValue: 1,
  306. componentProps: () => {
  307. return {
  308. options: [
  309. { label: '是', value: 1, key: '1' },
  310. { label: '否', value: 0, key: '2' },
  311. ],
  312. };
  313. },
  314. },
  315. ];
  316. export const formPasswordSchema: FormSchema[] = [
  317. {
  318. label: '用户账号',
  319. field: 'username',
  320. component: 'Input',
  321. componentProps: { readOnly: true },
  322. },
  323. {
  324. label: '登录密码',
  325. field: 'password',
  326. component: 'StrengthMeter',
  327. componentProps: {
  328. placeholder: '请输入登录密码',
  329. },
  330. rules: [
  331. {
  332. required: true,
  333. message: '请输入登录密码',
  334. },
  335. ],
  336. },
  337. {
  338. label: '确认密码',
  339. field: 'confirmPassword',
  340. component: 'InputPassword',
  341. dynamicRules: ({ values }) => rules.confirmPassword(values, true),
  342. },
  343. ];
  344. export const formAgentSchema: FormSchema[] = [
  345. {
  346. label: '',
  347. field: 'id',
  348. component: 'Input',
  349. show: false,
  350. },
  351. {
  352. field: 'userName',
  353. label: '用户名',
  354. component: 'Input',
  355. componentProps: {
  356. readOnly: true,
  357. allowClear: false,
  358. },
  359. },
  360. {
  361. field: 'agentUserName',
  362. label: '代理人用户名',
  363. required: true,
  364. component: 'JSelectUser',
  365. componentProps: {
  366. rowKey: 'username',
  367. labelKey: 'realname',
  368. maxSelectCount: 10,
  369. },
  370. },
  371. {
  372. field: 'startTime',
  373. label: '代理开始时间',
  374. component: 'DatePicker',
  375. required: true,
  376. componentProps: {
  377. showTime: true,
  378. valueFormat: 'YYYY-MM-DD HH:mm:ss',
  379. placeholder: '请选择代理开始时间',
  380. },
  381. },
  382. {
  383. field: 'endTime',
  384. label: '代理结束时间',
  385. component: 'DatePicker',
  386. required: true,
  387. componentProps: {
  388. showTime: true,
  389. valueFormat: 'YYYY-MM-DD HH:mm:ss',
  390. placeholder: '请选择代理结束时间',
  391. },
  392. },
  393. {
  394. field: 'status',
  395. label: '状态',
  396. component: 'JDictSelectTag',
  397. defaultValue: '1',
  398. componentProps: {
  399. dictCode: 'valid_status',
  400. type: 'radioButton',
  401. },
  402. },
  403. ];
  404. export const chartsColumns = [
  405. {
  406. legend: '平均温度',
  407. seriesName: '℃',
  408. ymax: '100',
  409. yname: '',
  410. linetype: 'bar',
  411. yaxispos: 'left',
  412. color: '#cd5fff',
  413. sort: 1,
  414. xRotate: 0,
  415. dataIndex: 'favg',
  416. },
  417. {
  418. legend: '最高温度',
  419. seriesName: '',
  420. ymax: '100',
  421. yname: '',
  422. linetype: 'line',
  423. yaxispos: 'left',
  424. color: '#3DF6FF',
  425. sort: 1,
  426. xRotate: 0,
  427. dataIndex: 'fmax',
  428. },
  429. {
  430. legend: '最低温度',
  431. seriesName: '',
  432. ymax: '100',
  433. yname: '',
  434. linetype: 'line',
  435. yaxispos: 'left',
  436. color: '#fac858',
  437. sort: 1,
  438. xRotate: 0,
  439. dataIndex: 'fmin',
  440. },
  441. ];