windrect.data.ts 8.4 KB

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