血透系统PC前端

QualityForm.vue 44KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239
  1. <template>
  2. <div id="quality-form">
  3. <el-row>
  4. <el-col :span="2">
  5. <el-checkbox v-model="checkAllStatus" @change="changeCheck">全选</el-checkbox>
  6. </el-col>
  7. <el-col :span="3" class="a">
  8. <el-button size="small" @click="BatchDelete" v-show="show">批量删除</el-button>
  9. <el-button size="small" @click="BatchDeleteOne" v-show="showOne">批量删除</el-button>
  10. <el-button size="small" @click="BatchDeleteTwo" v-show="showTwo">批量删除</el-button>
  11. </el-col>
  12. <el-col :span="4" class="a">
  13. <span class="machineClass">机号:</span>
  14. <el-select style="width:100px" v-model="forms.bed">
  15. <el-option
  16. v-for="item in this.bedNumber"
  17. :key="item.id"
  18. :label="item.number"
  19. :value="item.id"
  20. ></el-option>
  21. </el-select>
  22. </el-col>
  23. <el-col :span="3" class="a">
  24. <el-select style="width:120px" v-model="forms.sename" @change="changeTable">
  25. <el-option
  26. v-for="item in this.tableTypes"
  27. :key="item.id"
  28. :label="item.name"
  29. :value="item.id"
  30. ></el-option>
  31. </el-select>
  32. </el-col>
  33. <el-col :span="10" class="a">
  34. <span class="machineClass">日期查询:</span>
  35. <el-date-picker
  36. v-model="forms.start_time"
  37. prefix-icon="none"
  38. type="date"
  39. placeholder="请选择"
  40. format="yyyy-MM-dd"
  41. value-format="yyyy-MM-dd"
  42. style="width:150px"
  43. ></el-date-picker>-
  44. <el-date-picker
  45. v-model="forms.end_time"
  46. prefix-icon="none"
  47. type="date"
  48. placeholder="请选择"
  49. format="yyyy-MM-dd"
  50. value-format="yyyy-MM-dd"
  51. style="width:150px"
  52. ></el-date-picker>
  53. </el-col>
  54. <el-col :span="2">
  55. <el-button @click="queryTable()">查询</el-button>
  56. </el-col>
  57. <!-- <el-col :span="2">
  58. <el-button>打印</el-button>
  59. </el-col> -->
  60. </el-row>
  61. <el-row>
  62. <!-- 细菌培养表 -->
  63. <el-table
  64. ref="multipleTable"
  65. @selection-change="handleSelectionChange"
  66. :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
  67. :data="tableData"
  68. border
  69. fit
  70. highlight-current-row
  71. style="width: 100%;margin-top: 10px;"
  72. v-show="show"
  73. >
  74. <el-table-column align="center" type="selection" width="55"></el-table-column>
  75. <el-table-column prop="date" label="机号" width="80" align="center">
  76. <template slot-scope="scope">{{scope.row.bed_id}}</template>
  77. </el-table-column>
  78. <el-table-column prop="name" label="取样日期" width="100" align="center">
  79. <template slot-scope="scope">{{getTime(scope.row.speling_date)}}</template>
  80. </el-table-column>
  81. <el-table-column prop="address" label="取样标本" width="100" align="center">
  82. <template slot-scope="scope">{{scope.row.specimen}}</template>
  83. </el-table-column>
  84. <el-table-column prop="address" label="A浓缩液批号" width="80" align="center">
  85. <template slot-scope="scope">{{scope.row.concentrate_noa}}</template>
  86. </el-table-column>
  87. <el-table-column prop="address" label="B浓缩液批号" width="80" align="center">
  88. <template slot-scope="scope">{{scope.row.concentrate_nob}}</template>
  89. </el-table-column>
  90. <el-table-column prop="address" label="采样部位" width="100" align="center">
  91. <template slot-scope="scope">{{scope.row.sampling_locationa}}</template>
  92. </el-table-column>
  93. <el-table-column prop="address" label="检测单位" width="100" align="center">
  94. <template slot-scope="scope">{{scope.row.detection_unit}}</template>
  95. </el-table-column>
  96. <el-table-column prop="address" label="取样者" width="80" align="center">
  97. <template slot-scope="scope">{{scope.row.user_name}}</template>
  98. </el-table-column>
  99. <el-table-column prop="address" label="出报告日期" width="110" align="center">
  100. <template slot-scope="scope">{{getTime(scope.row.reporting_date)}}</template>
  101. </el-table-column>
  102. <el-table-column prop="address" label="检测结果(cfu/ml)" width="140" align="center">
  103. <template slot-scope="scope">{{scope.row.detection_result}}</template>
  104. </el-table-column>
  105. <el-table-column label="操作" align="center" min-width="150px">
  106. <template slot-scope="scope">
  107. <el-tooltip class="item" effect="dark" content="编辑" placement="top">
  108. <el-button
  109. size="mini"
  110. type="primary"
  111. icon="el-icon-edit-outline"
  112. @click="EditCulture(scope.row.id,scope.row.sampler,scope.$index)"
  113. ></el-button>
  114. </el-tooltip>
  115. <el-tooltip class="item" effect="dark" content="删除" placement="top">
  116. <el-button
  117. size="mini"
  118. type="primary"
  119. icon="el-icon-delete"
  120. @click="BatchDelete(scope.row, scope.$index)"
  121. ></el-button>
  122. </el-tooltip>
  123. </template>
  124. </el-table-column>
  125. </el-table>
  126. <!-- 内霉素检测表字段 -->
  127. <el-table
  128. ref="multipleTableOne"
  129. @selection-change="handleSelectionChangeOne"
  130. :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
  131. :data="table"
  132. border
  133. fit
  134. highlight-current-row
  135. style="width: 100%;margin-top: 10px;"
  136. v-show="showOne"
  137. >
  138. <el-table-column align="center" type="selection" width="55"></el-table-column>
  139. <el-table-column prop="date" label="机号" width="80" align="center">
  140. <template slot-scope="scope">{{scope.row.bed_id}}</template>
  141. </el-table-column>
  142. <el-table-column prop="name" label="取样日期" width="100" align="center">
  143. <template slot-scope="scope">{{getTime(scope.row.sampling_date)}}</template>
  144. </el-table-column>
  145. <el-table-column prop="address" label="取样标本" width="100" align="center">
  146. <template slot-scope="scope">{{scope.row.specimenb}}</template>
  147. </el-table-column>
  148. <el-table-column prop="address" label="A浓缩液批号" width="80" align="center">
  149. <template slot-scope="scope">{{scope.row.concentrate_noc}}</template>
  150. </el-table-column>
  151. <el-table-column prop="address" label="B浓缩液批号" width="80" align="center">
  152. <template slot-scope="scope">{{scope.row.concentrateb_nod}}</template>
  153. </el-table-column>
  154. <el-table-column prop="address" label="采样部位" width="100" align="center">
  155. <template slot-scope="scope">{{scope.row.sampling_locationb}}</template>
  156. </el-table-column>
  157. <el-table-column prop="address" label="检测单位" width="100" align="center">
  158. <template slot-scope="scope">{{scope.row.detection_unit}}</template>
  159. </el-table-column>
  160. <el-table-column prop="address" label="取样者" width="80" align="center">
  161. <template slot-scope="scope">{{scope.row.user_name}}</template>
  162. </el-table-column>
  163. <el-table-column prop="address" label="出报告日期" width="110" align="center">
  164. <template slot-scope="scope">{{getTime(scope.row.reporting_dateb)}}</template>
  165. </el-table-column>
  166. <el-table-column prop="address" label="检测结果(cfu/ml)" width="100" align="center">
  167. <template slot-scope="scope">{{scope.row.detection_resultb}}</template>
  168. </el-table-column>
  169. <el-table-column label="操作" align="center" min-width="150px">
  170. <template slot-scope="scope">
  171. <el-tooltip class="item" effect="dark" content="编辑" placement="top">
  172. <el-button
  173. size="mini"
  174. type="primary"
  175. icon="el-icon-edit-outline"
  176. @click="EditDialyState(scope.row.id, scope.$index)"
  177. ></el-button>
  178. </el-tooltip>
  179. <el-tooltip class="item" effect="dark" content="删除" placement="top">
  180. <el-button
  181. size="mini"
  182. type="primary"
  183. icon="el-icon-delete"
  184. @click="BatchDeleteOne(scope.row, scope.$index)"
  185. ></el-button>
  186. </el-tooltip>
  187. </template>
  188. </el-table-column>
  189. </el-table>
  190. <!-- 透析液离子浓度检测 -->
  191. <el-table
  192. ref="multipleTableTwo"
  193. @selection-change="handleSelectionChangeTwo"
  194. :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
  195. :data="tableDatas"
  196. border
  197. fit
  198. highlight-current-row
  199. style="width: 100%;margin-top: 10px;"
  200. v-show="showTwo"
  201. >
  202. <el-table-column align="center" type="selection" width="55"></el-table-column>
  203. <el-table-column prop="date" label="机号" width="80" align="center">
  204. <template slot-scope="scope">{{scope.row.bed_id}}</template>
  205. </el-table-column>
  206. <el-table-column prop="name" label="取样日期" width="80" align="center">
  207. <template slot-scope="scope">{{getTime(scope.row.sampling_date)}}</template>
  208. </el-table-column>
  209. <el-table-column prop="address" label="取样者" width="80" align="center">
  210. <template slot-scope="scope">{{scope.row.user_name}}</template>
  211. </el-table-column>
  212. <el-table-column prop="address" label="检测单位" width="80" align="center">
  213. <template slot-scope="scope">{{scope.row.detection_unit}}</template>
  214. </el-table-column>
  215. <el-table-column prop="address" label="A浓缩液批号" width="80" align="center">
  216. <template slot-scope="scope">{{scope.row.concentrate_nof}}</template>
  217. </el-table-column>
  218. <el-table-column prop="address" label="B浓缩液批号" width="80" align="center">
  219. <template slot-scope="scope">{{scope.row.concentrate_nog}}</template>
  220. </el-table-column>
  221. <el-table-column prop="address" label="出报告日期" width="80" align="center">
  222. <template slot-scope="scope">{{getTime(scope.row.date_reportc)}}</template>
  223. </el-table-column>
  224. <el-table-column prop="address" label="检测结果" width="80" align="center">
  225. <el-table-column prop="address" label="实际Na+(mmol/L)" width="80" align="center">
  226. <template slot-scope="scope">{{scope.row.actual_na}}</template>
  227. </el-table-column>
  228. <el-table-column prop="address" label="配方Na+(mmol/L)" width="80" align="center">
  229. <template slot-scope="scope">{{scope.row.actual_pna}}</template>
  230. </el-table-column>
  231. <el-table-column prop="address" label="K+(mmol/L)" width="80" align="center">
  232. <template slot-scope="scope">{{scope.row.actual_k}}</template>
  233. </el-table-column>
  234. <el-table-column prop="address" label="Ca2+(mmol/L)" width="80" align="center">
  235. <template slot-scope="scope">{{scope.row.actual_ca}}</template>
  236. </el-table-column>
  237. <el-table-column prop="address" label="Cl-(mmol/L)" width="80" align="center">
  238. <template slot-scope="scope">{{scope.row.actual_ci}}</template>
  239. </el-table-column>
  240. <el-table-column prop="address" label="HCO3-(mmol/L)" width="80" align="center">
  241. <template slot-scope="scope">{{scope.row.actual_hco}}</template>
  242. </el-table-column>
  243. <el-table-column prop="address" label="Mg2+(mmol/L)" width="80" align="center">
  244. <template slot-scope="scope">{{scope.row.actual_mg}}</template>
  245. </el-table-column>
  246. <el-table-column prop="address" label="PH(mmol/L)" width="80" align="center">
  247. <template slot-scope="scope">{{scope.row.actual_ph}}</template>
  248. </el-table-column>
  249. </el-table-column>
  250. <el-table-column prop="address" label="备注" width="80" align="center">
  251. <template slot-scope="scope">{{scope.row.remakes}}</template>
  252. </el-table-column>
  253. <el-table-column label="操作" align="center" min-width="150px">
  254. <template slot-scope="scope">
  255. <el-tooltip class="item" effect="dark" content="编辑" placement="top">
  256. <el-button
  257. size="mini"
  258. type="primary"
  259. icon="el-icon-edit-outline"
  260. @click="EditIon(scope.row.id, scope.$index)"
  261. ></el-button>
  262. </el-tooltip>
  263. <el-tooltip class="item" effect="dark" content="删除" placement="top">
  264. <el-button
  265. size="mini"
  266. type="primary"
  267. icon="el-icon-delete"
  268. @click="BatchDeleteTwo(scope.row, scope.$index)"
  269. ></el-button>
  270. </el-tooltip>
  271. </template>
  272. </el-table-column>
  273. </el-table>
  274. </el-row>
  275. <!-- 编辑细菌培养 -->
  276. <el-dialog title="细菌培养" :visible.sync="dialogVisible" width="60%" center>
  277. <el-form :model="form" ref="form" :rules="rules">
  278. <el-row>
  279. <el-col :span="8">
  280. <el-form-item label="取样日期:">
  281. <el-date-picker
  282. v-model="form.date"
  283. prefix-icon="none"
  284. type="date"
  285. placeholder="请选择"
  286. format="yyyy-MM-dd"
  287. value-format="yyyy-MM-dd"
  288. style="width:150px"
  289. ></el-date-picker>
  290. </el-form-item>
  291. </el-col>
  292. <el-col :span="8">
  293. <el-form-item label="取样标本:">
  294. <el-select style="width:130px" v-model="form.specimen" @change="changeSpecimen">
  295. <el-option
  296. v-for="item in samplingSpecimen"
  297. :key="item.id"
  298. :label="item.name"
  299. :value="item.id"
  300. ></el-option>
  301. </el-select>
  302. </el-form-item>
  303. </el-col>
  304. <el-col :span="8">
  305. <el-form-item label="A浓缩液批号:">
  306. <el-input style="width:130px" v-model="form.concentrate_noa" :disabled="disable"></el-input>
  307. </el-form-item>
  308. </el-col>
  309. </el-row>
  310. <el-row>
  311. <el-col :span="8">
  312. <el-form-item label="B浓缩液批号">
  313. <el-input style="width:130px" v-model="form.concentrate_nob" :disabled="diableTwo"></el-input>
  314. </el-form-item>
  315. </el-col>
  316. <el-col :span="8">
  317. <el-form-item label="采样部位:">
  318. <el-select style="width:130px" v-model="form.sampling_locationa">
  319. <el-option
  320. v-for="item in samplingLocation"
  321. :key="item.id"
  322. :label="item.name"
  323. :value="item.id"
  324. ></el-option>
  325. </el-select>
  326. </el-form-item>
  327. </el-col>
  328. <el-col :span="8">
  329. <el-form-item label="检测单位:" required prop="detection_unit">
  330. <el-input style="width:180px" v-model="form.detection_unit"></el-input>
  331. </el-form-item>
  332. </el-col>
  333. </el-row>
  334. <el-row>
  335. <el-col :span="8">
  336. <el-form-item label="取样者:" required prop="sampler">
  337. <el-select style="width:130px" v-model="form.sampler">
  338. <el-option
  339. v-for="item in sampling"
  340. :key="item.admin_user_id"
  341. :label="item.user_name"
  342. :value="item.admin_user_id"
  343. ></el-option>
  344. </el-select>
  345. </el-form-item>
  346. </el-col>
  347. <el-col :span="8">
  348. <el-form-item label="出报告日期:">
  349. <el-date-picker
  350. v-model="form.reporting_date"
  351. prefix-icon="none"
  352. type="date"
  353. placeholder="请选择"
  354. format="yyyy-MM-dd"
  355. value-format="yyyy-MM-dd"
  356. style="width:150px"
  357. ></el-date-picker>
  358. </el-form-item>
  359. </el-col>
  360. </el-row>
  361. <el-row>
  362. <el-col :span="24" class="result">
  363. <el-form-item label="检测结果:(cfu/ml)">
  364. <el-input
  365. type="textarea"
  366. :rows="2"
  367. placeholder="请输入内容"
  368. style="width:600px"
  369. v-model="form.detection_result"
  370. ></el-input>
  371. </el-form-item>
  372. </el-col>
  373. </el-row>
  374. </el-form>
  375. <span slot="footer" class="dialog-footer">
  376. <el-button @click="dialogVisible = false">取 消</el-button>
  377. <el-button type="primary" @click="UpdateCulture('form')">保存</el-button>
  378. </span>
  379. </el-dialog>
  380. <!-- 编辑内霉素检测 -->
  381. <el-dialog title="内霉素检测" :visible.sync="dialogVisibleTwo" width="50%" center>
  382. <el-form :model="diaForm" ref="diaForm" rules="diaRules">
  383. <el-row>
  384. <el-col :span="8">
  385. <el-form-item label="取样日期:">
  386. <el-date-picker
  387. v-model="diaForm.sampling_date"
  388. prefix-icon="none"
  389. type="date"
  390. placeholder="请选择"
  391. format="yyyy-MM-dd"
  392. value-format="yyyy-MM-dd"
  393. style="width:150px"
  394. ></el-date-picker>
  395. </el-form-item>
  396. </el-col>
  397. <el-col :span="8">
  398. <el-form-item label="取样标本:">
  399. <el-select style="width:130px" v-model="diaForm.specimenb" @change="changeSpeciment">
  400. <el-option
  401. v-for="item in samplingSpecimen"
  402. :key="item.id"
  403. :label="item.name"
  404. :value="item.id"
  405. ></el-option>
  406. </el-select>
  407. </el-form-item>
  408. </el-col>
  409. <el-col :span="8">
  410. <el-form-item label="A浓缩液批号:">
  411. <el-input style="width:130px" v-model="diaForm.concentrate_noc" :disabled="disable"></el-input>
  412. </el-form-item>
  413. </el-col>
  414. </el-row>
  415. <el-row>
  416. <el-col :span="8">
  417. <el-form-item label="B浓缩液批号:">
  418. <el-input
  419. style="width:130px"
  420. v-model="diaForm.concentrateb_nod"
  421. :disabled="diableTwo"
  422. ></el-input>
  423. </el-form-item>
  424. </el-col>
  425. <el-col :span="8">
  426. <el-form-item label="采样部位:">
  427. <el-select style="width:130px" v-model="diaForm.sampling_locationb">
  428. <el-option
  429. v-for="item in samplingLocation"
  430. :key="item.id"
  431. :label="item.name"
  432. :value="item.id"
  433. ></el-option>
  434. </el-select>
  435. </el-form-item>
  436. </el-col>
  437. <el-col :span="8">
  438. <el-form-item label="检测单位:" required prop="detection_unit">
  439. <el-input style="width:180px" v-model="diaForm.detection_unit"></el-input>
  440. </el-form-item>
  441. </el-col>
  442. </el-row>
  443. <el-row>
  444. <el-col :span="8">
  445. <el-form-item label="取样者:" required prop="samplerb">
  446. <el-select style="width:130px" v-model="diaForm.samplerb">
  447. <el-option
  448. v-for="item in sampling"
  449. :key="item.admin_user_id"
  450. :label="item.user_name"
  451. :value="item.admin_user_id"
  452. ></el-option>
  453. </el-select>
  454. </el-form-item>
  455. </el-col>
  456. <el-col :span="8">
  457. <el-form-item label="出报告日期:">
  458. <el-date-picker
  459. v-model="diaForm.reporting_dateb"
  460. prefix-icon="none"
  461. type="date"
  462. placeholder="请选择"
  463. format="yyyy-MM-dd"
  464. value-format="yyyy-MM-dd"
  465. style="width:150px"
  466. ></el-date-picker>
  467. </el-form-item>
  468. </el-col>
  469. </el-row>
  470. <el-row>
  471. <el-col :span="24">
  472. <el-form-item label="检测结果:(cfu/ml)">
  473. <el-input
  474. type="textarea"
  475. :rows="2"
  476. placeholder="请输入内容"
  477. style="width:600px"
  478. v-model="diaForm.detection_resultb"
  479. ></el-input>
  480. </el-form-item>
  481. </el-col>
  482. </el-row>
  483. </el-form>
  484. <span slot="footer" class="dialog-footer">
  485. <el-button @click="dialogVisibleTwo = false">取 消</el-button>
  486. <el-button type="primary" @click="UpdateDialyState('diaForm')">保存</el-button>
  487. </span>
  488. </el-dialog>
  489. <!-- -->
  490. <el-dialog title="透析液离子浓度检测" :visible.sync="dialogVisibleThree" width="50%" center>
  491. <el-row>
  492. <el-form :model="ionForm" ref="ionForm" :rule="ionrule">
  493. <el-row>
  494. <el-col :span="8">
  495. <el-form-item label="取样日期:">
  496. <el-date-picker
  497. v-model="ionForm.dateb"
  498. prefix-icon="none"
  499. type="date"
  500. placeholder="请选择"
  501. format="yyyy-MM-dd"
  502. value-format="yyyy-MM-dd"
  503. style="width:150px"
  504. ></el-date-picker>
  505. </el-form-item>
  506. </el-col>
  507. <el-col :span="8">
  508. <el-form-item label="取样者:" required prop="samplerc">
  509. <el-select style="width:130px" v-model="ionForm.samplerc">
  510. <el-option
  511. v-for="item in sampling"
  512. :key="item.admin_user_id"
  513. :label="item.user_name"
  514. :value="item.admin_user_id"
  515. ></el-option>
  516. </el-select>
  517. </el-form-item>
  518. </el-col>
  519. <el-col :span="8">
  520. <el-form-item label="检测单位:" required prop="detection_unit">
  521. <el-input style="width:180px" v-model="ionForm.detection_unit"></el-input>
  522. </el-form-item>
  523. </el-col>
  524. </el-row>
  525. <el-row>
  526. <el-col :span="8">
  527. <el-form-item label="A浓缩液批号:">
  528. <el-input style="width:130px" v-model="ionForm.concentrate_nof"></el-input>
  529. </el-form-item>
  530. </el-col>
  531. <el-col :span="8">
  532. <el-form-item label="B浓缩液批号:">
  533. <el-input style="width:130px" v-model="ionForm.concentrate_nog"></el-input>
  534. </el-form-item>
  535. </el-col>
  536. <el-col :span="8">
  537. <el-form-item label="出报告日期:">
  538. <el-date-picker
  539. v-model="ionForm.date_reportc"
  540. prefix-icon="none"
  541. type="date"
  542. placeholder="请选择"
  543. format="yyyy-MM-dd"
  544. value-format="yyyy-MM-dd"
  545. style="width:150px"
  546. ></el-date-picker>
  547. </el-form-item>
  548. </el-col>
  549. </el-row>
  550. <el-row>
  551. <el-col :span="8">
  552. <el-form-item label="实际Na+(mmol/L):">
  553. <el-input style="width:100px" v-model="ionForm.actual_na"></el-input>
  554. </el-form-item>
  555. </el-col>
  556. <el-col :span="8">
  557. <el-form-item label="配方Na+(mmol/L):">
  558. <el-input style="width:100px" v-model="ionForm.actual_pna"></el-input>
  559. </el-form-item>
  560. </el-col>
  561. <el-col :span="8">
  562. <el-form-item label="K+ (mmol/L):">
  563. <el-input style="width:100px" v-model="ionForm.actual_k"></el-input>
  564. </el-form-item>
  565. </el-col>
  566. </el-row>
  567. <el-row>
  568. <el-col :span="8">
  569. <el-form-item label="Ca2+(mmol/L):">
  570. <el-input style="width:100px" v-model="ionForm.actual_ca"></el-input>
  571. </el-form-item>
  572. </el-col>
  573. <el-col :span="8">
  574. <el-form-item label="CI-(mmol/L):">
  575. <el-input style="width:100px" v-model="ionForm.actual_ci"></el-input>
  576. </el-form-item>
  577. </el-col>
  578. <el-col :span="8">
  579. <el-form-item label="HCO3-(mmol/L):">
  580. <el-input style="width:100px" v-model="ionForm.actual_hco"></el-input>
  581. </el-form-item>
  582. </el-col>
  583. </el-row>
  584. <el-row>
  585. <el-col :span="8">
  586. <el-form-item label="Mg2+(mmol/L):">
  587. <el-input style="width:100px" v-model="ionForm.actual_mg"></el-input>
  588. </el-form-item>
  589. </el-col>
  590. <el-col :span="8">
  591. <el-form-item label="PH:">
  592. <el-input style="width:100px" v-model="ionForm.actual_ph"></el-input>
  593. </el-form-item>
  594. </el-col>
  595. </el-row>
  596. <el-row>
  597. <el-col :span="24">
  598. <el-form-item label="备注:">
  599. <el-input
  600. type="textarea"
  601. :rows="2"
  602. placeholder="请输入内容"
  603. style="width:500px"
  604. v-model="ionForm.remakes"
  605. ></el-input>
  606. </el-form-item>
  607. </el-col>
  608. </el-row>
  609. </el-form>
  610. </el-row>
  611. <span slot="footer" class="dialog-footer">
  612. <el-button @click="dialogVisibleThree = false">取 消</el-button>
  613. <el-button type="primary" @click="UpdateIon('ionForm')">保存</el-button>
  614. </span>
  615. </el-dialog>
  616. </div>
  617. </template>
  618. <script>
  619. import {
  620. getAllSubregion,
  621. getAllQulityInfo,
  622. EditCulture,
  623. UpdateCulture,
  624. getAllOrganization,
  625. DeleteCultrue,
  626. EditDialyState,
  627. UpdateDialyState,
  628. DeleteDialystate,
  629. EditIon,
  630. UpdateIon,
  631. DeleteIon,
  632. queryTable
  633. } from '@/api/manage'
  634. import { uParseTime } from '@/utils/tools'
  635. export default {
  636. name: 'QualityForm',
  637. data() {
  638. return {
  639. isIndeterminate: false,
  640. checkAllStatus: false,
  641. beds: [],
  642. forms: {
  643. bed: '',
  644. sename: 1,
  645. start_time: '',
  646. end_time: ''
  647. },
  648. tableData: [],
  649. table: [],
  650. tableDatas: [],
  651. show: true,
  652. showOne: false,
  653. showTwo: false,
  654. bedNumber: [],
  655. tableTypes: [
  656. { id: 1, name: '细菌培养' },
  657. { id: 2, name: '内霉素检测' },
  658. { id: 3, name: '透析液离子浓度检测' }
  659. ],
  660. dialogVisible: false,
  661. dialogVisibleTwo: false,
  662. dialogVisibleThree: false,
  663. disable: false,
  664. diableTwo: false,
  665. form: {
  666. id: '',
  667. date: '',
  668. specimen: '',
  669. concentrate_noa: '',
  670. concentrate_nob: '',
  671. sampling_locationa: '',
  672. detection_unit: '',
  673. sampler: '',
  674. reporting_date: '',
  675. detection_result: ''
  676. },
  677. diaForm: {
  678. id: '',
  679. sampling_date: '',
  680. specimenb: '',
  681. concentrate_noc: '',
  682. concentrateb_nod: '',
  683. sampling_locationb: '',
  684. detection_unit: '',
  685. samplerb: '',
  686. reporting_dateb: '',
  687. detection_resultb: ''
  688. },
  689. sampling: [],
  690. samplingSpecimen: [
  691. { id: 0, name: '请选择' },
  692. { id: 1, name: '透析液' },
  693. { id: 2, name: 'A浓缩液' },
  694. { id: 3, name: 'B浓缩液' },
  695. { id: 4, name: '置换液' },
  696. { id: 5, name: '透析用水' }
  697. ],
  698. samplingLocation: [
  699. { id: 0, name: '请选择' },
  700. { id: 1, name: '透析液入口' },
  701. { id: 2, name: '透析液取样口' },
  702. { id: 3, name: '置换液出口' },
  703. { id: 4, name: '透析机反渗水入口' }
  704. ],
  705. rules: {
  706. detection_unit: [{ required: true, message: '请填写检测单位' }],
  707. sampler: [{ required: true, message: '请填写取样者' }]
  708. },
  709. diaRules: {
  710. detection_unit: [{ required: true, message: '请填写检测单位' }],
  711. samplerb: [{ required: true, message: '请填写取样者' }]
  712. },
  713. ionrule: {
  714. detection_unit: [{ required: true, message: '请填写检测单位' }],
  715. samplerc: [{ required: true, message: '请填写取样者' }]
  716. },
  717. selectCulture: [],
  718. ionForm: {
  719. dateb: '',
  720. samplerc: '',
  721. detection_unit: '',
  722. concentrate_nof: '',
  723. concentrate_nog: '',
  724. date_reportc: '',
  725. actual_na: '',
  726. actual_pna: '',
  727. actual_k: '',
  728. actual_ca: '',
  729. actual_ci: '',
  730. actual_hco: '',
  731. actual_mg: '',
  732. actual_ph: ''
  733. }
  734. }
  735. },
  736. methods: {
  737. changeCheck() {
  738. this.$refs.multipleTable.clearSelection()
  739. if (this.checkAllStatus) {
  740. this.$refs.multipleTable.toggleAllSelection()
  741. }
  742. this.$refs.multipleTableOne.clearSelection()
  743. if (this.checkAllStatus) {
  744. this.$refs.multipleTableOne.toggleAllSelection()
  745. }
  746. this.$refs.multipleTableTwo.clearSelection()
  747. if (this.checkAllStatus) {
  748. this.$refs.multipleTableTwo.toggleAllSelection()
  749. }
  750. },
  751. handleSelectionChange(val) {
  752. this.selectCulture = val
  753. },
  754. handleSelectionChangeOne(val) {
  755. this.selectCulture = val
  756. },
  757. handleSelectionChangeTwo(val) {
  758. this.selectCulture = val
  759. },
  760. getAllSubregion() {
  761. getAllSubregion().then(response => {
  762. var zones = response.data.data.zones
  763. var numbers = response.data.data.numbers
  764. this.bedNumber = numbers
  765. })
  766. },
  767. getAllQulityInfo() {
  768. getAllQulityInfo().then(response => {
  769. if (response.data.state === 1) {
  770. var cultures = response.data.data.cultures
  771. console.log('cultures', cultures)
  772. for (let index = 0; index < cultures.length; index++) {
  773. if (cultures[index].specimen === 0) {
  774. cultures[index].specimen = ''
  775. }
  776. if (cultures[index].specimen === 1) {
  777. cultures[index].specimen = '透析液'
  778. }
  779. if (cultures[index].specimen === 2) {
  780. cultures[index].specimen = 'A浓缩液'
  781. }
  782. if (cultures[index].specimen === 3) {
  783. cultures[index].specimen = 'B浓缩液'
  784. }
  785. if (cultures[index].specimen === 4) {
  786. cultures[index].specimen = '置换液'
  787. }
  788. if (cultures[index].specimen === 5) {
  789. cultures[index].specimen = '透析用水'
  790. }
  791. if (cultures[index].sampling_locationa === 0) {
  792. cultures[index].sampling_locationa = ''
  793. }
  794. if (cultures[index].sampling_locationa === 1) {
  795. cultures[index].sampling_locationa = '透析液入口'
  796. }
  797. if (cultures[index].sampling_locationa === 2) {
  798. cultures[index].sampling_locationa = '透析液取样口'
  799. }
  800. if (cultures[index].sampling_locationa === 3) {
  801. cultures[index].sampling_locationa = '置换液出口'
  802. }
  803. if (cultures[index].sampling_locationa === 4) {
  804. cultures[index].sampling_locationa = '透析机反渗水入口'
  805. }
  806. }
  807. this.tableData = cultures
  808. var dialyste = response.data.data.dialysate
  809. console.log('dialyste', dialyste)
  810. for (let index = 0; index < dialyste.length; index++) {
  811. if (dialyste[index].specimenb === 0) {
  812. dialyste[index].specimenb = ''
  813. }
  814. if (dialyste[index].specimenb === 1) {
  815. dialyste[index].specimenb = '透析液'
  816. }
  817. if (dialyste[index].specimenb === 2) {
  818. dialyste[index].specimenb = 'A浓缩液'
  819. }
  820. if (dialyste[index].specimenb === 3) {
  821. dialyste[index].specimenb = 'B浓缩液'
  822. }
  823. if (dialyste[index].specimenb === 4) {
  824. dialyste[index].specimenb = '置换液'
  825. }
  826. if (dialyste[index].specimenb === 5) {
  827. dialyste[index].specimenb = '透析用水'
  828. }
  829. if (dialyste[index].sampling_locationb === 0) {
  830. dialyste[index].sampling_locationb = ''
  831. }
  832. if (dialyste[index].sampling_locationb === 1) {
  833. dialyste[index].sampling_locationb = '透析液入口'
  834. }
  835. if (dialyste[index].sampling_locationb === 2) {
  836. dialyste[index].sampling_locationb = '透析液取样口'
  837. }
  838. if (dialyste[index].sampling_locationb === 3) {
  839. dialyste[index].sampling_locationb = '置换液出口'
  840. }
  841. if (dialyste[index].sampling_locationb === 4) {
  842. dialyste[index].sampling_locationb = '透析机反渗水入口'
  843. }
  844. }
  845. this.table = dialyste
  846. var ions = response.data.data.ions
  847. console.log('ions', ions)
  848. this.tableDatas = ions
  849. }
  850. })
  851. },
  852. changeSpecimen(val) {
  853. if (val === 0) {
  854. this.disable = false
  855. this.diableTwo = false
  856. }
  857. if (val === 1) {
  858. this.form.concentrate_nob = ''
  859. this.form.concentrateb_nod = ''
  860. this.diableTwo = true
  861. this.disable = false
  862. }
  863. if (val === 2) {
  864. this.form.concentrate_noa = ''
  865. this.form.concentrate_noc = ''
  866. this.diableTwo = true
  867. this.disable = false
  868. }
  869. if (val === 3) {
  870. this.disable = true
  871. this.diableTwo = false
  872. }
  873. if (val === 4) {
  874. this.disable = false
  875. this.diableTwo = false
  876. }
  877. if (val === 5) {
  878. this.disable = false
  879. this.diableTwo = false
  880. }
  881. },
  882. changeSpeciment(val) {
  883. if (val === 0) {
  884. this.disable = false
  885. this.diableTwo = false
  886. }
  887. if (val === 1) {
  888. this.disable = false
  889. this.diableTwo = false
  890. }
  891. if (val === 2) {
  892. this.diableTwo = true
  893. this.disable = false
  894. }
  895. if (val === 3) {
  896. this.disable = true
  897. this.diableTwo = false
  898. }
  899. if (val === 4) {
  900. this.disable = false
  901. this.diableTwo = false
  902. }
  903. if (val === 5) {
  904. this.disable = false
  905. this.diableTwo = false
  906. }
  907. },
  908. changeTable(val) {
  909. if (val === 1) {
  910. this.showOne = false
  911. this.showTwo = false
  912. this.show = true
  913. }
  914. if (val === 2) {
  915. this.showOne = true
  916. this.show = false
  917. this.showTwo = false
  918. }
  919. if (val === 3) {
  920. this.showTwo = true
  921. this.show = false
  922. this.showOne = false
  923. }
  924. },
  925. getTime(time) {
  926. return uParseTime(time, '{y}-{m}-{d}')
  927. },
  928. getAllOrganization() {
  929. getAllOrganization().then(response => {
  930. if (response.data.state === 1) {
  931. var approle = response.data.data.approle
  932. this.sampling = approle
  933. }
  934. })
  935. },
  936. EditCulture(id, userid) {
  937. this.dialogVisible = true
  938. if (this.form.specimen === '') {
  939. this.form.specimen = 0
  940. }
  941. var specimens = this.form.specimen
  942. var specimen = parseInt(specimens)
  943. this.form.specimen = specimen
  944. if (this.form.locationa === '') {
  945. this.form.specimen = 0
  946. }
  947. var locationa = this.form.sampling_locationa
  948. var location = parseInt(locationa)
  949. this.form.locationa = location
  950. EditCulture(id, userid).then(response => {
  951. if (response.data.state === 1) {
  952. var culture = response.data.data.culture
  953. console.log('禁用', culture)
  954. var role = response.data.data.role
  955. console.log('role', role)
  956. this.form.id = culture.id
  957. this.form.date = uParseTime(culture.speling_date, '{y}-{m}-{d}')
  958. this.form.specimen = culture.specimen
  959. this.form.concentrate_noa = culture.concentrate_noa
  960. this.form.concentrate_nob = culture.concentrate_nob
  961. this.form.sampling_locationa = culture.sampling_locationa
  962. this.form.detection_unit = culture.detection_unit
  963. this.form.sampler = culture.sampler
  964. this.form.reporting_date = uParseTime(
  965. culture.reporting_date,
  966. '{y}-{m}-{d}'
  967. )
  968. this.form.detection_result = culture.detection_result
  969. }
  970. })
  971. },
  972. UpdateCulture(formName) {
  973. this.$refs[formName].validate(valid => {
  974. if (valid) {
  975. UpdateCulture(this.form).then(response => {
  976. if (response.data.state === 1) {
  977. var culture = response.data.data.culture
  978. this.$message.success('修改成功')
  979. this.dialogVisible = false
  980. this.getAllQulityInfo()
  981. }
  982. })
  983. }
  984. })
  985. },
  986. BatchDelete() {
  987. if (this.selectCulture.length == 0) {
  988. this.$message.error('请选择要删除的信息')
  989. return false
  990. }
  991. this.$confirm(
  992. '确认要删除所选记录吗? <br>删除后,人员信息将无法恢复',
  993. '删除提示',
  994. {
  995. dangerouslyUseHTMLString: true,
  996. confirmButtonText: '确定',
  997. cancelButtonText: '取消',
  998. type: 'warning'
  999. }
  1000. ).then(() => {
  1001. var ids = []
  1002. var idMap = {}
  1003. for (const index in this.selectCulture) {
  1004. ids.push(this.selectCulture[index].id)
  1005. idMap[this.selectCulture[index].id] = this.selectCulture[index].id
  1006. }
  1007. DeleteCultrue({ ids: ids }).then(response => {
  1008. if (response.data.state === 1) {
  1009. var msg = response.data.data.msg
  1010. var planDataLength = this.tableData.length
  1011. for (let index = planDataLength - 1; index >= 0; index--) {
  1012. if (this.tableData[index].id in idMap) {
  1013. this.tableData.splice(index, 1)
  1014. }
  1015. }
  1016. this.$message.success('删除成功')
  1017. }
  1018. })
  1019. })
  1020. },
  1021. EditDialyState(id) {
  1022. this.dialogVisibleTwo = true
  1023. EditDialyState(id).then(response => {
  1024. if (response.data.state === 1) {
  1025. var dialysate = response.data.data.dialysate
  1026. console.log('dialysate', dialysate)
  1027. this.diaForm.id = dialysate.id
  1028. this.diaForm.sampling_date = uParseTime(
  1029. dialysate.sampling_date,
  1030. '{y}-{m}-{d}'
  1031. )
  1032. this.diaForm.specimenb = dialysate.specimenb
  1033. this.diaForm.concentrate_noc = dialysate.concentrate_noc
  1034. this.diaForm.concentrateb_nod = dialysate.concentrateb_nod
  1035. this.diaForm.sampling_locationb = dialysate.sampling_locationb
  1036. this.diaForm.detection_unit = dialysate.detection_unit
  1037. this.diaForm.samplerb = dialysate.samplerb
  1038. this.diaForm.reporting_dateb = uParseTime(
  1039. dialysate.reporting_dateb,
  1040. '{y}-{m}-{d}'
  1041. )
  1042. this.diaForm.detection_resultb = dialysate.detection_resultb
  1043. }
  1044. })
  1045. },
  1046. UpdateDialyState(formName) {
  1047. this.$refs[formName].validate(valid => {
  1048. if (valid) {
  1049. UpdateDialyState(this.diaForm).then(response => {
  1050. if (response.data.state === 1) {
  1051. var dialyste = response.data.data.dialysate
  1052. console.log('dialyste', dialyste)
  1053. this.dialogVisibleTwo = false
  1054. this.$message.success('修改成功')
  1055. this.getAllQulityInfo()
  1056. }
  1057. })
  1058. }
  1059. })
  1060. },
  1061. BatchDeleteOne() {
  1062. if (this.selectCulture.length == 0) {
  1063. this.$message.error('请选择要删除的信息')
  1064. return false
  1065. }
  1066. this.$confirm(
  1067. '确认要删除所选的吗? <br>删除后,人员信息将无法恢复',
  1068. '删除提示',
  1069. {
  1070. dangerouslyUseHTMLString: true,
  1071. confirmButtonText: '确定',
  1072. cancelButtonText: '取消',
  1073. type: 'warning'
  1074. }
  1075. ).then(() => {
  1076. var ids = []
  1077. var idMap = {}
  1078. for (const index in this.selectCulture) {
  1079. ids.push(this.selectCulture[index].id)
  1080. idMap[this.selectCulture[index].id] = this.selectCulture[index].id
  1081. }
  1082. DeleteDialystate({ ids: ids }).then(response => {
  1083. if (response.data.state === 1) {
  1084. var msg = response.data.data.msg
  1085. var planDataLength = this.table.length
  1086. for (let index = planDataLength - 1; index >= 0; index--) {
  1087. if (this.table[index].id in idMap) {
  1088. this.table.splice(index, 1)
  1089. }
  1090. }
  1091. this.$message.success('删除成功')
  1092. }
  1093. })
  1094. })
  1095. },
  1096. EditIon(id) {
  1097. this.dialogVisibleThree = true
  1098. EditIon(id).then(response => {
  1099. if (response.data.state === 1) {
  1100. var ion = response.data.data.ion
  1101. console.log('ion', ion)
  1102. this.ionForm.dateb = uParseTime(ion.sampling_date, '{y}-{m}-{d}')
  1103. this.ionForm.samplerc = ion.samplerc
  1104. this.ionForm.detection_unit = ion.detection_unit
  1105. this.ionForm.samplerc = ion.samplerc
  1106. this.ionForm.concentrate_nof = ion.concentrate_nof
  1107. this.ionForm.concentrate_nog = ion.concentrate_nog
  1108. this.ionForm.date_reportc = uParseTime(
  1109. ion.date_reportc,
  1110. '{y}-{m}-{d}'
  1111. )
  1112. this.ionForm.id = ion.id
  1113. this.ionForm.actual_na = ion.actual_na
  1114. this.ionForm.actual_pna = ion.actual_pna
  1115. this.ionForm.actual_k = ion.actual_k
  1116. this.ionForm.actual_ca = ion.actual_ca
  1117. this.ionForm.actual_ci = ion.actual_ci
  1118. this.ionForm.actual_hco = ion.actual_hco
  1119. this.ionForm.actual_mg = ion.actual_mg
  1120. this.ionForm.actual_ph = ion.actual_ph
  1121. this.ionForm.remakes = ion.remakes
  1122. }
  1123. })
  1124. },
  1125. UpdateIon(formName) {
  1126. this.$refs[formName].validate(valid => {
  1127. if (valid) {
  1128. UpdateIon(this.ionForm).then(response => {
  1129. if (response.data.state === 1) {
  1130. var ion = response.data.data.ion
  1131. console.log('ion', ion)
  1132. this.dialogVisibleThree = false
  1133. this.$message.success('修改成功')
  1134. this.getAllQulityInfo()
  1135. }
  1136. })
  1137. }
  1138. })
  1139. },
  1140. BatchDeleteTwo() {
  1141. if (this.selectCulture.length == 0) {
  1142. this.$message.error('请选择要删除的信息')
  1143. return false
  1144. }
  1145. this.$confirm(
  1146. '确认要删除所选的吗? <br>删除后,信息将无法恢复',
  1147. '删除提示',
  1148. {
  1149. dangerouslyUseHTMLString: true,
  1150. confirmButtonText: '确定',
  1151. cancelButtonText: '取消',
  1152. type: 'warning'
  1153. }
  1154. ).then(() => {
  1155. var ids = []
  1156. var idMap = {}
  1157. for (const index in this.selectCulture) {
  1158. ids.push(this.selectCulture[index].id)
  1159. idMap[this.selectCulture[index].id] = this.selectCulture[index].id
  1160. }
  1161. DeleteIon({ ids: ids }).then(response => {
  1162. if (response.data.state === 1) {
  1163. var msg = response.data.data.msg
  1164. var planDataLength = this.tableDatas.length
  1165. for (let index = planDataLength - 1; index >= 0; index--) {
  1166. if (this.tableDatas[index].id in idMap) {
  1167. this.tableDatas.splice(index, 1)
  1168. }
  1169. }
  1170. this.$message.success('删除成功')
  1171. }
  1172. })
  1173. })
  1174. },
  1175. queryTable() {
  1176. queryTable(
  1177. this.forms.bed,
  1178. this.forms.start_time,
  1179. this.forms.end_time
  1180. ).then(response => {
  1181. if (response.data.state === 1) {
  1182. var cultures = response.data.data.cultures
  1183. this.tableData = cultures
  1184. var dialysate = response.data.data.dialysate
  1185. this.table = dialysate
  1186. var ions = response.data.data.ions
  1187. this.tableDatas = ions
  1188. }
  1189. })
  1190. }
  1191. },
  1192. created() {
  1193. this.getAllSubregion()
  1194. this.getAllQulityInfo()
  1195. this.getAllOrganization()
  1196. }
  1197. }
  1198. </script>
  1199. <style scoped>
  1200. .a {
  1201. .el-col-2 {
  1202. width: 8.33333%;
  1203. margin-bottom: 20px;
  1204. }
  1205. .result {
  1206. .el-form-item__label {
  1207. width: 120px;
  1208. }
  1209. }
  1210. }
  1211. </style>
  1212. <style lang="scss">
  1213. .machineClass {
  1214. font-size: 14px;
  1215. }
  1216. </style>