windrect.data.ts 8.0 KB

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