data.ts 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577
  1. import { BasicColumn, FormSchema } from '/@/components/Table';
  2. import { sysUserList } from '/@/api/sys/sysUserApi';
  3. import { useUserStore } from '@/store/modules/user';
  4. const useUser = useUserStore();
  5. export const columns: BasicColumn[] = [
  6. {
  7. title: '检查日期',
  8. dataIndex: 'examinerTime',
  9. align: 'center',
  10. width: 120,
  11. },
  12. {
  13. title: '检查人',
  14. dataIndex: 'examinerName',
  15. align: 'center',
  16. width: 80,
  17. },
  18. {
  19. title: '进水压力',
  20. dataIndex: 'intakePressure',
  21. align: 'center',
  22. width: 80,
  23. },
  24. {
  25. title: '控制器状态',
  26. dataIndex: 'controllerState',
  27. align: 'center',
  28. width: 90,
  29. },
  30. {
  31. title: '砂滤罐压差',
  32. dataIndex: 'sandLeachDifferentialPressure',
  33. align: 'center',
  34. width: 90,
  35. },
  36. {
  37. title: '砂滤罐反冲洗',
  38. dataIndex: 'sandLeachBackFlush',
  39. align: 'center',
  40. width: 110,
  41. },
  42. {
  43. title: '硬度',
  44. dataIndex: 'hardness',
  45. align: 'center',
  46. width: 80,
  47. },
  48. {
  49. title: '树脂罐压差',
  50. dataIndex: 'resinDifferentialPressure',
  51. align: 'center',
  52. width: 90,
  53. },
  54. {
  55. title: '树脂再生情况',
  56. dataIndex: 'resinRegeneration',
  57. align: 'center',
  58. width: 110,
  59. },
  60. {
  61. title: '残余氯',
  62. dataIndex: 'residualChlorine',
  63. align: 'center',
  64. width: 60,
  65. },
  66. {
  67. title: '活性炭罐压差',
  68. dataIndex: 'activeCarbonDifferentialPressure',
  69. align: 'center',
  70. width: 110,
  71. },
  72. {
  73. title: '活性炭罐反冲洗',
  74. dataIndex: 'activeCarbonBackFlush',
  75. align: 'center',
  76. width: 120,
  77. },
  78. {
  79. title: '更换滤器',
  80. dataIndex: 'filterReplacement',
  81. align: 'center',
  82. width: 80,
  83. },
  84. {
  85. title: '水机进水压力',
  86. dataIndex: 'waterInletPressure',
  87. align: 'center',
  88. width: 110,
  89. },
  90. {
  91. title: '1级膜进水压力',
  92. dataIndex: 'membraneInletPressure1',
  93. align: 'center',
  94. width: 110,
  95. },
  96. {
  97. title: '1级膜排水压力',
  98. dataIndex: 'membraneDrainagePressure1',
  99. align: 'center',
  100. width: 110,
  101. },
  102. {
  103. title: '1级膜产水压力',
  104. dataIndex: 'membraneContributingWaterPressure1',
  105. align: 'center',
  106. width: 110,
  107. },
  108. {
  109. title: '2级膜进水压力',
  110. dataIndex: 'membraneInletPressure2',
  111. align: 'center',
  112. width: 110,
  113. },
  114. {
  115. title: '2级膜排水压力',
  116. dataIndex: 'membraneDrainagePressure2',
  117. align: 'center',
  118. width: 110,
  119. },
  120. {
  121. title: '2级膜产水压力',
  122. dataIndex: 'membraneContributingWaterPressure2',
  123. align: 'center',
  124. width: 110,
  125. },
  126. {
  127. title: '纯水回水压力',
  128. dataIndex: 'pureWaterReturnPressure',
  129. align: 'center',
  130. width: 110,
  131. },
  132. {
  133. title: '进水电导率',
  134. dataIndex: 'inletConductivity',
  135. align: 'center',
  136. width: 90,
  137. },
  138. {
  139. title: '产水电导率',
  140. dataIndex: 'contributingWaterConductivity',
  141. align: 'center',
  142. width: 90,
  143. },
  144. {
  145. title: '进水量',
  146. dataIndex: 'waterInflow',
  147. align: 'center',
  148. width: 60,
  149. },
  150. {
  151. title: '产水量',
  152. dataIndex: 'waterYield',
  153. align: 'center',
  154. width: 60,
  155. },
  156. {
  157. title: '废水量',
  158. dataIndex: 'wastewaterQuantity',
  159. align: 'center',
  160. width: 60,
  161. },
  162. {
  163. title: '回水量',
  164. dataIndex: 'waterReclamation',
  165. align: 'center',
  166. width: 60,
  167. },
  168. {
  169. title: '水温',
  170. dataIndex: 'waterTemperature',
  171. align: 'center',
  172. width: 60,
  173. },
  174. {
  175. title: '系统消毒',
  176. dataIndex: 'systemDisinfection',
  177. align: 'center',
  178. width: 80,
  179. },
  180. ];
  181. export const dataFormSchema: FormSchema[] = [
  182. {
  183. label: '检查日期',
  184. field: 'examinerTime',
  185. required: true,
  186. component: 'DatePicker',
  187. componentProps: {
  188. format: 'YYYY-MM-DD',
  189. placeholder: '请选择检查日期',
  190. getPopupContainer: () => document.body,
  191. valueFormat: 'YYYY-MM-DD',
  192. },
  193. },
  194. {
  195. label: '检查人',
  196. field: 'examinerId',
  197. required: true,
  198. component: 'ApiSelect',
  199. componentProps: ({ formModel }) => {
  200. return {
  201. api: sysUserList,
  202. params: {
  203. name: formModel.patientBasicName,
  204. pageSize: 999,
  205. },
  206. labelField: 'nickname',
  207. valueField: 'id',
  208. resultField: 'data',
  209. placeholder: '请输入患者姓名',
  210. getPopupContainer: () => document.body,
  211. showSearch: true,
  212. filterOption: false,
  213. onSearch: e => {
  214. formModel.patientBasicName = e;
  215. },
  216. };
  217. },
  218. defaultValue: useUser.getUserInfo.userId,
  219. },
  220. {
  221. label: '进水压力',
  222. field: 'intakePressure',
  223. component: 'RadioGroup',
  224. componentProps: {
  225. options: [
  226. { label: '合格', value: 1 },
  227. { label: '不合格', value: 0 },
  228. ],
  229. },
  230. defaultValue: 1,
  231. },
  232. {
  233. label: '控制器状态',
  234. field: 'controllerState',
  235. component: 'RadioGroup',
  236. componentProps: {
  237. options: [
  238. { label: '合格', value: 1 },
  239. { label: '不合格', value: 0 },
  240. ],
  241. },
  242. defaultValue: 1,
  243. },
  244. {
  245. label: '砂滤罐压差',
  246. field: 'sandLeachDifferentialPressure',
  247. component: 'RadioGroup',
  248. componentProps: {
  249. options: [
  250. { label: '合格', value: 1 },
  251. { label: '不合格', value: 0 },
  252. ],
  253. },
  254. defaultValue: 1,
  255. },
  256. {
  257. label: '砂滤罐反向冲洗',
  258. field: 'sandLeachBackFlush',
  259. component: 'RadioGroup',
  260. componentProps: {
  261. options: [
  262. { label: '合格', value: 1 },
  263. { label: '不合格', value: 0 },
  264. ],
  265. },
  266. defaultValue: 1,
  267. },
  268. {
  269. label: '硬度',
  270. field: 'hardness',
  271. component: 'RadioGroup',
  272. componentProps: {
  273. options: [
  274. { label: '合格', value: 1 },
  275. { label: '不合格', value: 0 },
  276. ],
  277. },
  278. defaultValue: 1,
  279. },
  280. {
  281. label: '树脂罐压差',
  282. field: 'resinDifferentialPressure',
  283. component: 'RadioGroup',
  284. componentProps: {
  285. options: [
  286. { label: '合格', value: 1 },
  287. { label: '不合格', value: 0 },
  288. ],
  289. },
  290. defaultValue: 1,
  291. },
  292. {
  293. label: '树脂再生情况',
  294. field: 'resinRegeneration',
  295. component: 'RadioGroup',
  296. componentProps: {
  297. options: [
  298. { label: '合格', value: 1 },
  299. { label: '不合格', value: 0 },
  300. ],
  301. },
  302. defaultValue: 1,
  303. },
  304. {
  305. label: '残余氯',
  306. field: 'residualChlorine',
  307. component: 'RadioGroup',
  308. componentProps: {
  309. options: [
  310. { label: '合格', value: 1 },
  311. { label: '不合格', value: 0 },
  312. ],
  313. },
  314. defaultValue: 1,
  315. },
  316. {
  317. label: '活性炭罐压差',
  318. field: 'activeCarbonDifferentialPressure',
  319. component: 'RadioGroup',
  320. componentProps: {
  321. options: [
  322. { label: '合格', value: 1 },
  323. { label: '不合格', value: 0 },
  324. ],
  325. },
  326. defaultValue: 1,
  327. },
  328. {
  329. label: '活性炭罐反向冲洗',
  330. field: 'activeCarbonBackFlush',
  331. component: 'RadioGroup',
  332. componentProps: {
  333. options: [
  334. { label: '合格', value: 1 },
  335. { label: '不合格', value: 0 },
  336. ],
  337. },
  338. defaultValue: 1,
  339. },
  340. {
  341. label: '更换滤器',
  342. field: 'filterReplacement',
  343. component: 'RadioGroup',
  344. componentProps: {
  345. options: [
  346. { label: '是', value: 1 },
  347. { label: '否', value: 0 },
  348. ],
  349. },
  350. defaultValue: 1,
  351. },
  352. {
  353. label: '水机进水压力',
  354. field: 'waterInletPressure',
  355. component: 'RadioGroup',
  356. componentProps: {
  357. options: [
  358. { label: '合格', value: 1 },
  359. { label: '不合格', value: 0 },
  360. ],
  361. },
  362. defaultValue: 1,
  363. },
  364. {
  365. label: '1级膜进水压力',
  366. field: 'membraneInletPressure1',
  367. component: 'RadioGroup',
  368. componentProps: {
  369. options: [
  370. { label: '合格', value: 1 },
  371. { label: '不合格', value: 0 },
  372. ],
  373. },
  374. defaultValue: 1,
  375. },
  376. {
  377. label: '1级膜排水压力',
  378. field: 'membraneDrainagePressure1',
  379. component: 'RadioGroup',
  380. componentProps: {
  381. options: [
  382. { label: '合格', value: 1 },
  383. { label: '不合格', value: 0 },
  384. ],
  385. },
  386. defaultValue: 1,
  387. },
  388. {
  389. label: '1级膜产水压力',
  390. field: 'membraneContributingWaterPressure1',
  391. component: 'RadioGroup',
  392. componentProps: {
  393. options: [
  394. { label: '合格', value: 1 },
  395. { label: '不合格', value: 0 },
  396. ],
  397. },
  398. defaultValue: 1,
  399. },
  400. {
  401. label: '2级膜进水压力',
  402. field: 'membraneInletPressure2',
  403. component: 'RadioGroup',
  404. componentProps: {
  405. options: [
  406. { label: '合格', value: 1 },
  407. { label: '不合格', value: 0 },
  408. ],
  409. },
  410. defaultValue: 1,
  411. },
  412. {
  413. label: '2级膜排水压力',
  414. field: 'membraneDrainagePressure2',
  415. component: 'RadioGroup',
  416. componentProps: {
  417. options: [
  418. { label: '合格', value: 1 },
  419. { label: '不合格', value: 0 },
  420. ],
  421. },
  422. defaultValue: 1,
  423. },
  424. {
  425. label: '2级膜产水压力',
  426. field: 'membraneContributingWaterPressure2',
  427. component: 'RadioGroup',
  428. componentProps: {
  429. options: [
  430. { label: '合格', value: 1 },
  431. { label: '不合格', value: 0 },
  432. ],
  433. },
  434. defaultValue: 1,
  435. },
  436. {
  437. label: '纯水回水压力',
  438. field: 'pureWaterReturnPressure',
  439. component: 'RadioGroup',
  440. componentProps: {
  441. options: [
  442. { label: '合格', value: 1 },
  443. { label: '不合格', value: 0 },
  444. ],
  445. },
  446. defaultValue: 1,
  447. },
  448. {
  449. label: '进水电导率',
  450. field: 'inletConductivity',
  451. component: 'RadioGroup',
  452. componentProps: {
  453. options: [
  454. { label: '合格', value: 1 },
  455. { label: '不合格', value: 0 },
  456. ],
  457. },
  458. defaultValue: 1,
  459. },
  460. {
  461. label: '产水电导率',
  462. field: 'contributingWaterConductivity',
  463. component: 'RadioGroup',
  464. componentProps: {
  465. options: [
  466. { label: '合格', value: 1 },
  467. { label: '不合格', value: 0 },
  468. ],
  469. },
  470. defaultValue: 1,
  471. },
  472. {
  473. label: '进水量',
  474. field: 'waterInflow',
  475. component: 'RadioGroup',
  476. componentProps: {
  477. options: [
  478. { label: '合格', value: 1 },
  479. { label: '不合格', value: 0 },
  480. ],
  481. },
  482. defaultValue: 1,
  483. },
  484. {
  485. label: '产水量',
  486. field: 'waterYield',
  487. component: 'RadioGroup',
  488. componentProps: {
  489. options: [
  490. { label: '合格', value: 1 },
  491. { label: '不合格', value: 0 },
  492. ],
  493. },
  494. defaultValue: 1,
  495. },
  496. {
  497. label: '废水量',
  498. field: 'wastewaterQuantity',
  499. component: 'RadioGroup',
  500. componentProps: {
  501. options: [
  502. { label: '合格', value: 1 },
  503. { label: '不合格', value: 0 },
  504. ],
  505. },
  506. defaultValue: 1,
  507. },
  508. {
  509. label: '回水量',
  510. field: 'waterReclamation',
  511. component: 'RadioGroup',
  512. componentProps: {
  513. options: [
  514. { label: '合格', value: 1 },
  515. { label: '不合格', value: 0 },
  516. ],
  517. },
  518. defaultValue: 1,
  519. },
  520. {
  521. label: '水温(℃)',
  522. field: 'waterTemperature',
  523. component: 'RadioGroup',
  524. componentProps: {
  525. options: [
  526. { label: '合格', value: 1 },
  527. { label: '不合格', value: 0 },
  528. ],
  529. },
  530. defaultValue: 1,
  531. },
  532. {
  533. label: '系统消毒',
  534. field: 'systemDisinfection',
  535. component: 'RadioGroup',
  536. componentProps: {
  537. options: [
  538. { label: '是', value: 1 },
  539. { label: '否', value: 0 },
  540. ],
  541. },
  542. defaultValue: 1,
  543. },
  544. ];
  545. export const dataFiled = [
  546. 'intakePressure',
  547. 'controllerState',
  548. 'sandLeachDifferentialPressure',
  549. 'sandLeachBackFlush',
  550. 'hardness',
  551. 'resinDifferentialPressure',
  552. 'resinRegeneration',
  553. 'residualChlorine',
  554. 'activeCarbonDifferentialPressure',
  555. 'activeCarbonBackFlush',
  556. 'filterReplacement',
  557. 'waterInletPressure',
  558. 'membraneInletPressure1',
  559. 'membraneDrainagePressure1',
  560. 'membraneContributingWaterPressure1',
  561. 'membraneInletPressure2',
  562. 'membraneDrainagePressure2',
  563. 'membraneContributingWaterPressure2',
  564. 'pureWaterReturnPressure',
  565. 'inletConductivity',
  566. 'contributingWaterConductivity',
  567. 'waterInflow',
  568. 'waterYield',
  569. 'wastewaterQuantity',
  570. 'waterReclamation',
  571. 'waterTemperature',
  572. 'systemDisinfection',
  573. ];