血透系统PC前端

QualityForm.vue 55KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768
  1. <template>
  2. <div id="quality-form">
  3. <el-row class="row">
  4. <el-col :span="4">
  5. <span class="machineClass">机号:</span>
  6. <el-select style="width:100px" v-model="forms.bed">
  7. <el-option
  8. v-for="item in this.bedNumber"
  9. :key="item.id"
  10. :label="item.number"
  11. :value="item.id"
  12. ></el-option>
  13. </el-select>
  14. </el-col>
  15. <el-col :span="6">
  16. <span class="machineClass">取样标本:</span>
  17. <el-select
  18. style="width:130px"
  19. v-model="forms.sename"
  20. @change="changeTable"
  21. >
  22. <el-option
  23. v-for="item in this.tableTypes"
  24. :key="item.id"
  25. :label="item.name"
  26. :value="item.id"
  27. ></el-option>
  28. </el-select>
  29. </el-col>
  30. <el-col :span="11">
  31. <span class="machineClass">日期查询:</span>
  32. <el-date-picker
  33. v-model="forms.start_time"
  34. prefix-icon="none"
  35. type="date"
  36. placeholder="请选择"
  37. format="yyyy-MM-dd"
  38. value-format="yyyy-MM-dd"
  39. style="width:150px"
  40. ></el-date-picker
  41. >-
  42. <el-date-picker
  43. v-model="forms.end_time"
  44. prefix-icon="none"
  45. type="date"
  46. placeholder="请选择"
  47. format="yyyy-MM-dd"
  48. value-format="yyyy-MM-dd"
  49. style="width:150px"
  50. ></el-date-picker>
  51. </el-col>
  52. <el-col :span="2">
  53. <el-button type="primary" @click="queryTable()">查询</el-button>
  54. </el-col>
  55. <!-- <el-col :span="2">
  56. <el-button>打印</el-button>
  57. </el-col>-->
  58. </el-row>
  59. <el-row style="display: flex;align-items: center;">
  60. <el-col :span="2">
  61. <el-checkbox v-model="checkAllStatus" @change="changeCheck"
  62. >全选</el-checkbox
  63. >
  64. </el-col>
  65. <el-col :span="3">
  66. <el-button size="small" @click="BatchDelete" v-show="show"
  67. >批量删除</el-button
  68. >
  69. <el-button size="small" @click="BatchDeleteOne" v-show="showOne"
  70. >批量删除</el-button
  71. >
  72. <el-button size="small" @click="BatchDeleteTwo" v-show="showTwo"
  73. >批量删除</el-button
  74. >
  75. </el-col>
  76. </el-row>
  77. <el-row>
  78. <!-- 细菌培养表 -->
  79. <el-table
  80. ref="multipleTable"
  81. @selection-change="handleSelectionChange"
  82. :row-style="{ color: '#303133' }"
  83. :header-cell-style="{
  84. backgroundColor: 'rgb(245, 247, 250)',
  85. color: '#606266'
  86. }"
  87. :data="tableData"
  88. border
  89. fit
  90. highlight-current-row
  91. style="width: 100%;margin-top: 10px;"
  92. v-show="show"
  93. >
  94. <el-table-column
  95. align="center"
  96. type="selection"
  97. width="55"
  98. ></el-table-column>
  99. <el-table-column prop="date" label="机号" width="80" align="center">
  100. <template slot-scope="scope">{{ scope.row.bed }}</template>
  101. </el-table-column>
  102. <el-table-column
  103. prop="name"
  104. label="取样日期"
  105. width="100"
  106. align="center"
  107. >
  108. <template slot-scope="scope">
  109. {{ getTime(scope.row.speling_date) }}
  110. </template>
  111. </el-table-column>
  112. <el-table-column
  113. prop="address"
  114. label="取样标本"
  115. width="100"
  116. align="center"
  117. >
  118. <template slot-scope="scope">{{ scope.row.specimen }}</template>
  119. </el-table-column>
  120. <el-table-column
  121. prop="address"
  122. label="A浓缩液批号"
  123. width="80"
  124. align="center"
  125. >
  126. <template slot-scope="scope">
  127. {{ scope.row.concentrate_noa }}
  128. </template>
  129. </el-table-column>
  130. <el-table-column
  131. prop="address"
  132. label="B浓缩液批号"
  133. width="80"
  134. align="center"
  135. >
  136. <template slot-scope="scope">
  137. {{ scope.row.concentrate_nob }}
  138. </template>
  139. </el-table-column>
  140. <el-table-column
  141. prop="address"
  142. label="采样部位"
  143. width="100"
  144. align="center"
  145. >
  146. <template slot-scope="scope">
  147. {{ scope.row.sampling_locationa }}
  148. </template>
  149. </el-table-column>
  150. <el-table-column
  151. prop="address"
  152. label="检测单位"
  153. width="100"
  154. align="center"
  155. >
  156. <template slot-scope="scope">{{ scope.row.detection_unit }}</template>
  157. </el-table-column>
  158. <el-table-column
  159. prop="address"
  160. label="取样者"
  161. width="80"
  162. align="center"
  163. >
  164. <template slot-scope="scope">{{ scope.row.user_name }}</template>
  165. </el-table-column>
  166. <el-table-column
  167. prop="address"
  168. label="出报告日期"
  169. width="110"
  170. align="center"
  171. >
  172. <template slot-scope="scope">
  173. {{ getTime(scope.row.reporting_date) }}
  174. </template>
  175. </el-table-column>
  176. <el-table-column
  177. prop="address"
  178. label="检测结果(cfu/ml)"
  179. width="140"
  180. align="center"
  181. >
  182. <template slot-scope="scope">
  183. {{ scope.row.detection_result }}
  184. </template>
  185. </el-table-column>
  186. <el-table-column label="操作" align="center" min-width="150px">
  187. <template slot-scope="scope">
  188. <el-tooltip
  189. class="item"
  190. effect="dark"
  191. content="编辑"
  192. placement="top"
  193. >
  194. <el-button
  195. size="mini"
  196. type="primary"
  197. icon="el-icon-edit-outline"
  198. @click="
  199. EditCulture(scope.row.id, scope.row.sampler, scope.$index)
  200. "
  201. ></el-button>
  202. </el-tooltip>
  203. <el-tooltip
  204. class="item"
  205. effect="dark"
  206. content="删除"
  207. placement="top"
  208. >
  209. <el-button
  210. size="mini"
  211. type="danger"
  212. icon="el-icon-delete"
  213. @click="DeleteCultrues(scope.row.id, scope.$index)"
  214. ></el-button>
  215. </el-tooltip>
  216. </template>
  217. </el-table-column>
  218. </el-table>
  219. <!-- 内霉素检测表字段 -->
  220. <el-table
  221. ref="multipleTableOne"
  222. @selection-change="handleSelectionChangeOne"
  223. :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
  224. :data="table"
  225. border
  226. fit
  227. highlight-current-row
  228. style="width: 100%;margin-top: 10px;"
  229. v-show="showOne"
  230. >
  231. <el-table-column
  232. align="center"
  233. type="selection"
  234. width="55"
  235. ></el-table-column>
  236. <el-table-column prop="date" label="机号" width="80" align="center">
  237. <template slot-scope="scope">{{ scope.row.bed }}</template>
  238. </el-table-column>
  239. <el-table-column
  240. prop="name"
  241. label="取样日期"
  242. width="100"
  243. align="center"
  244. >
  245. <template slot-scope="scope">
  246. {{ getTime(scope.row.sampling_date) }}
  247. </template>
  248. </el-table-column>
  249. <el-table-column
  250. prop="address"
  251. label="取样标本"
  252. width="100"
  253. align="center"
  254. >
  255. <template slot-scope="scope">{{ scope.row.specimenb }}</template>
  256. </el-table-column>
  257. <el-table-column
  258. prop="address"
  259. label="A浓缩液批号"
  260. width="80"
  261. align="center"
  262. >
  263. <template slot-scope="scope">
  264. {{ scope.row.concentrate_noc }}
  265. </template>
  266. </el-table-column>
  267. <el-table-column
  268. prop="address"
  269. label="B浓缩液批号"
  270. width="80"
  271. align="center"
  272. >
  273. <template slot-scope="scope">
  274. {{ scope.row.concentrateb_nod }}
  275. </template>
  276. </el-table-column>
  277. <el-table-column
  278. prop="address"
  279. label="采样部位"
  280. width="100"
  281. align="center"
  282. >
  283. <template slot-scope="scope">
  284. {{ scope.row.sampling_locationb }}
  285. </template>
  286. </el-table-column>
  287. <el-table-column
  288. prop="address"
  289. label="检测单位"
  290. width="100"
  291. align="center"
  292. >
  293. <template slot-scope="scope">{{ scope.row.detection_unit }}</template>
  294. </el-table-column>
  295. <el-table-column
  296. prop="address"
  297. label="取样者"
  298. width="80"
  299. align="center"
  300. >
  301. <template slot-scope="scope">{{ scope.row.user_name }}</template>
  302. </el-table-column>
  303. <el-table-column
  304. prop="address"
  305. label="出报告日期"
  306. width="110"
  307. align="center"
  308. >
  309. <template slot-scope="scope">
  310. {{ getTime(scope.row.reporting_dateb) }}
  311. </template>
  312. </el-table-column>
  313. <el-table-column
  314. prop="address"
  315. label="检测结果(cfu/ml)"
  316. width="100"
  317. align="center"
  318. >
  319. <template slot-scope="scope">
  320. {{ scope.row.detection_resultb }}
  321. </template>
  322. </el-table-column>
  323. <el-table-column label="操作" align="center" min-width="150px">
  324. <template slot-scope="scope">
  325. <el-tooltip
  326. class="item"
  327. effect="dark"
  328. content="编辑"
  329. placement="top"
  330. >
  331. <el-button
  332. size="mini"
  333. type="primary"
  334. icon="el-icon-edit-outline"
  335. @click="EditDialyState(scope.row.id, scope.$index)"
  336. ></el-button>
  337. </el-tooltip>
  338. <el-tooltip
  339. class="item"
  340. effect="dark"
  341. content="删除"
  342. placement="top"
  343. >
  344. <el-button
  345. size="mini"
  346. type="primary"
  347. icon="el-icon-delete"
  348. @click="DeleteDialystates(scope.row.id, scope.$index)"
  349. ></el-button>
  350. </el-tooltip>
  351. </template>
  352. </el-table-column>
  353. </el-table>
  354. <!-- 透析液离子浓度检测 -->
  355. <el-table
  356. ref="multipleTableTwo"
  357. @selection-change="handleSelectionChangeTwo"
  358. :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
  359. :data="tableDatas"
  360. border
  361. fit
  362. highlight-current-row
  363. style="width: 100%;margin-top: 10px;"
  364. v-show="showTwo"
  365. >
  366. <el-table-column
  367. align="center"
  368. type="selection"
  369. width="55"
  370. ></el-table-column>
  371. <el-table-column prop="date" label="机号" width="80" align="center">
  372. <template slot-scope="scope">{{ scope.row.bed }}</template>
  373. </el-table-column>
  374. <el-table-column prop="name" label="取样日期" width="80" align="center">
  375. <template slot-scope="scope">
  376. {{ getTime(scope.row.sampling_date) }}
  377. </template>
  378. </el-table-column>
  379. <el-table-column
  380. prop="address"
  381. label="取样者"
  382. width="80"
  383. align="center"
  384. >
  385. <template slot-scope="scope">{{ scope.row.user_name }}</template>
  386. </el-table-column>
  387. <el-table-column
  388. prop="address"
  389. label="检测单位"
  390. width="80"
  391. align="center"
  392. >
  393. <template slot-scope="scope">{{ scope.row.detection_unit }}</template>
  394. </el-table-column>
  395. <el-table-column
  396. prop="address"
  397. label="A浓缩液批号"
  398. width="80"
  399. align="center"
  400. >
  401. <template slot-scope="scope">
  402. {{ scope.row.concentrate_nof }}
  403. </template>
  404. </el-table-column>
  405. <el-table-column
  406. prop="address"
  407. label="B浓缩液批号"
  408. width="80"
  409. align="center"
  410. >
  411. <template slot-scope="scope">
  412. {{ scope.row.concentrate_nog }}
  413. </template>
  414. </el-table-column>
  415. <el-table-column
  416. prop="address"
  417. label="出报告日期"
  418. width="80"
  419. align="center"
  420. >
  421. <template slot-scope="scope">
  422. {{ getTime(scope.row.date_reportc) }}
  423. </template>
  424. </el-table-column>
  425. <el-table-column
  426. prop="address"
  427. label="检测结果"
  428. width="80"
  429. align="center"
  430. >
  431. <el-table-column
  432. prop="address"
  433. label="实际Na⁺(mmol/L)"
  434. width="80"
  435. align="center"
  436. >
  437. <template slot-scope="scope">{{ scope.row.actual_na }}</template>
  438. </el-table-column>
  439. <el-table-column
  440. prop="address"
  441. label="配方Na⁺(mmol/L)"
  442. width="90"
  443. align="center"
  444. >
  445. <template slot-scope="scope">{{ scope.row.actual_pna }}</template>
  446. </el-table-column>
  447. <el-table-column
  448. prop="address"
  449. label="K⁺(mmol/L)"
  450. width="80"
  451. align="center"
  452. >
  453. <template slot-scope="scope">{{ scope.row.actual_k }}</template>
  454. </el-table-column>
  455. <el-table-column
  456. prop="address"
  457. label="Ca2⁺(mmol/L)"
  458. width="80"
  459. align="center"
  460. >
  461. <template slot-scope="scope">{{ scope.row.actual_ca }}</template>
  462. </el-table-column>
  463. <el-table-column
  464. prop="address"
  465. label="Cl¯(mmol/L)"
  466. width="80"
  467. align="center"
  468. >
  469. <template slot-scope="scope">{{ scope.row.actual_ci }}</template>
  470. </el-table-column>
  471. <el-table-column
  472. prop="address"
  473. label="HCO3¯(mmol/L)"
  474. width="80"
  475. align="center"
  476. >
  477. <template slot-scope="scope">{{ scope.row.actual_hco }}</template>
  478. </el-table-column>
  479. <el-table-column
  480. prop="address"
  481. label="Mg2⁺(mmol/L)"
  482. width="80"
  483. align="center"
  484. >
  485. <template slot-scope="scope">{{ scope.row.actual_mg }}</template>
  486. </el-table-column>
  487. <el-table-column
  488. prop="address"
  489. label="PH(mmol/L)"
  490. width="80"
  491. align="center"
  492. >
  493. <template slot-scope="scope">{{ scope.row.actual_ph }}</template>
  494. </el-table-column>
  495. </el-table-column>
  496. <el-table-column prop="address" label="备注" width="80" align="center">
  497. <template slot-scope="scope">{{ scope.row.remakes }}</template>
  498. </el-table-column>
  499. <el-table-column label="操作" align="center" min-width="150px">
  500. <template slot-scope="scope">
  501. <el-tooltip
  502. class="item"
  503. effect="dark"
  504. content="编辑"
  505. placement="top"
  506. >
  507. <el-button
  508. size="mini"
  509. type="primary"
  510. icon="el-icon-edit-outline"
  511. @click="EditIon(scope.row.id, scope.$index)"
  512. ></el-button>
  513. </el-tooltip>
  514. <el-tooltip
  515. class="item"
  516. effect="dark"
  517. content="删除"
  518. placement="top"
  519. >
  520. <el-button
  521. size="mini"
  522. type="primary"
  523. icon="el-icon-delete"
  524. @click="DeleteIons(scope.row.id, scope.$index)"
  525. ></el-button>
  526. </el-tooltip>
  527. </template>
  528. </el-table-column>
  529. </el-table>
  530. </el-row>
  531. <!-- 编辑细菌培养 -->
  532. <el-dialog
  533. title="细菌培养"
  534. :visible.sync="dialogVisible"
  535. width="60%"
  536. center
  537. >
  538. <el-form :model="form" ref="form" :rules="rules">
  539. <el-row>
  540. <el-col :span="8">
  541. <el-form-item label="取样日期:">
  542. <el-date-picker
  543. v-model="form.date"
  544. prefix-icon="none"
  545. type="date"
  546. placeholder="请选择"
  547. format="yyyy-MM-dd"
  548. value-format="yyyy-MM-dd"
  549. style="width:150px"
  550. ></el-date-picker>
  551. </el-form-item>
  552. </el-col>
  553. <el-col :span="8">
  554. <el-form-item label="取样标本:">
  555. <el-select
  556. style="width:130px"
  557. v-model="form.specimen"
  558. @change="changeSpecimen"
  559. >
  560. <el-option
  561. v-for="item in samplingSpecimen"
  562. :key="item.id"
  563. :label="item.name"
  564. :value="item.id"
  565. ></el-option>
  566. </el-select>
  567. </el-form-item>
  568. </el-col>
  569. <el-col :span="8">
  570. <el-form-item label="A浓缩液批号:">
  571. <el-input
  572. style="width:130px"
  573. v-model="form.concentrate_noa"
  574. :disabled="disable"
  575. ></el-input>
  576. </el-form-item>
  577. </el-col>
  578. </el-row>
  579. <el-row>
  580. <el-col :span="8">
  581. <el-form-item label="B浓缩液批号">
  582. <el-input
  583. style="width:130px"
  584. v-model="form.concentrate_nob"
  585. :disabled="diableTwo"
  586. ></el-input>
  587. </el-form-item>
  588. </el-col>
  589. <el-col :span="8">
  590. <el-form-item label="采样部位:">
  591. <el-select style="width:130px" v-model="form.sampling_locationa">
  592. <el-option
  593. v-for="item in samplingLocation"
  594. :key="item.id"
  595. :label="item.name"
  596. :value="item.id"
  597. ></el-option>
  598. </el-select>
  599. </el-form-item>
  600. </el-col>
  601. <el-col :span="8">
  602. <el-form-item label="检测单位:" required prop="detection_unit">
  603. <el-input
  604. style="width:180px"
  605. v-model="form.detection_unit"
  606. ></el-input>
  607. </el-form-item>
  608. </el-col>
  609. </el-row>
  610. <el-row>
  611. <el-col :span="8">
  612. <el-form-item label="取样者:" required prop="sampler">
  613. <el-select style="width:130px" v-model="form.sampler">
  614. <el-option
  615. v-for="item in sampling"
  616. :key="item.admin_user_id"
  617. :label="item.user_name"
  618. :value="item.admin_user_id"
  619. ></el-option>
  620. </el-select>
  621. </el-form-item>
  622. </el-col>
  623. <el-col :span="8">
  624. <el-form-item label="出报告日期:">
  625. <el-date-picker
  626. v-model="form.reporting_date"
  627. prefix-icon="none"
  628. type="date"
  629. placeholder="请选择"
  630. format="yyyy-MM-dd"
  631. value-format="yyyy-MM-dd"
  632. style="width:150px"
  633. ></el-date-picker>
  634. </el-form-item>
  635. </el-col>
  636. </el-row>
  637. <el-row>
  638. <el-col :span="24" class="result">
  639. <el-form-item label="检测结果:(cfu/ml)">
  640. <el-input
  641. type="textarea"
  642. :rows="2"
  643. placeholder="请输入内容"
  644. style="width:600px"
  645. v-model="form.detection_result"
  646. ></el-input>
  647. </el-form-item>
  648. </el-col>
  649. </el-row>
  650. </el-form>
  651. <span slot="footer" class="dialog-footer">
  652. <el-button @click="dialogVisible = false">取 消</el-button>
  653. <el-button type="primary" @click="UpdateCulture('form')"
  654. >保存</el-button
  655. >
  656. </span>
  657. </el-dialog>
  658. <!-- 编辑内霉素检测 -->
  659. <el-dialog
  660. title="内霉素检测"
  661. :visible.sync="dialogVisibleTwo"
  662. width="60%"
  663. center
  664. >
  665. <el-form :model="diaForm" ref="diaForm" rules="diaRules">
  666. <el-row>
  667. <el-col :span="8">
  668. <el-form-item label="取样日期:">
  669. <el-date-picker
  670. v-model="diaForm.sampling_date"
  671. prefix-icon="none"
  672. type="date"
  673. placeholder="请选择"
  674. format="yyyy-MM-dd"
  675. value-format="yyyy-MM-dd"
  676. style="width:150px"
  677. ></el-date-picker>
  678. </el-form-item>
  679. </el-col>
  680. <el-col :span="8">
  681. <el-form-item label="取样标本:">
  682. <el-select
  683. style="width:130px"
  684. v-model="diaForm.specimenb"
  685. @change="changeSpeciment"
  686. >
  687. <el-option
  688. v-for="item in samplingSpecimen"
  689. :key="item.id"
  690. :label="item.name"
  691. :value="item.id"
  692. ></el-option>
  693. </el-select>
  694. </el-form-item>
  695. </el-col>
  696. <el-col :span="8">
  697. <el-form-item label="A浓缩液批号:">
  698. <el-input
  699. style="width:130px"
  700. v-model="diaForm.concentrate_noc"
  701. :disabled="disable"
  702. ></el-input>
  703. </el-form-item>
  704. </el-col>
  705. </el-row>
  706. <el-row>
  707. <el-col :span="8">
  708. <el-form-item label="B浓缩液批号:">
  709. <el-input
  710. style="width:130px"
  711. v-model="diaForm.concentrateb_nod"
  712. :disabled="diableTwo"
  713. ></el-input>
  714. </el-form-item>
  715. </el-col>
  716. <el-col :span="8">
  717. <el-form-item label="采样部位:">
  718. <el-select
  719. style="width:130px"
  720. v-model="diaForm.sampling_locationb"
  721. >
  722. <el-option
  723. v-for="item in samplingLocation"
  724. :key="item.id"
  725. :label="item.name"
  726. :value="item.id"
  727. ></el-option>
  728. </el-select>
  729. </el-form-item>
  730. </el-col>
  731. <el-col :span="8">
  732. <el-form-item label="检测单位:" required prop="detection_unit">
  733. <el-input
  734. style="width:180px"
  735. v-model="diaForm.detection_unit"
  736. ></el-input>
  737. </el-form-item>
  738. </el-col>
  739. </el-row>
  740. <el-row>
  741. <el-col :span="8">
  742. <el-form-item label="取样者:" required prop="samplerb">
  743. <el-select style="width:130px" v-model="diaForm.samplerb">
  744. <el-option
  745. v-for="item in sampling"
  746. :key="item.admin_user_id"
  747. :label="item.user_name"
  748. :value="item.admin_user_id"
  749. ></el-option>
  750. </el-select>
  751. </el-form-item>
  752. </el-col>
  753. <el-col :span="8">
  754. <el-form-item label="出报告日期:">
  755. <el-date-picker
  756. v-model="diaForm.reporting_dateb"
  757. prefix-icon="none"
  758. type="date"
  759. placeholder="请选择"
  760. format="yyyy-MM-dd"
  761. value-format="yyyy-MM-dd"
  762. style="width:150px"
  763. ></el-date-picker>
  764. </el-form-item>
  765. </el-col>
  766. </el-row>
  767. <el-row>
  768. <el-col :span="24">
  769. <el-form-item label="检测结果:(cfu/ml)">
  770. <el-input
  771. type="textarea"
  772. :rows="2"
  773. placeholder="请输入内容"
  774. style="width:600px"
  775. v-model="diaForm.detection_resultb"
  776. ></el-input>
  777. </el-form-item>
  778. </el-col>
  779. </el-row>
  780. </el-form>
  781. <span slot="footer" class="dialog-footer">
  782. <el-button @click="dialogVisibleTwo = false">取 消</el-button>
  783. <el-button type="primary" @click="UpdateDialyState('diaForm')"
  784. >保存</el-button
  785. >
  786. </span>
  787. </el-dialog>
  788. <!-- -->
  789. <el-dialog
  790. title="透析液离子浓度检测"
  791. :visible.sync="dialogVisibleThree"
  792. width="50%"
  793. center
  794. >
  795. <el-row>
  796. <el-form :model="ionForm" ref="ionForm" :rule="ionrule">
  797. <el-row>
  798. <el-col :span="8">
  799. <el-form-item label="取样日期:">
  800. <el-date-picker
  801. v-model="ionForm.dateb"
  802. prefix-icon="none"
  803. type="date"
  804. placeholder="请选择"
  805. format="yyyy-MM-dd"
  806. value-format="yyyy-MM-dd"
  807. style="width:150px"
  808. ></el-date-picker>
  809. </el-form-item>
  810. </el-col>
  811. <el-col :span="8">
  812. <el-form-item label="取样者:" required prop="samplerc">
  813. <el-select style="width:130px" v-model="ionForm.samplerc">
  814. <el-option
  815. v-for="item in sampling"
  816. :key="item.admin_user_id"
  817. :label="item.user_name"
  818. :value="item.admin_user_id"
  819. ></el-option>
  820. </el-select>
  821. </el-form-item>
  822. </el-col>
  823. <el-col :span="8">
  824. <el-form-item label="检测单位:" required prop="detection_unit">
  825. <el-input
  826. style="width:180px"
  827. v-model="ionForm.detection_unit"
  828. ></el-input>
  829. </el-form-item>
  830. </el-col>
  831. </el-row>
  832. <el-row>
  833. <el-col :span="8">
  834. <el-form-item label="A浓缩液批号:">
  835. <el-input
  836. style="width:130px"
  837. v-model="ionForm.concentrate_nof"
  838. ></el-input>
  839. </el-form-item>
  840. </el-col>
  841. <el-col :span="8">
  842. <el-form-item label="B浓缩液批号:">
  843. <el-input
  844. style="width:130px"
  845. v-model="ionForm.concentrate_nog"
  846. ></el-input>
  847. </el-form-item>
  848. </el-col>
  849. <el-col :span="8">
  850. <el-form-item label="出报告日期:">
  851. <el-date-picker
  852. v-model="ionForm.date_reportc"
  853. prefix-icon="none"
  854. type="date"
  855. placeholder="请选择"
  856. format="yyyy-MM-dd"
  857. value-format="yyyy-MM-dd"
  858. style="width:150px"
  859. ></el-date-picker>
  860. </el-form-item>
  861. </el-col>
  862. </el-row>
  863. <el-row>
  864. <el-col :span="8">
  865. <el-form-item label="实际Na⁺(mmol/L):">
  866. <el-input
  867. style="width:100px"
  868. v-model="ionForm.actual_na"
  869. ></el-input>
  870. </el-form-item>
  871. </el-col>
  872. <el-col :span="8">
  873. <el-form-item label="配方Na⁺(mmol/L):">
  874. <el-input
  875. style="width:100px"
  876. v-model="ionForm.actual_pna"
  877. ></el-input>
  878. </el-form-item>
  879. </el-col>
  880. <el-col :span="8">
  881. <el-form-item label="K⁺ (mmol/L):">
  882. <el-input
  883. style="width:100px"
  884. v-model="ionForm.actual_k"
  885. ></el-input>
  886. </el-form-item>
  887. </el-col>
  888. </el-row>
  889. <el-row>
  890. <el-col :span="8">
  891. <el-form-item label="Ca2⁺(mmol/L):">
  892. <el-input
  893. style="width:100px"
  894. v-model="ionForm.actual_ca"
  895. ></el-input>
  896. </el-form-item>
  897. </el-col>
  898. <el-col :span="8">
  899. <el-form-item label="CI¯(mmol/L):">
  900. <el-input
  901. style="width:100px"
  902. v-model="ionForm.actual_ci"
  903. ></el-input>
  904. </el-form-item>
  905. </el-col>
  906. <el-col :span="8">
  907. <el-form-item label="HCO3¯(mmol/L):">
  908. <el-input
  909. style="width:100px"
  910. v-model="ionForm.actual_hco"
  911. ></el-input>
  912. </el-form-item>
  913. </el-col>
  914. </el-row>
  915. <el-row>
  916. <el-col :span="8">
  917. <el-form-item label="Mg2⁺(mmol/L):">
  918. <el-input
  919. style="width:100px"
  920. v-model="ionForm.actual_mg"
  921. ></el-input>
  922. </el-form-item>
  923. </el-col>
  924. <el-col :span="8">
  925. <el-form-item label="PH:">
  926. <el-input
  927. style="width:100px"
  928. v-model="ionForm.actual_ph"
  929. ></el-input>
  930. </el-form-item>
  931. </el-col>
  932. </el-row>
  933. <el-row>
  934. <el-col :span="24">
  935. <el-form-item label="备注:">
  936. <el-input
  937. type="textarea"
  938. :rows="2"
  939. placeholder="请输入内容"
  940. style="width:500px"
  941. v-model="ionForm.remakes"
  942. ></el-input>
  943. </el-form-item>
  944. </el-col>
  945. </el-row>
  946. </el-form>
  947. </el-row>
  948. <span slot="footer" class="dialog-footer">
  949. <el-button @click="dialogVisibleThree = false">取 消</el-button>
  950. <el-button type="primary" @click="UpdateIon('ionForm')">保存</el-button>
  951. </span>
  952. </el-dialog>
  953. </div>
  954. </template>
  955. <script>
  956. import {
  957. getAllSubregion,
  958. getAllQulityInfo,
  959. EditCulture,
  960. UpdateCulture,
  961. getAllOrganization,
  962. DeleteCultrue,
  963. EditDialyState,
  964. UpdateDialyState,
  965. DeleteDialystate,
  966. EditIon,
  967. UpdateIon,
  968. DeleteIon,
  969. queryTable,
  970. DeleteCultrues,
  971. DeleteDialystates,
  972. DeleteIons
  973. } from "@/api/manage";
  974. import { uParseTime } from "@/utils/tools";
  975. export default {
  976. name: "QualityForm",
  977. data() {
  978. return {
  979. isIndeterminate: false,
  980. checkAllStatus: false,
  981. beds: [],
  982. forms: {
  983. bed: "",
  984. sename: 1,
  985. start_time: "",
  986. end_time: ""
  987. },
  988. tableData: [],
  989. table: [],
  990. tableDatas: [],
  991. show: true,
  992. showOne: false,
  993. showTwo: false,
  994. bedNumber: [],
  995. tableTypes: [
  996. { id: 1, name: "细菌培养" },
  997. { id: 2, name: "内霉素检测" },
  998. { id: 3, name: "透析液离子浓度检测" }
  999. ],
  1000. dialogVisible: false,
  1001. dialogVisibleTwo: false,
  1002. dialogVisibleThree: false,
  1003. disable: true,
  1004. diableTwo: true,
  1005. form: {
  1006. id: "",
  1007. date: "",
  1008. specimen: "",
  1009. concentrate_noa: "",
  1010. concentrate_nob: "",
  1011. sampling_locationa: "",
  1012. detection_unit: "",
  1013. sampler: "",
  1014. reporting_date: "",
  1015. detection_result: ""
  1016. },
  1017. diaForm: {
  1018. id: "",
  1019. sampling_date: "",
  1020. specimenb: "",
  1021. concentrate_noc: "",
  1022. concentrateb_nod: "",
  1023. sampling_locationb: "",
  1024. detection_unit: "",
  1025. samplerb: "",
  1026. reporting_dateb: "",
  1027. detection_resultb: ""
  1028. },
  1029. sampling: [],
  1030. samplingSpecimen: [
  1031. { id: 0, name: "请选择" },
  1032. { id: 1, name: "透析液" },
  1033. { id: 2, name: "A浓缩液" },
  1034. { id: 3, name: "B浓缩液" },
  1035. { id: 4, name: "置换液" },
  1036. { id: 5, name: "透析用水" }
  1037. ],
  1038. samplingLocation: [
  1039. { id: 0, name: "请选择" },
  1040. { id: 1, name: "透析液入口" },
  1041. { id: 2, name: "透析液取样口" },
  1042. { id: 3, name: "置换液出口" },
  1043. { id: 4, name: "透析机反渗水入口" }
  1044. ],
  1045. rules: {
  1046. detection_unit: [{ required: true, message: "请填写检测单位" }],
  1047. sampler: [{ required: true, message: "请填写取样者" }]
  1048. },
  1049. diaRules: {
  1050. detection_unit: [{ required: true, message: "请填写检测单位" }],
  1051. samplerb: [{ required: true, message: "请填写取样者" }]
  1052. },
  1053. ionrule: {
  1054. detection_unit: [{ required: true, message: "请填写检测单位" }],
  1055. samplerc: [{ required: true, message: "请填写取样者" }]
  1056. },
  1057. selectCulture: [],
  1058. ionForm: {
  1059. dateb: "",
  1060. samplerc: "",
  1061. detection_unit: "",
  1062. concentrate_nof: "",
  1063. concentrate_nog: "",
  1064. date_reportc: "",
  1065. actual_na: "",
  1066. actual_pna: "",
  1067. actual_k: "",
  1068. actual_ca: "",
  1069. actual_ci: "",
  1070. actual_hco: "",
  1071. actual_mg: "",
  1072. actual_ph: ""
  1073. }
  1074. };
  1075. },
  1076. methods: {
  1077. changeCheck() {
  1078. this.$refs.multipleTable.clearSelection();
  1079. if (this.checkAllStatus) {
  1080. this.$refs.multipleTable.toggleAllSelection();
  1081. }
  1082. this.$refs.multipleTableOne.clearSelection();
  1083. if (this.checkAllStatus) {
  1084. this.$refs.multipleTableOne.toggleAllSelection();
  1085. }
  1086. this.$refs.multipleTableTwo.clearSelection();
  1087. if (this.checkAllStatus) {
  1088. this.$refs.multipleTableTwo.toggleAllSelection();
  1089. }
  1090. },
  1091. handleSelectionChange(val) {
  1092. this.selectCulture = val;
  1093. },
  1094. handleSelectionChangeOne(val) {
  1095. this.selectCulture = val;
  1096. },
  1097. handleSelectionChangeTwo(val) {
  1098. this.selectCulture = val;
  1099. },
  1100. getAllSubregion() {
  1101. getAllSubregion().then(response => {
  1102. var zones = response.data.data.zones;
  1103. var numbers = response.data.data.numbers;
  1104. var number = [{ id: 0, number: "全部" }];
  1105. for (let index = 0; index < numbers.length; index++) {
  1106. const item = numbers[index];
  1107. number.push({ id: item.id, number: item.number });
  1108. }
  1109. this.bedNumber = number;
  1110. });
  1111. },
  1112. getAllQulityInfo() {
  1113. getAllQulityInfo().then(response => {
  1114. if (response.data.state === 1) {
  1115. var cultures = response.data.data.cultures;
  1116. // console.log('cultures', cultures)
  1117. for (let index = 0; index < cultures.length; index++) {
  1118. if (cultures[index].specimen === 0) {
  1119. cultures[index].specimen = "";
  1120. }
  1121. if (cultures[index].specimen === 1) {
  1122. cultures[index].specimen = "透析液";
  1123. }
  1124. if (cultures[index].specimen === 2) {
  1125. cultures[index].specimen = "A浓缩液";
  1126. }
  1127. if (cultures[index].specimen === 3) {
  1128. cultures[index].specimen = "B浓缩液";
  1129. }
  1130. if (cultures[index].specimen === 4) {
  1131. cultures[index].specimen = "置换液";
  1132. }
  1133. if (cultures[index].specimen === 5) {
  1134. cultures[index].specimen = "透析用水";
  1135. }
  1136. if (cultures[index].sampling_locationa === 0) {
  1137. cultures[index].sampling_locationa = "";
  1138. }
  1139. if (cultures[index].sampling_locationa === 1) {
  1140. cultures[index].sampling_locationa = "透析液入口";
  1141. }
  1142. if (cultures[index].sampling_locationa === 2) {
  1143. cultures[index].sampling_locationa = "透析液取样口";
  1144. }
  1145. if (cultures[index].sampling_locationa === 3) {
  1146. cultures[index].sampling_locationa = "置换液出口";
  1147. }
  1148. if (cultures[index].sampling_locationa === 4) {
  1149. cultures[index].sampling_locationa = "透析机反渗水入口";
  1150. }
  1151. }
  1152. this.tableData = cultures;
  1153. var dialyste = response.data.data.dialysate;
  1154. // console.log('dialyste', dialyste)
  1155. for (let index = 0; index < dialyste.length; index++) {
  1156. if (dialyste[index].specimenb === 0) {
  1157. dialyste[index].specimenb = "";
  1158. }
  1159. if (dialyste[index].specimenb === 1) {
  1160. dialyste[index].specimenb = "透析液";
  1161. }
  1162. if (dialyste[index].specimenb === 2) {
  1163. dialyste[index].specimenb = "A浓缩液";
  1164. }
  1165. if (dialyste[index].specimenb === 3) {
  1166. dialyste[index].specimenb = "B浓缩液";
  1167. }
  1168. if (dialyste[index].specimenb === 4) {
  1169. dialyste[index].specimenb = "置换液";
  1170. }
  1171. if (dialyste[index].specimenb === 5) {
  1172. dialyste[index].specimenb = "透析用水";
  1173. }
  1174. if (dialyste[index].sampling_locationb === 0) {
  1175. dialyste[index].sampling_locationb = "";
  1176. }
  1177. if (dialyste[index].sampling_locationb === 1) {
  1178. dialyste[index].sampling_locationb = "透析液入口";
  1179. }
  1180. if (dialyste[index].sampling_locationb === 2) {
  1181. dialyste[index].sampling_locationb = "透析液取样口";
  1182. }
  1183. if (dialyste[index].sampling_locationb === 3) {
  1184. dialyste[index].sampling_locationb = "置换液出口";
  1185. }
  1186. if (dialyste[index].sampling_locationb === 4) {
  1187. dialyste[index].sampling_locationb = "透析机反渗水入口";
  1188. }
  1189. }
  1190. this.table = dialyste;
  1191. var ions = response.data.data.ions;
  1192. // console.log('ions', ions)
  1193. this.tableDatas = ions;
  1194. }
  1195. });
  1196. },
  1197. changeSpecimen(val) {
  1198. if (val === 0) {
  1199. this.disable = false;
  1200. this.diableTwo = false;
  1201. }
  1202. if (val === 1) {
  1203. this.diableTwo = false;
  1204. this.disable = false;
  1205. }
  1206. if (val === 2) {
  1207. this.diableTwo = true;
  1208. this.disable = false;
  1209. }
  1210. if (val === 3) {
  1211. this.disable = true;
  1212. this.diableTwo = false;
  1213. }
  1214. if (val === 4) {
  1215. this.disable = false;
  1216. this.diableTwo = false;
  1217. }
  1218. if (val === 5) {
  1219. this.disable = false;
  1220. this.diableTwo = false;
  1221. }
  1222. },
  1223. changeSpeciment(val) {
  1224. if (val === 0) {
  1225. this.disable = false;
  1226. this.diableTwo = false;
  1227. }
  1228. if (val === 1) {
  1229. this.disable = false;
  1230. this.diableTwo = false;
  1231. }
  1232. if (val === 2) {
  1233. this.diableTwo = true;
  1234. this.disable = false;
  1235. }
  1236. if (val === 3) {
  1237. this.disable = true;
  1238. this.diableTwo = false;
  1239. }
  1240. if (val === 4) {
  1241. this.disable = false;
  1242. this.diableTwo = false;
  1243. }
  1244. if (val === 5) {
  1245. this.disable = false;
  1246. this.diableTwo = false;
  1247. }
  1248. },
  1249. changeTable(val) {
  1250. if (val === 1) {
  1251. this.showOne = false;
  1252. this.showTwo = false;
  1253. this.show = true;
  1254. }
  1255. if (val === 2) {
  1256. this.showOne = true;
  1257. this.show = false;
  1258. this.showTwo = false;
  1259. }
  1260. if (val === 3) {
  1261. this.showTwo = true;
  1262. this.show = false;
  1263. this.showOne = false;
  1264. }
  1265. },
  1266. getTime(time) {
  1267. if (time < 0) {
  1268. return "";
  1269. }
  1270. return uParseTime(time, "{y}-{m}-{d}");
  1271. },
  1272. getAllOrganization() {
  1273. getAllOrganization().then(response => {
  1274. if (response.data.state === 1) {
  1275. var approle = response.data.data.approle;
  1276. this.sampling = approle;
  1277. }
  1278. });
  1279. },
  1280. EditCulture(id, userid) {
  1281. this.dialogVisible = true;
  1282. if (this.form.specimen === "") {
  1283. this.form.specimen = 0;
  1284. }
  1285. var specimens = this.form.specimen;
  1286. var specimen = parseInt(specimens);
  1287. this.form.specimen = specimen;
  1288. if (this.form.locationa === "") {
  1289. this.form.specimen = 0;
  1290. }
  1291. var locationa = this.form.sampling_locationa;
  1292. var location = parseInt(locationa);
  1293. this.form.locationa = location;
  1294. EditCulture(id, userid).then(response => {
  1295. if (response.data.state === 1) {
  1296. var culture = response.data.data.culture;
  1297. // console.log('禁用', culture)
  1298. var role = response.data.data.role;
  1299. // console.log('role', role)
  1300. this.form.id = culture.id;
  1301. // eslint-disable-next-line no-undef
  1302. this.form.date = this.getTime(culture.speling_date);
  1303. this.form.specimen = culture.specimen;
  1304. if (this.form.specimen === 0) {
  1305. this.disable = false;
  1306. this.diableTwo = false;
  1307. }
  1308. if (this.form.specimen === 1) {
  1309. this.disable = false;
  1310. this.diableTwo = false;
  1311. }
  1312. if (this.form.specimen === 2) {
  1313. this.disable = false;
  1314. this.diableTwo = true;
  1315. }
  1316. if (this.form.specimen === 3) {
  1317. this.diableTwo = false;
  1318. this.disable = true;
  1319. }
  1320. if (this.form.specimen === 4) {
  1321. this.disable = false;
  1322. this.diableTwo = false;
  1323. }
  1324. if (this.form.specimen === 5) {
  1325. this.disable = false;
  1326. this.diableTwo = false;
  1327. }
  1328. this.form.concentrate_noa = culture.concentrate_noa;
  1329. this.form.concentrate_nob = culture.concentrate_nob;
  1330. this.form.sampling_locationa = culture.sampling_locationa;
  1331. this.form.detection_unit = culture.detection_unit;
  1332. this.form.sampler = culture.sampler;
  1333. this.form.reporting_date = this.getTime(culture.reporting_date);
  1334. this.form.detection_result = culture.detection_result;
  1335. }
  1336. });
  1337. },
  1338. UpdateCulture(formName) {
  1339. this.$refs[formName].validate(valid => {
  1340. if (valid) {
  1341. UpdateCulture(this.form).then(response => {
  1342. if (response.data.state === 1) {
  1343. var culture = response.data.data.culture;
  1344. this.$message.success("修改成功");
  1345. this.dialogVisible = false;
  1346. this.getAllQulityInfo();
  1347. }
  1348. });
  1349. }
  1350. });
  1351. },
  1352. BatchDelete() {
  1353. if (this.selectCulture.length == 0) {
  1354. this.$message.error("请选择要删除的信息");
  1355. return false;
  1356. }
  1357. this.$confirm(
  1358. "确认要删除所选记录吗? <br>删除后,该信息将无法恢复",
  1359. "删除提示",
  1360. {
  1361. dangerouslyUseHTMLString: true,
  1362. confirmButtonText: "确定",
  1363. cancelButtonText: "取消",
  1364. type: "warning"
  1365. }
  1366. ).then(() => {
  1367. var ids = [];
  1368. var idMap = {};
  1369. for (const index in this.selectCulture) {
  1370. ids.push(this.selectCulture[index].id);
  1371. idMap[this.selectCulture[index].id] = this.selectCulture[index].id;
  1372. }
  1373. DeleteCultrue({ ids: ids }).then(response => {
  1374. if (response.data.state === 1) {
  1375. var msg = response.data.data.msg;
  1376. var planDataLength = this.tableData.length;
  1377. for (let index = planDataLength - 1; index >= 0; index--) {
  1378. if (this.tableData[index].id in idMap) {
  1379. this.tableData.splice(index, 1);
  1380. }
  1381. }
  1382. this.$message.success("删除成功");
  1383. }
  1384. });
  1385. });
  1386. },
  1387. DeleteCultrues(id, index) {
  1388. this.$confirm(
  1389. "确认要删除所选记录吗? <br>删除后,该信息将无法恢复",
  1390. "删除提示",
  1391. {
  1392. dangerouslyUseHTMLString: true,
  1393. confirmButtonText: "确定",
  1394. cancelButtonText: "取消",
  1395. type: "warning"
  1396. }
  1397. ).then(() => {
  1398. DeleteCultrues(id, index).then(response => {
  1399. if (response.data.state === 1) {
  1400. var msg = response.data.data.msg;
  1401. this.tableData.splice(index, 1);
  1402. }
  1403. });
  1404. });
  1405. },
  1406. EditDialyState(id) {
  1407. this.dialogVisibleTwo = true;
  1408. EditDialyState(id).then(response => {
  1409. if (response.data.state === 1) {
  1410. var dialysate = response.data.data.dialysate;
  1411. // console.log('dialysate', dialysate)
  1412. this.diaForm.id = dialysate.id;
  1413. // eslint-disable-next-line no-undef
  1414. this.diaForm.sampling_date = this.getTime(dialysate.sampling_date);
  1415. this.diaForm.specimenb = dialysate.specimenb;
  1416. if (this.diaForm.specimenb === 0) {
  1417. this.disable = false;
  1418. this.diableTwo = false;
  1419. }
  1420. if (this.diaForm.specimenb === 1) {
  1421. this.disable = false;
  1422. this.diableTwo = false;
  1423. }
  1424. if (this.diaForm.specimenb === 2) {
  1425. this.disable = false;
  1426. this.diableTwo = true;
  1427. }
  1428. if (this.diaForm.specimenb === 3) {
  1429. this.diableTwo = false;
  1430. this.disable = true;
  1431. }
  1432. if (this.diaForm.specimenb === 4) {
  1433. this.disable = false;
  1434. this.diableTwo = false;
  1435. }
  1436. if (this.diaForm.specimenb === 5) {
  1437. this.disable = false;
  1438. this.diableTwo = false;
  1439. }
  1440. this.diaForm.concentrate_noc = dialysate.concentrate_noc;
  1441. this.diaForm.concentrateb_nod = dialysate.concentrateb_nod;
  1442. this.diaForm.sampling_locationb = dialysate.sampling_locationb;
  1443. this.diaForm.detection_unit = dialysate.detection_unit;
  1444. this.diaForm.samplerb = dialysate.samplerb;
  1445. this.diaForm.reporting_dateb = this.getTime(
  1446. dialysate.reporting_dateb
  1447. );
  1448. this.diaForm.detection_resultb = dialysate.detection_resultb;
  1449. }
  1450. });
  1451. },
  1452. UpdateDialyState(formName) {
  1453. this.$refs[formName].validate(valid => {
  1454. if (valid) {
  1455. UpdateDialyState(this.diaForm).then(response => {
  1456. if (response.data.state === 1) {
  1457. var dialyste = response.data.data.dialysate;
  1458. // console.log('dialyste', dialyste)
  1459. this.dialogVisibleTwo = false;
  1460. this.$message.success("修改成功");
  1461. this.getAllQulityInfo();
  1462. }
  1463. });
  1464. }
  1465. });
  1466. },
  1467. BatchDeleteOne() {
  1468. if (this.selectCulture.length == 0) {
  1469. this.$message.error("请选择要删除的信息");
  1470. return false;
  1471. }
  1472. this.$confirm(
  1473. "确认要删除所选记录吗? <br>删除后,该信息将无法恢复",
  1474. "删除提示",
  1475. {
  1476. dangerouslyUseHTMLString: true,
  1477. confirmButtonText: "确定",
  1478. cancelButtonText: "取消",
  1479. type: "warning"
  1480. }
  1481. ).then(() => {
  1482. var ids = [];
  1483. var idMap = {};
  1484. for (const index in this.selectCulture) {
  1485. ids.push(this.selectCulture[index].id);
  1486. idMap[this.selectCulture[index].id] = this.selectCulture[index].id;
  1487. }
  1488. DeleteDialystate({ ids: ids }).then(response => {
  1489. if (response.data.state === 1) {
  1490. var msg = response.data.data.msg;
  1491. var planDataLength = this.table.length;
  1492. for (let index = planDataLength - 1; index >= 0; index--) {
  1493. if (this.table[index].id in idMap) {
  1494. this.table.splice(index, 1);
  1495. }
  1496. }
  1497. this.$message.success("删除成功");
  1498. }
  1499. });
  1500. });
  1501. },
  1502. DeleteDialystates(id, index) {
  1503. this.$confirm(
  1504. "确认要删除所选记录吗? <br>删除后,该信息将无法恢复",
  1505. "删除提示",
  1506. {
  1507. dangerouslyUseHTMLString: true,
  1508. confirmButtonText: "确定",
  1509. cancelButtonText: "取消",
  1510. type: "warning"
  1511. }
  1512. ).then(() => {
  1513. DeleteDialystates(id, index).then(response => {
  1514. if (response.data.state === 1) {
  1515. var msg = response.data.data.msg;
  1516. this.table.splice(index, 1);
  1517. }
  1518. });
  1519. });
  1520. },
  1521. EditIon(id) {
  1522. this.dialogVisibleThree = true;
  1523. EditIon(id).then(response => {
  1524. if (response.data.state === 1) {
  1525. var ion = response.data.data.ion;
  1526. // console.log('ion', ion)
  1527. // eslint-disable-next-line no-undef
  1528. this.ionForm.dateb = this.getTime(ion.sampling_date);
  1529. this.ionForm.samplerc = ion.samplerc;
  1530. this.ionForm.detection_unit = ion.detection_unit;
  1531. this.ionForm.samplerc = ion.samplerc;
  1532. this.ionForm.concentrate_nof = ion.concentrate_nof;
  1533. this.ionForm.concentrate_nog = ion.concentrate_nog;
  1534. // eslint-disable-next-line no-undef
  1535. this.ionForm.date_reportc = this.getTime(ion.date_reportc);
  1536. this.ionForm.id = ion.id;
  1537. this.ionForm.actual_na = ion.actual_na;
  1538. this.ionForm.actual_pna = ion.actual_pna;
  1539. this.ionForm.actual_k = ion.actual_k;
  1540. this.ionForm.actual_ca = ion.actual_ca;
  1541. this.ionForm.actual_ci = ion.actual_ci;
  1542. this.ionForm.actual_hco = ion.actual_hco;
  1543. this.ionForm.actual_mg = ion.actual_mg;
  1544. this.ionForm.actual_ph = ion.actual_ph;
  1545. this.ionForm.remakes = ion.remakes;
  1546. }
  1547. });
  1548. },
  1549. UpdateIon(formName) {
  1550. this.$refs[formName].validate(valid => {
  1551. if (valid) {
  1552. UpdateIon(this.ionForm).then(response => {
  1553. if (response.data.state === 1) {
  1554. var ion = response.data.data.ion;
  1555. // console.log('ion', ion)
  1556. this.dialogVisibleThree = false;
  1557. this.$message.success("修改成功");
  1558. this.getAllQulityInfo();
  1559. }
  1560. });
  1561. }
  1562. });
  1563. },
  1564. BatchDeleteTwo() {
  1565. if (this.selectCulture.length == 0) {
  1566. this.$message.error("请选择要删除的信息");
  1567. return false;
  1568. }
  1569. this.$confirm(
  1570. "确认要删除所选的吗? <br>删除后,信息将无法恢复",
  1571. "删除提示",
  1572. {
  1573. dangerouslyUseHTMLString: true,
  1574. confirmButtonText: "确定",
  1575. cancelButtonText: "取消",
  1576. type: "warning"
  1577. }
  1578. ).then(() => {
  1579. var ids = [];
  1580. var idMap = {};
  1581. for (const index in this.selectCulture) {
  1582. ids.push(this.selectCulture[index].id);
  1583. idMap[this.selectCulture[index].id] = this.selectCulture[index].id;
  1584. }
  1585. DeleteIon({ ids: ids }).then(response => {
  1586. if (response.data.state === 1) {
  1587. var msg = response.data.data.msg;
  1588. var planDataLength = this.tableDatas.length;
  1589. for (let index = planDataLength - 1; index >= 0; index--) {
  1590. if (this.tableDatas[index].id in idMap) {
  1591. this.tableDatas.splice(index, 1);
  1592. }
  1593. }
  1594. this.$message.success("删除成功");
  1595. }
  1596. });
  1597. });
  1598. },
  1599. DeleteIons(id, index) {
  1600. this.$confirm(
  1601. "确认要删除所选的吗? <br>删除后,信息将无法恢复",
  1602. "删除提示",
  1603. {
  1604. dangerouslyUseHTMLString: true,
  1605. confirmButtonText: "确定",
  1606. cancelButtonText: "取消",
  1607. type: "warning"
  1608. }
  1609. ).then(() => {
  1610. DeleteIons(id, index).then(response => {
  1611. if (response.data.state === 1) {
  1612. var msg = response.data.data.msg;
  1613. this.tableDatas.splice(index, 1);
  1614. }
  1615. });
  1616. });
  1617. },
  1618. queryTable() {
  1619. queryTable(
  1620. this.forms.bed,
  1621. this.forms.start_time,
  1622. this.forms.end_time
  1623. ).then(response => {
  1624. if (response.data.state === 1) {
  1625. var cultures = response.data.data.cultures;
  1626. for (let index = 0; index < cultures.length; index++) {
  1627. if (cultures[index].specimen === 0) {
  1628. cultures[index].specimen = "";
  1629. }
  1630. if (cultures[index].specimen === 1) {
  1631. cultures[index].specimen = "透析液";
  1632. }
  1633. if (cultures[index].specimen === 2) {
  1634. cultures[index].specimen = "A浓缩液";
  1635. }
  1636. if (cultures[index].specimen === 3) {
  1637. cultures[index].specimen = "B浓缩液";
  1638. }
  1639. if (cultures[index].specimen === 4) {
  1640. cultures[index].specimen = "置换液";
  1641. }
  1642. if (cultures[index].specimen === 5) {
  1643. cultures[index].specimen = "透析用水";
  1644. }
  1645. if (cultures[index].sampling_locationa === 0) {
  1646. cultures[index].sampling_locationa = "";
  1647. }
  1648. if (cultures[index].sampling_locationa === 1) {
  1649. cultures[index].sampling_locationa = "透析液入口";
  1650. }
  1651. if (cultures[index].sampling_locationa === 2) {
  1652. cultures[index].sampling_locationa = "透析液取样口";
  1653. }
  1654. if (cultures[index].sampling_locationa === 3) {
  1655. cultures[index].sampling_locationa = "置换液出口";
  1656. }
  1657. if (cultures[index].sampling_locationa === 4) {
  1658. cultures[index].sampling_locationa = "透析机反渗水入口";
  1659. }
  1660. }
  1661. this.tableData = cultures;
  1662. var dialysate = response.data.data.dialysate
  1663. console.log("dialysate", dialysate);
  1664. for (let index = 0; index < dialysate.length; index++) {
  1665. if (dialysate[index].specimenb === 0) {
  1666. dialysate[index].specimenb = "";
  1667. }
  1668. if (dialysate[index].specimenb === 1) {
  1669. dialysate[index].specimenb = "透析液";
  1670. }
  1671. if (dialysate[index].specimenb === 2) {
  1672. dialysate[index].specimenb = "A浓缩液";
  1673. }
  1674. if (dialysate[index].specimenb === 3) {
  1675. dialysate[index].specimenb = "B浓缩液";
  1676. }
  1677. if (dialysate[index].specimenb === 4) {
  1678. dialysate[index].specimenb = "置换液";
  1679. }
  1680. if (dialysate[index].specimenb === 5) {
  1681. dialysate[index].specimenb = "透析用水";
  1682. }
  1683. if (dialysate[index].sampling_locationb === 0) {
  1684. dialysate[index].sampling_locationb = "";
  1685. }
  1686. if (dialysate[index].sampling_locationb === 1) {
  1687. dialysate[index].sampling_locationb = "透析液入口";
  1688. }
  1689. if (dialysate[index].sampling_locationb === 2) {
  1690. dialysate[index].sampling_locationb = "透析液取样口";
  1691. }
  1692. if (dialysate[index].sampling_locationb === 3) {
  1693. dialysate[index].sampling_locationb = "置换液出口";
  1694. }
  1695. if (dialysate[index].sampling_locationb === 4) {
  1696. dialysate[index].sampling_locationb = "透析机反渗水入口";
  1697. }
  1698. }
  1699. this.table = dialysate;
  1700. var ions = response.data.data.ions;
  1701. this.tableDatas = ions;
  1702. }
  1703. });
  1704. }
  1705. },
  1706. created() {
  1707. this.getAllSubregion();
  1708. this.getAllQulityInfo();
  1709. this.getAllOrganization();
  1710. }
  1711. };
  1712. </script>
  1713. <style scoped>
  1714. .a {
  1715. .el-col-2 {
  1716. width: 8.33333%;
  1717. margin-bottom: 20px;
  1718. }
  1719. .result {
  1720. .el-form-item__label {
  1721. width: 120px;
  1722. }
  1723. }
  1724. }
  1725. .row {
  1726. margin-bottom: 10px;
  1727. }
  1728. </style>
  1729. <style lang="scss">
  1730. .machineClass {
  1731. font-size: 14px;
  1732. }
  1733. </style>