windrect.data.ts 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  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: '平均风速',
  64. dataIndex: 'va',
  65. align: 'center',
  66. width: 100,
  67. },
  68. {
  69. title: '风量',
  70. dataIndex: 'm3',
  71. align: 'center',
  72. width: 100,
  73. },
  74. {
  75. title: '用时(s)',
  76. dataIndex: 'runtime',
  77. align: 'center',
  78. width: 80,
  79. },
  80. ];
  81. export const columns: BasicColumn[] = [
  82. {
  83. title: '名称',
  84. dataIndex: 'strname',
  85. width: 120,
  86. },
  87. {
  88. title: '安装位置',
  89. dataIndex: 'strinstallpos',
  90. width: 100,
  91. },
  92. {
  93. title: '是否为常闭型',
  94. dataIndex: 'bnormalclose',
  95. width: 100,
  96. // customRender: render.renderAvatar,
  97. },
  98. {
  99. title: '净宽',
  100. dataIndex: 'fclearwidth',
  101. width: 80,
  102. },
  103. {
  104. title: '净高',
  105. dataIndex: 'fclearheight',
  106. width: 100,
  107. },
  108. {
  109. title: '风门道数',
  110. dataIndex: 'ndoorcount',
  111. width: 100,
  112. },
  113. {
  114. title: '所属分站',
  115. width: 150,
  116. dataIndex: 'stationname',
  117. },
  118. {
  119. title: '点表',
  120. width: 100,
  121. dataIndex: 'strtype',
  122. },
  123. {
  124. title: '监测类型',
  125. dataIndex: 'monitorflag',
  126. width: 100,
  127. },
  128. {
  129. title: '是否模拟数据',
  130. dataIndex: 'testflag',
  131. width: 100,
  132. },
  133. ];
  134. export const recycleColumns: BasicColumn[] = [
  135. {
  136. title: '名称',
  137. dataIndex: 'strname',
  138. width: 100,
  139. },
  140. {
  141. title: '是否为常闭型',
  142. dataIndex: 'bnormalclose',
  143. width: 100,
  144. },
  145. ];
  146. export const searchFormSchema: FormSchema[] = [
  147. {
  148. label: '名称',
  149. field: 'strname',
  150. component: 'Input',
  151. colProps: { span: 6 },
  152. },
  153. {
  154. label: '安装位置',
  155. field: 'strinstallpos',
  156. component: 'Input',
  157. colProps: { span: 6 },
  158. },
  159. {
  160. label: '是否为常闭型',
  161. field: 'bnormalclose',
  162. component: 'JDictSelectTag',
  163. componentProps: {
  164. dictCode: 'user_status',
  165. placeholder: '请选择读写类型',
  166. stringToNumber: true,
  167. },
  168. colProps: { span: 6 },
  169. },
  170. ];
  171. export const formSchema: FormSchema[] = [
  172. {
  173. label: '',
  174. field: 'id',
  175. component: 'Input',
  176. show: false,
  177. },
  178. {
  179. label: '名称',
  180. field: 'strname',
  181. component: 'Input',
  182. },
  183. {
  184. label: '安装位置',
  185. field: 'strinstallpos',
  186. component: 'Input',
  187. },
  188. {
  189. label: '是否为常闭型',
  190. field: 'bnormalclose',
  191. component: 'RadioGroup',
  192. defaultValue: 1,
  193. componentProps: () => {
  194. return {
  195. options: [
  196. { label: '是', value: 1, key: '1' },
  197. { label: '否', value: 0, key: '2' },
  198. ],
  199. };
  200. },
  201. },
  202. {
  203. label: '净宽',
  204. field: 'fclearwidth',
  205. component: 'Input',
  206. },
  207. {
  208. label: '净高',
  209. field: 'fclearheight',
  210. component: 'Input',
  211. },
  212. {
  213. label: '风门道数',
  214. field: 'ndoorcount',
  215. component: 'Input',
  216. },
  217. {
  218. label: '所属分站',
  219. field: 'stationname',
  220. component: 'JDictSelectTag',
  221. componentProps: {
  222. dictCode: 'user_status',
  223. placeholder: '请选择状态',
  224. stringToNumber: true,
  225. },
  226. },
  227. {
  228. label: '点表',
  229. field: 'strtype',
  230. component: 'JDictSelectTag',
  231. componentProps: {
  232. dictCode: 'user_status',
  233. placeholder: '请选择状态',
  234. stringToNumber: true,
  235. },
  236. },
  237. {
  238. label: '监测类型',
  239. field: 'monitorflag',
  240. component: 'JDictSelectTag',
  241. componentProps: {
  242. dictCode: 'user_status',
  243. placeholder: '请选择状态',
  244. stringToNumber: true,
  245. },
  246. },
  247. {
  248. label: '是否模拟数据',
  249. field: 'testflag',
  250. component: 'RadioGroup',
  251. defaultValue: 1,
  252. componentProps: () => {
  253. return {
  254. options: [
  255. { label: '是', value: 1, key: '1' },
  256. { label: '否', value: 0, key: '2' },
  257. ],
  258. };
  259. },
  260. },
  261. ];
  262. export const formPasswordSchema: FormSchema[] = [
  263. {
  264. label: '用户账号',
  265. field: 'username',
  266. component: 'Input',
  267. componentProps: { readOnly: true },
  268. },
  269. {
  270. label: '登录密码',
  271. field: 'password',
  272. component: 'StrengthMeter',
  273. componentProps: {
  274. placeholder: '请输入登录密码',
  275. },
  276. rules: [
  277. {
  278. required: true,
  279. message: '请输入登录密码',
  280. },
  281. ],
  282. },
  283. {
  284. label: '确认密码',
  285. field: 'confirmPassword',
  286. component: 'InputPassword',
  287. dynamicRules: ({ values }) => rules.confirmPassword(values, true),
  288. },
  289. ];
  290. export const formAgentSchema: FormSchema[] = [
  291. {
  292. label: '',
  293. field: 'id',
  294. component: 'Input',
  295. show: false,
  296. },
  297. {
  298. field: 'userName',
  299. label: '用户名',
  300. component: 'Input',
  301. componentProps: {
  302. readOnly: true,
  303. allowClear: false,
  304. },
  305. },
  306. {
  307. field: 'agentUserName',
  308. label: '代理人用户名',
  309. required: true,
  310. component: 'JSelectUser',
  311. componentProps: {
  312. rowKey: 'username',
  313. labelKey: 'realname',
  314. maxSelectCount: 10,
  315. },
  316. },
  317. {
  318. field: 'startTime',
  319. label: '代理开始时间',
  320. component: 'DatePicker',
  321. required: true,
  322. componentProps: {
  323. showTime: true,
  324. valueFormat: 'YYYY-MM-DD HH:mm:ss',
  325. placeholder: '请选择代理开始时间',
  326. },
  327. },
  328. {
  329. field: 'endTime',
  330. label: '代理结束时间',
  331. component: 'DatePicker',
  332. required: true,
  333. componentProps: {
  334. showTime: true,
  335. valueFormat: 'YYYY-MM-DD HH:mm:ss',
  336. placeholder: '请选择代理结束时间',
  337. },
  338. },
  339. {
  340. field: 'status',
  341. label: '状态',
  342. component: 'JDictSelectTag',
  343. defaultValue: '1',
  344. componentProps: {
  345. dictCode: 'valid_status',
  346. type: 'radioButton',
  347. },
  348. },
  349. ];
  350. export const chartsColumns = [
  351. {
  352. legend: '风量',
  353. seriesName: 'm³/min',
  354. ymax: 10000,
  355. yname: 'm³/min',
  356. linetype: 'bar',
  357. yaxispos: 'left',
  358. color: '#3DF6FF',
  359. sort: 1,
  360. xRotate: 0,
  361. dataIndex: 'm³',
  362. },
  363. {
  364. legend: '风速',
  365. seriesName: '(m/s)',
  366. ymax: 10,
  367. yname: 'm/s',
  368. linetype: 'bar',
  369. yaxispos: 'right',
  370. color: '#cd5fff',
  371. sort: 2,
  372. xRotate: 0,
  373. dataIndex: 'va',
  374. },
  375. // {
  376. // legend: 'V3风速',
  377. // seriesName: '',
  378. // ymax: 20,
  379. // yname: 'm/min',
  380. // linetype: 'bar',
  381. // yaxispos: 'left',
  382. // color: '#fac858',
  383. // sort: 1,
  384. // xRotate: 0,
  385. // dataIndex: 'incipientWindSpeed3',
  386. // },
  387. // {
  388. // legend: '气源压力',
  389. // seriesName: '(MPa)',
  390. // ymax: 50,
  391. // yname: 'MPa',
  392. // linetype: 'line',
  393. // yaxispos: 'right',
  394. // color: '#fc8452',
  395. // sort: 2,
  396. // xRotate: 0,
  397. // dataIndex: 'sourcePressure',
  398. // },
  399. ];