Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

monitor_dialog.vue 40KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221
  1. <template>
  2. <div class="dialog_box">
  3. <el-dialog
  4. title="透析监测"
  5. :visible.sync="visible"
  6. width="1100px"
  7. @close="reset"
  8. :modal-append-to-body="false"
  9. >
  10. <div v-show="edit == false">
  11. <div class="txsj">
  12. <el-button round @click="newRecordAction">新增监测</el-button>
  13. <el-button round @click="modifyRecordAction">修改监测</el-button>
  14. <el-button round @click="deleteRecordAction">删除监测</el-button>
  15. </div>
  16. <el-table
  17. :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
  18. ref="table"
  19. :data="monitors"
  20. border
  21. highlight-current-row
  22. @current-change="tableCurrentRowChange"
  23. style="width: 100%"
  24. :class="current_row_class"
  25. >
  26. <el-table-column
  27. label="监测时间"
  28. align="center"
  29. width="144"
  30. v-if="isShow('监测时间')"
  31. >
  32. <template slot-scope="scope">
  33. {{ getMonitorDate(scope.row) }}
  34. </template>
  35. </el-table-column>
  36. <el-table-column
  37. prop="temperature"
  38. align="center"
  39. width="100"
  40. label="体温(℃)"
  41. v-if="isShow('体温')"
  42. >
  43. <template slot-scope="scope">
  44. {{ scope.row.temperature ? scope.row.temperature : "" }}
  45. </template>
  46. </el-table-column>
  47. <el-table-column
  48. align="center"
  49. label="血压(mmHg)"
  50. width="110"
  51. v-if="isShow('血压')"
  52. >
  53. <template slot-scope="scope">
  54. {{
  55. scope.row.systolic_blood_pressure
  56. ? scope.row.systolic_blood_pressure
  57. : ""
  58. }}/{{
  59. scope.row.diastolic_blood_pressure
  60. ? scope.row.diastolic_blood_pressure
  61. : ""
  62. }}
  63. </template>
  64. </el-table-column>
  65. <el-table-column
  66. prop="pulse_frequency"
  67. align="center"
  68. width="100"
  69. label="脉搏(次/分)"
  70. v-if="isShow('脉搏')"
  71. >
  72. <template slot-scope="scope">
  73. {{ scope.row.pulse_frequency ? scope.row.pulse_frequency : "" }}
  74. </template>
  75. </el-table-column>
  76. <el-table-column
  77. prop="breathing_rate"
  78. align="center"
  79. label="呼吸频率(次/分)"
  80. width="100"
  81. v-if="isShow('呼吸频率')"
  82. >
  83. <template slot-scope="scope">
  84. {{ scope.row.breathing_rate ? scope.row.breathing_rate : "" }}
  85. </template>
  86. </el-table-column>
  87. <el-table-column
  88. prop="venous_pressure"
  89. align="center"
  90. label="静脉压/动脉压(mmHg)"
  91. width="120"
  92. >
  93. <template slot-scope="scope">
  94. <span
  95. >{{
  96. scope.row.venous_pressure ? scope.row.venous_pressure : ""
  97. }}/
  98. {{
  99. scope.row.arterial_pressure ? scope.row.arterial_pressure : ""
  100. }}</span
  101. >
  102. </template>
  103. </el-table-column>
  104. <el-table-column
  105. prop="blood_flow_volume"
  106. align="center"
  107. label="血流量(ml/min)"
  108. width="120"
  109. v-if="isShow('血流量')"
  110. >
  111. <template slot-scope="scope">
  112. {{
  113. scope.row.blood_flow_volume ? scope.row.blood_flow_volume : ""
  114. }}
  115. </template>
  116. </el-table-column>
  117. <el-table-column
  118. prop="transmembrane_pressure"
  119. align="center"
  120. label="跨膜压(mmHg)"
  121. width="120"
  122. v-if="isShow('跨膜压')"
  123. >
  124. <template slot-scope="scope">
  125. {{
  126. scope.row.transmembrane_pressure
  127. ? scope.row.transmembrane_pressure
  128. : ""
  129. }}
  130. </template>
  131. </el-table-column>
  132. <el-table-column
  133. prop="ultrafiltration_volume"
  134. align="center"
  135. label="超滤量(ml)"
  136. width="110"
  137. v-if="isShow('超滤量') && template_id == 6"
  138. >
  139. <template slot-scope="scope">
  140. {{
  141. scope.row.ultrafiltration_volume
  142. ? scope.row.ultrafiltration_volume
  143. : ""
  144. }}
  145. </template>
  146. </el-table-column>
  147. <el-table-column
  148. prop="ultrafiltration_volume"
  149. align="center"
  150. label="超滤量(L)"
  151. width="110"
  152. v-if="isShow('超滤量') && template_id != 6"
  153. >
  154. <template slot-scope="scope">
  155. {{
  156. scope.row.ultrafiltration_volume
  157. ? scope.row.ultrafiltration_volume
  158. : ""
  159. }}
  160. </template>
  161. </el-table-column>
  162. <el-table-column
  163. prop="sodium_concentration"
  164. align="center"
  165. label="钠浓度(mmol/L)"
  166. width="126"
  167. v-if="isShow('钠浓度')"
  168. >
  169. <template slot-scope="scope">
  170. {{
  171. scope.row.sodium_concentration
  172. ? scope.row.sodium_concentration
  173. : ""
  174. }}
  175. </template>
  176. </el-table-column>
  177. <el-table-column
  178. prop="dialysate_temperature"
  179. align="center"
  180. label="透析液温度(℃)"
  181. width="120"
  182. v-if="isShow('透析液温度')"
  183. >
  184. <template slot-scope="scope">
  185. {{
  186. scope.row.dialysate_temperature
  187. ? scope.row.dialysate_temperature
  188. : ""
  189. }}
  190. </template>
  191. </el-table-column>
  192. <el-table-column
  193. prop="replacement_rate"
  194. align="center"
  195. label="置换率(ml/min)"
  196. width="120"
  197. v-if="isShow('置换率') && template_id == 6"
  198. >
  199. <template slot-scope="scope">
  200. {{ scope.row.replacement_rate ? scope.row.replacement_rate : "" }}
  201. </template>
  202. </el-table-column>
  203. <el-table-column
  204. prop="replacement_rate"
  205. align="center"
  206. label="置换率(L/h)"
  207. width="120"
  208. v-if="isShow('置换率') && template_id != 6"
  209. >
  210. <template slot-scope="scope">
  211. {{ scope.row.replacement_rate ? scope.row.replacement_rate : "" }}
  212. </template>
  213. </el-table-column>
  214. <el-table-column
  215. prop="displacement_quantity"
  216. align="center"
  217. label="置换量(ml)"
  218. width="100"
  219. v-if="isShow('置换量' && template_id == 6)"
  220. >
  221. <template slot-scope="scope">
  222. {{
  223. scope.row.displacement_quantity
  224. ? scope.row.displacement_quantity
  225. : ""
  226. }}
  227. </template>
  228. </el-table-column>
  229. <el-table-column
  230. prop="displacement_quantity"
  231. align="center"
  232. label="SpO₂(%)"
  233. width="100"
  234. v-if="isShow('SpO₂') && template_id != 6"
  235. >
  236. <template slot-scope="scope">
  237. {{
  238. scope.row.blood_oxygen_saturation
  239. ? scope.row.blood_oxygen_saturation
  240. : ""
  241. }}
  242. </template>
  243. </el-table-column>
  244. <el-table-column
  245. prop="displacement_quantity"
  246. align="center"
  247. label="置换量(L)"
  248. width="100"
  249. v-if="isShow('置换量') && template_id != 6"
  250. >
  251. <template slot-scope="scope">
  252. {{
  253. scope.row.displacement_quantity
  254. ? scope.row.displacement_quantity
  255. : ""
  256. }}
  257. </template>
  258. </el-table-column>
  259. <el-table-column
  260. prop="displacement_flow_quantity"
  261. align="center"
  262. label="电导度(mS/m)"
  263. width="100"
  264. v-if="isShow('电导度')"
  265. >
  266. <template slot-scope="scope">
  267. {{ scope.row.conductivity ? scope.row.conductivity : "" }}
  268. </template>
  269. </el-table-column>
  270. <el-table-column
  271. prop="displacement_flow_quantity"
  272. align="center"
  273. label="置换液流量(ml/h)"
  274. width="100"
  275. v-if="isShow('置换液流量')"
  276. >
  277. <template slot-scope="scope">
  278. {{
  279. scope.row.displacement_flow_quantity
  280. ? scope.row.displacement_flow_quantity
  281. : ""
  282. }}
  283. </template>
  284. </el-table-column>
  285. <el-table-column
  286. prop="symptom"
  287. align="center"
  288. label="病情变化"
  289. width="130"
  290. v-if="isShow('病情变化')"
  291. >
  292. </el-table-column>
  293. <el-table-column
  294. prop="dispose"
  295. align="center"
  296. label="处理"
  297. width="130"
  298. v-if="isShow('处理')"
  299. >
  300. </el-table-column>
  301. <el-table-column
  302. prop="result"
  303. align="center"
  304. label="结果"
  305. width="130"
  306. v-if="isShow('结果')"
  307. >
  308. </el-table-column>
  309. </el-table>
  310. </div>
  311. <!--<div v-show="edit">-->
  312. <el-form v-show="edit" ref="form" :model="form" label-width="130px">
  313. <el-row :gutter="20">
  314. <el-col :span="8" v-if="isShow('监测时间')">
  315. <el-form-item label="监测时间:">
  316. <!-- {{ monitor_date_str }}
  317. <el-time-picker v-model="form.monitoring_time" :clearable="false" arrow-control :picker-options="{format: 'HH:mm'}" prefix-icon="" value-format="HH:mm" style="width: 60%;">
  318. </el-time-picker> -->
  319. <el-date-picker
  320. v-model="form.operate_time"
  321. type="datetime"
  322. prefix-icon=""
  323. style="width: 100%"
  324. format="yyyy-MM-dd HH:mm"
  325. value-format="timestamp"
  326. ></el-date-picker>
  327. </el-form-item>
  328. </el-col>
  329. <el-col :span="8" v-if="isShow('体温')">
  330. <el-form-item label="体温(℃):">
  331. <el-input v-model="form.temperature"></el-input>
  332. </el-form-item>
  333. </el-col>
  334. <el-col :span="8" v-if="isShow('收缩压')">
  335. <el-form-item label="收缩压(mmHg):">
  336. <el-input v-model="form.systolic_bp"></el-input>
  337. </el-form-item>
  338. </el-col>
  339. <el-col :span="8" v-if="isShow('舒张压')">
  340. <el-form-item label="舒张压(mmHg):">
  341. <el-input v-model="form.diastolic_bp"></el-input>
  342. </el-form-item>
  343. </el-col>
  344. <el-col :span="8" v-if="isShow('脉搏')">
  345. <el-form-item label="脉搏(次/分):">
  346. <el-input v-model="form.pulse_frequency"></el-input>
  347. </el-form-item>
  348. </el-col>
  349. <el-col :span="8" v-if="isShow('呼吸频率')">
  350. <el-form-item label="呼吸频率(次/分):">
  351. <el-input v-model="form.breathing_rated"></el-input>
  352. </el-form-item>
  353. </el-col>
  354. <el-col :span="8" v-if="isShow('静脉压')">
  355. <el-form-item label="静脉压(mmHg):">
  356. <el-input
  357. style="width: 140px"
  358. v-model="form.venous_pressure"
  359. ></el-input>
  360. <el-button
  361. size="mini"
  362. type="primary"
  363. @click="venousPressureChange(1)"
  364. >转换</el-button
  365. >
  366. </el-form-item>
  367. </el-col>
  368. <el-col :span="8" v-if="isShow('动脉压')">
  369. <el-form-item label="动脉压(mmHg):">
  370. <el-input
  371. style="width: 140px"
  372. v-model="form.arterial_pressure"
  373. ></el-input>
  374. <el-button
  375. size="mini"
  376. type="primary"
  377. @click="venousPressureChange(3)"
  378. >转换</el-button
  379. >
  380. </el-form-item>
  381. </el-col>
  382. <el-col :span="8" v-if="isShow('血流量')">
  383. <el-form-item label="血流量(ml/min):">
  384. <el-input v-model="form.blood_flow_volume"></el-input>
  385. </el-form-item>
  386. </el-col>
  387. <el-col :span="8" v-if="isShow('跨膜压')">
  388. <el-form-item label="跨膜压(mmHg):">
  389. <el-input
  390. style="width: 140px"
  391. v-model="form.transmembrane_pressure"
  392. ></el-input>
  393. <el-button
  394. size="mini"
  395. type="primary"
  396. @click="venousPressureChange(2)"
  397. >转换</el-button
  398. >
  399. </el-form-item>
  400. </el-col>
  401. <el-col :span="8" v-if="isShow('超滤率')">
  402. <el-form-item label="超滤率(ml/h)">
  403. <el-input v-model="form.ultrafiltration_rate"></el-input>
  404. </el-form-item>
  405. </el-col>
  406. <el-col :span="8" v-if="isShow('超滤量')">
  407. <el-form-item label="超滤量(L):">
  408. <el-input v-model="form.ultrafiltration_volume"></el-input>
  409. </el-form-item>
  410. </el-col>
  411. <el-col :span="8" v-if="isShow('钠浓度')">
  412. <el-form-item label="钠浓度(mmol/L):">
  413. <el-input v-model="form.sodium_concentration"></el-input>
  414. </el-form-item>
  415. </el-col>
  416. <!-- </el-row>
  417. <el-row :gutter="20"> -->
  418. <el-col :span="8" v-if="isShow('透析液温度')">
  419. <el-form-item label="透析液温度(℃):">
  420. <el-input v-model="form.dialysate_temperature"></el-input>
  421. </el-form-item>
  422. </el-col>
  423. <el-col :span="8" v-if="isShow('置换率')">
  424. <el-form-item label="置换率(L/h):">
  425. <el-input v-model="form.replacement_rate"></el-input>
  426. </el-form-item>
  427. </el-col>
  428. <el-col :span="8" v-if="isShow('置换量')">
  429. <el-form-item label="置换量(L):">
  430. <el-input v-model="form.displacement_quantity"></el-input>
  431. </el-form-item>
  432. </el-col>
  433. <el-col :span="8" v-if="isShow('电导度')">
  434. <el-form-item label="电导度(mS/m):">
  435. <el-input v-model="form.conductivity"></el-input>
  436. </el-form-item>
  437. </el-col>
  438. <el-col :span="8" v-if="isShow('置换液流量')">
  439. <el-form-item label="置换液流量(ml/h):">
  440. <el-input v-model="form.displacement_flow_quantity"></el-input>
  441. </el-form-item>
  442. </el-col>
  443. <el-col :span="8" v-if="isShow('SpO₂')">
  444. <el-form-item label="SpO₂(%):">
  445. <el-input v-model="form.blood_oxygen_saturation"></el-input>
  446. </el-form-item>
  447. </el-col>
  448. <!-- </el-row>
  449. <el-row :gutter="20"> -->
  450. <el-col :span="24" v-if="isShow('KT/V')">
  451. <el-form-item label="KT/V(在线):">
  452. <el-input type="textarea" :rows="4" v-model="form.ktv"></el-input>
  453. </el-form-item>
  454. </el-col>
  455. <!-- </el-row>
  456. <el-row :gutter="20"> -->
  457. <el-col :span="24" v-if="isShow('病情变化')">
  458. <el-form-item label="病情变化:">
  459. <el-select
  460. v-model="symptom_selecteds"
  461. style="width: 100%"
  462. :multiple="true"
  463. collapse-tags
  464. @change="symptomSelectorChange"
  465. >
  466. <el-option
  467. v-for="(symptom, index) in symptom_options"
  468. :key="index"
  469. :label="symptom.name"
  470. :value="symptom.name"
  471. ></el-option>
  472. </el-select>
  473. </el-form-item>
  474. </el-col>
  475. <!-- </el-row>
  476. <el-row :gutter="20"> -->
  477. <el-col :span="24" v-if="isShow('病情变化')">
  478. <el-form-item>
  479. <el-input
  480. type="textarea"
  481. :rows="4"
  482. v-model="form.symptom"
  483. @blur="symptomTextareaBlur"
  484. ></el-input>
  485. </el-form-item>
  486. </el-col>
  487. <!-- </el-row>
  488. <el-row :gutter="20"> -->
  489. <el-col :span="24" v-if="isShow('处理')">
  490. <el-form-item label="处理:">
  491. <el-select
  492. v-model="dispose_selecteds"
  493. style="width: 100%"
  494. :multiple="true"
  495. collapse-tags
  496. @change="disposeSelectorChange"
  497. >
  498. <el-option
  499. v-for="(dispose, index) in dispose_options"
  500. :key="index"
  501. :label="dispose.name"
  502. :value="dispose.name"
  503. ></el-option>
  504. </el-select>
  505. </el-form-item>
  506. </el-col>
  507. <!-- </el-row>
  508. <el-row :gutter="20"> -->
  509. <el-col :span="24" v-if="isShow('处理')">
  510. <el-form-item>
  511. <el-input
  512. type="textarea"
  513. :rows="4"
  514. v-model="form.dispose"
  515. @blur="disposeTextareaBlur"
  516. ></el-input>
  517. </el-form-item>
  518. </el-col>
  519. <!-- </el-row>
  520. <el-row :gutter="20"> -->
  521. <el-col :span="24" v-if="isShow('结果')">
  522. <el-form-item label="结果:">
  523. <el-select
  524. v-model="result_selecteds"
  525. style="width: 100%"
  526. :multiple="true"
  527. collapse-tags
  528. @change="resultSelectorChange"
  529. >
  530. <el-option
  531. v-for="(result, index) in result_options"
  532. :key="index"
  533. :label="result.name"
  534. :value="result.name"
  535. ></el-option>
  536. </el-select>
  537. </el-form-item>
  538. </el-col>
  539. <!-- </el-row>
  540. <el-row :gutter="20"> -->
  541. <el-col :span="24" v-if="isShow('结果')">
  542. <el-form-item>
  543. <el-input
  544. type="textarea"
  545. :rows="4"
  546. v-model="form.result"
  547. @blur="resultTextareaBlur"
  548. ></el-input>
  549. </el-form-item>
  550. </el-col>
  551. </el-row>
  552. </el-form>
  553. <div slot="footer" class="dialog-footer" v-show="edit">
  554. <el-button @click="cancelEditAction">取 消</el-button>
  555. <el-button type="primary" @click="submitAction">保 存</el-button>
  556. </div>
  557. <!--</div>-->
  558. </el-dialog>
  559. </div>
  560. </template>
  561. <script>
  562. import { parseTime } from "@/utils";
  563. import { getDataConfig } from "@/utils/data";
  564. import {
  565. editMonitor,
  566. postDelMonitorInfo,
  567. getTodayMonitor
  568. } from "@/api/dialysis_record";
  569. import store from "@/store";
  570. export default {
  571. name: "MonitorDialog",
  572. data() {
  573. return {
  574. visible: false,
  575. edit: false,
  576. current_row_class: "current-box-class",
  577. creator:0,
  578. patient_id: 0,
  579. schedule_date: 0,
  580. template_id: 0,
  581. isAdd: false,
  582. // monitoring_date: 0,
  583. form: {
  584. id: 0,
  585. monitoring_date: 0, // 监测日期
  586. // operate_date: 0, // 实际测量日期
  587. // monitoring_time: "", // 监测时间 HH:mm
  588. operate_time: 0,
  589. systolic_bp: "", // 收缩压
  590. diastolic_bp: "", // 舒张压
  591. pulse_frequency: "", // 心率
  592. temperature: "", // 体温
  593. breathing_rated: "", // 呼吸频率
  594. blood_flow_volume: "", // 血流量
  595. venous_pressure: "", // 静脉压
  596. transmembrane_pressure: "", // 跨膜压
  597. ultrafiltration_volume: "", // 超滤量
  598. ultrafiltration_rate: "", // 超滤率
  599. arterial_pressure: "", // 动脉压
  600. sodium_concentration: "", // 钠浓度
  601. dialysate_temperature: "", // 透析液温度
  602. replacement_rate: "", // 置换率
  603. displacement_quantity: "", // 置换量
  604. conductivity: "", // 电导度
  605. displacement_flow_quantity: "", // 置换液流量
  606. ktv: "", // KT/V
  607. symptom: "", // 病情变化
  608. dispose: "", // 处理
  609. result: "", // 结果,
  610. blood_oxygen_saturation: "" // 血氧饱和度
  611. },
  612. table_current_row: null,
  613. symptom_selecteds: [],
  614. symptom_options: getDataConfig("hemodialysis", "symptoms"),
  615. dispose_selecteds: [],
  616. dispose_options: getDataConfig("hemodialysis", "deals"),
  617. result_selecteds: [],
  618. result_options: getDataConfig("hemodialysis", "results")
  619. };
  620. },
  621. props: {
  622. monitors: {
  623. type: Array
  624. }
  625. },
  626. computed: {
  627. monitor_date_str: function() {
  628. return parseTime(this.form.monitoring_date, "{y}-{m}-{d}");
  629. }
  630. },
  631. created() {
  632. this.template_id = this.$store.getters.xt_user.template_info.template_id;
  633. var date = this.$route.query.date;
  634. var patient_id = this.$route.query.patient_id;
  635. this.patient_id = patient_id;
  636. this.schedule_date = date;
  637. this.form.monitoring_date = date;
  638. // this.form.operate_date = parseInt((new Date()).getTime() / 1000)
  639. // this.form.monitoring_time = parseTime(new Date(), "{h}:{i}")
  640. this.form.operate_time = new Date().getTime();
  641. },
  642. methods: {
  643. venousPressureChange(type) {
  644. if (type == 1) {
  645. this.form.venous_pressure = Math.ceil(
  646. Math.round(this.form.venous_pressure * 7.5)
  647. );
  648. } else if (type == 2) {
  649. this.form.transmembrane_pressure = Math.ceil(
  650. Math.round(this.form.transmembrane_pressure * 7.5)
  651. );
  652. } else {
  653. this.form.arterial_pressure = Math.ceil(
  654. Math.round(this.form.arterial_pressure * 7.5)
  655. );
  656. }
  657. },
  658. isShow(name) {
  659. var filedList = store.getters.xt_user.fileds;
  660. for (let i = 0; i < filedList.length; i++) {
  661. if (
  662. filedList[i].module == 4 &&
  663. filedList[i].filed_name_cn == name &&
  664. filedList[i].is_show == 1
  665. ) {
  666. return true;
  667. }
  668. }
  669. return false;
  670. },
  671. reset: function() {
  672. this.cancelEditAction();
  673. },
  674. show() {
  675. this.visible = true;
  676. },
  677. hide() {
  678. this.visible = false;
  679. },
  680. getMonitorDate: function(monitor) {
  681. return parseTime(monitor.operate_time, "{y}-{m}-{d} {h}:{i}");
  682. },
  683. newRecordAction: function() {
  684. this.setEditMonitor(null);
  685. this.$refs.table.setCurrentRow(null);
  686. this.edit = true;
  687. this.isAdd = true;
  688. this.getLastRecordTody();
  689. },
  690. getLastRecordTody() {
  691. const params = {
  692. patient_id: this.patient_id
  693. };
  694. getTodayMonitor(params).then(rs => {
  695. var resp = rs.data.data;
  696. this.form.operate_time = resp.monitor.operate_time
  697. ? (resp.monitor.operate_time + 3600) * 1000
  698. : Date.parse(new Date());
  699. this.form.pulse_frequency = ""; // this.last_monitor_record.pulse_frequency;
  700. this.form.breathing_rated = resp.monitor.breathing_rate
  701. ? resp.monitor.breathing_rate
  702. : "";
  703. this.form.systolic_bp = ""; // this.last_monitor_record.systolic_blood_pressure;
  704. this.form.diastolic_bp = ""; // this.last_monitor_record.diastolic_blood_pressure;
  705. this.form.blood_flow_volume = resp.monitor.blood_flow_volume
  706. ? resp.monitor.blood_flow_volume
  707. : "";
  708. this.form.venous_pressure = ""; // this.last_monitor_record.venous_pressure;
  709. this.form.arterial_pressure = ""; // this.last_monitor_record.arterial_pressure;
  710. this.form.transmembrane_pressure = ""; // this.last_monitor_record.transmembrane_pressure;
  711. this.form.ultrafiltration_rate = resp.monitor.ultrafiltration_rate
  712. ? resp.monitor.ultrafiltration_rate
  713. : "";
  714. this.form.ultrafiltration_volume = resp.monitor.ultrafiltration_volume
  715. ? resp.monitor.ultrafiltration_volume
  716. : "";
  717. this.form.sodium_concentration = resp.monitor.sodium_concentration
  718. ? resp.monitor.sodium_concentration
  719. : "";
  720. this.form.dialysate_temperature = resp.monitor.dialysate_temperature
  721. ? resp.monitor.dialysate_temperature
  722. : "";
  723. this.form.temperature = resp.monitor.temperature
  724. ? resp.monitor.temperature
  725. : "";
  726. this.form.replacement_rate = resp.monitor.replacement_rate
  727. ? resp.monitor.replacement_rate
  728. : "";
  729. this.form.displacement_quantity = ""; // this.last_monitor_record.displacement_quantity;
  730. this.form.conductivity = "";
  731. this.form.displacement_flow_quantity = "";
  732. this.form.ktv = ""; // this.last_monitor_record.ktv;
  733. this.form.symptom = ""; // this.last_monitor_record.symptom;
  734. this.form.dispose = ""; // this.last_monitor_record.dispose;
  735. this.form.result = ""; // this.last_monitor_record.result;
  736. });
  737. },
  738. modifyRecordAction: function() {
  739. if (this.table_current_row == null) {
  740. this.$message.error("请选择一条监测记录");
  741. return;
  742. }
  743. this.creator = this.table_current_row.creator
  744. console.log( this.table_current_row)
  745. console.log( this.table_current_row.creator)
  746. console.log(this.creator)
  747. this.setEditMonitor(this.table_current_row);
  748. this.$refs.table.setCurrentRow(null);
  749. this.edit = true;
  750. this.isAdd = false;
  751. },
  752. cancelEditAction: function() {
  753. this.setEditMonitor(null);
  754. this.$refs.table.setCurrentRow(null);
  755. this.edit = false;
  756. },
  757. tableCurrentRowChange: function(currentRow) {
  758. this.table_current_row = currentRow;
  759. // console.log("tableCurrentRowChange", currentRow)
  760. },
  761. setEditMonitor: function(monitor) {
  762. if (monitor == null || monitor == undefined) {
  763. this.form.id = 0;
  764. // this.form.operate_date = parseInt((new Date()).getTime() / 1000)
  765. // this.form.monitoring_time = parseTime(new Date(), "{h}:{i}")
  766. this.form.operate_time = new Date().getTime();
  767. this.form.systolic_bp = "";
  768. this.form.diastolic_bp = "";
  769. this.form.pulse_frequency = "";
  770. this.form.breathing_rated = "";
  771. this.form.blood_flow_volume = "";
  772. this.form.temperature = "";
  773. this.form.venous_pressure = "";
  774. this.form.transmembrane_pressure = "";
  775. this.form.ultrafiltration_volume = "";
  776. this.form.ultrafiltration_rate = "";
  777. this.form.arterial_pressure = "";
  778. this.form.sodium_concentration = "";
  779. this.form.dialysate_temperature = "";
  780. this.form.replacement_rate = "";
  781. this.form.displacement_quantity = "";
  782. this.form.conductivity = "";
  783. this.form.displacement_flow_quantity = "";
  784. this.form.ktv = "";
  785. this.form.symptom = "";
  786. this.form.dispose = "";
  787. this.form.result = "";
  788. this.symptom_selecteds = [];
  789. this.dispose_selecteds = [];
  790. this.result_selecteds = [];
  791. } else {
  792. (this.form.id = monitor.id),
  793. // this.form.operate_date = monitor.operate_date
  794. // this.form.monitoring_time = monitor.monitoring_time
  795. (this.form.operate_time = monitor.operate_time * 1000);
  796. this.form.systolic_bp = monitor.systolic_blood_pressure
  797. ? monitor.systolic_blood_pressure
  798. : "";
  799. this.form.temperature = monitor.temperature ? monitor.temperature : "";
  800. this.form.diastolic_bp = monitor.diastolic_blood_pressure
  801. ? monitor.diastolic_blood_pressure
  802. : "";
  803. this.form.pulse_frequency = monitor.pulse_frequency
  804. ? monitor.pulse_frequency
  805. : "";
  806. this.form.breathing_rated = monitor.breathing_rate
  807. ? monitor.breathing_rate
  808. : "";
  809. this.form.blood_flow_volume = monitor.blood_flow_volume
  810. ? monitor.blood_flow_volume
  811. : "";
  812. this.form.venous_pressure = monitor.venous_pressure
  813. ? monitor.venous_pressure
  814. : "";
  815. this.form.transmembrane_pressure = monitor.transmembrane_pressure
  816. ? monitor.transmembrane_pressure
  817. : "";
  818. this.form.ultrafiltration_volume = monitor.ultrafiltration_volume
  819. ? monitor.ultrafiltration_volume
  820. : "";
  821. this.form.ultrafiltration_rate = monitor.ultrafiltration_rate
  822. ? monitor.ultrafiltration_rate
  823. : "";
  824. this.form.arterial_pressure = monitor.arterial_pressure
  825. ? monitor.arterial_pressure
  826. : "";
  827. this.form.sodium_concentration = monitor.sodium_concentration
  828. ? monitor.sodium_concentration
  829. : "";
  830. this.form.dialysate_temperature = monitor.dialysate_temperature
  831. ? monitor.dialysate_temperature
  832. : "";
  833. this.form.replacement_rate = monitor.replacement_rate
  834. ? monitor.replacement_rate
  835. : "";
  836. this.form.displacement_quantity = monitor.displacement_quantity
  837. ? monitor.displacement_quantity
  838. : "";
  839. this.form.conductivity = monitor.conductivity
  840. ? monitor.conductivity
  841. : "";
  842. this.form.displacement_flow_quantity = monitor.displacement_flow_quantity
  843. ? monitor.displacement_flow_quantity
  844. : "";
  845. this.form.ktv = monitor.ktv;
  846. this.form.symptom = monitor.symptom;
  847. this.form.dispose = monitor.dispose;
  848. this.form.result = monitor.result;
  849. this.form.blood_oxygen_saturation = monitor.blood_oxygen_saturation;
  850. // 设置三个下拉框的值,直接调用事件偷懒
  851. this.symptomTextareaBlur();
  852. this.disposeTextareaBlur();
  853. this.resultTextareaBlur();
  854. }
  855. },
  856. submitAction: function() {
  857. // TODO loading
  858. var is_new = this.form.id;
  859. this.form.operate_time = parseInt(this.form.operate_time / 1000);
  860. this.form.systolic_bp =
  861. parseFloat(this.form.systolic_bp) == NaN
  862. ? 0
  863. : parseFloat(this.form.systolic_bp);
  864. this.form.diastolic_bp =
  865. parseFloat(this.form.diastolic_bp) == NaN
  866. ? 0
  867. : parseFloat(this.form.diastolic_bp);
  868. this.form.temperature =
  869. parseFloat(this.form.temperature) == NaN
  870. ? 0
  871. : parseFloat(this.form.temperature);
  872. this.form.pulse_frequency =
  873. parseFloat(this.form.pulse_frequency) == NaN
  874. ? 0
  875. : parseFloat(this.form.pulse_frequency);
  876. this.form.breathing_rated =
  877. parseFloat(this.form.breathing_rated) == NaN
  878. ? 0
  879. : parseFloat(this.form.breathing_rated);
  880. this.form.blood_flow_volume =
  881. parseFloat(this.form.blood_flow_volume) == NaN
  882. ? 0
  883. : parseFloat(this.form.blood_flow_volume);
  884. this.form.venous_pressure =
  885. parseFloat(this.form.venous_pressure) == NaN
  886. ? 0
  887. : parseFloat(this.form.venous_pressure);
  888. this.form.transmembrane_pressure =
  889. parseFloat(this.form.transmembrane_pressure) == NaN
  890. ? 0
  891. : parseFloat(this.form.transmembrane_pressure);
  892. this.form.ultrafiltration_volume =
  893. parseFloat(this.form.ultrafiltration_volume) == NaN
  894. ? 0
  895. : parseFloat(this.form.ultrafiltration_volume);
  896. this.form.ultrafiltration_rate =
  897. parseFloat(this.form.ultrafiltration_rate) == NaN
  898. ? 0
  899. : parseFloat(this.form.ultrafiltration_rate);
  900. this.form.arterial_pressure =
  901. parseFloat(this.form.arterial_pressure) == NaN
  902. ? 0
  903. : parseFloat(this.form.arterial_pressure);
  904. this.form.sodium_concentration =
  905. parseFloat(this.form.sodium_concentration) == NaN
  906. ? 0
  907. : parseFloat(this.form.sodium_concentration);
  908. this.form.dialysate_temperature =
  909. parseFloat(this.form.dialysate_temperature) == NaN
  910. ? 0
  911. : parseFloat(this.form.dialysate_temperature);
  912. this.form.replacement_rate =
  913. parseFloat(this.form.replacement_rate) == NaN
  914. ? 0
  915. : parseFloat(this.form.replacement_rate);
  916. this.form.displacement_quantity =
  917. parseFloat(this.form.displacement_quantity) == NaN
  918. ? 0
  919. : parseFloat(this.form.displacement_quantity);
  920. this.form.conductivity =
  921. parseFloat(this.form.conductivity) == NaN
  922. ? 0
  923. : parseFloat(this.form.conductivity);
  924. this.form.displacement_flow_quantity =
  925. parseFloat(this.form.displacement_flow_quantity) == NaN
  926. ? 0
  927. : parseFloat(this.form.displacement_flow_quantity);
  928. this.form.ktv =
  929. parseFloat(this.form.ktv) == NaN ? 0 : parseFloat(this.form.ktv);
  930. this.form.monitoring_date = parseInt(this.form.monitoring_date);
  931. let mode = "1"
  932. if(this.form.id > 0){
  933. mode = "2"
  934. if(this.creator > 0 && this.creator!= this.$store.getters.xt_user.user.id){
  935. mode = "3"
  936. }
  937. }
  938. editMonitor(this.patient_id, this.schedule_date, this.form,mode).then(rs => {
  939. var resp = rs.data;
  940. if (resp.state == 1) {
  941. var monitor = resp.data.monitor;
  942. if (this.isAdd) {
  943. this.monitors.unshift(monitor);
  944. this.monitors.sort((a, b) => b.operate_time - a.operate_time);
  945. this.monitors.reverse();
  946. } else {
  947. for (let index = 0; index < this.monitors.length; index++) {
  948. const m = this.monitors[index];
  949. if (m.id == monitor.id) {
  950. for (const key in monitor) {
  951. m[key] = monitor[key];
  952. }
  953. break;
  954. }
  955. }
  956. }
  957. this.reset();
  958. } else {
  959. this.form.systolic_bp =
  960. parseFloat(this.form.systolic_bp) == NaN
  961. ? 0
  962. : parseFloat(this.form.systolic_bp);
  963. this.form.diastolic_bp =
  964. parseFloat(this.form.diastolic_bp) == NaN
  965. ? 0
  966. : parseFloat(this.form.diastolic_bp);
  967. this.form.temperature =
  968. parseFloat(this.form.temperature) == NaN
  969. ? 0
  970. : parseFloat(this.form.temperature);
  971. this.form.pulse_frequency =
  972. parseFloat(this.form.pulse_frequency) == NaN
  973. ? 0
  974. : parseFloat(this.form.pulse_frequency);
  975. this.form.breathing_rated =
  976. parseFloat(this.form.breathing_rated) == NaN
  977. ? 0
  978. : parseFloat(this.form.breathing_rated);
  979. this.form.blood_flow_volume =
  980. parseFloat(this.form.blood_flow_volume) == NaN
  981. ? 0
  982. : parseFloat(this.form.blood_flow_volume);
  983. this.form.venous_pressure =
  984. parseFloat(this.form.venous_pressure) == NaN
  985. ? 0
  986. : parseFloat(this.form.venous_pressure);
  987. this.form.transmembrane_pressure =
  988. parseFloat(this.form.transmembrane_pressure) == NaN
  989. ? 0
  990. : parseFloat(this.form.transmembrane_pressure);
  991. this.form.ultrafiltration_volume =
  992. parseFloat(this.form.ultrafiltration_volume) == NaN
  993. ? 0
  994. : parseFloat(this.form.ultrafiltration_volume);
  995. this.form.ultrafiltration_rate =
  996. parseFloat(this.form.ultrafiltration_rate) == NaN
  997. ? 0
  998. : parseFloat(this.form.ultrafiltration_rate);
  999. this.form.arterial_pressure =
  1000. parseFloat(this.form.arterial_pressure) == NaN
  1001. ? 0
  1002. : parseFloat(this.form.arterial_pressure);
  1003. this.form.sodium_concentration =
  1004. parseFloat(this.form.sodium_concentration) == NaN
  1005. ? 0
  1006. : parseFloat(this.form.sodium_concentration);
  1007. this.form.dialysate_temperature =
  1008. parseFloat(this.form.dialysate_temperature) == NaN
  1009. ? 0
  1010. : parseFloat(this.form.dialysate_temperature);
  1011. this.form.replacement_rate =
  1012. parseFloat(this.form.replacement_rate) == NaN
  1013. ? 0
  1014. : parseFloat(this.form.replacement_rate);
  1015. this.form.displacement_quantity =
  1016. parseFloat(this.form.displacement_quantity) == NaN
  1017. ? 0
  1018. : parseFloat(this.form.displacement_quantity);
  1019. this.form.conductivity =
  1020. parseFloat(this.form.conductivity) == NaN
  1021. ? 0
  1022. : parseFloat(this.form.conductivity);
  1023. this.form.displacement_flow_quantity =
  1024. parseFloat(this.form.displacement_flow_quantity) == NaN
  1025. ? 0
  1026. : parseFloat(this.form.displacement_flow_quantity);
  1027. this.form.ktv =
  1028. parseFloat(this.form.ktv) == NaN ? 0 : parseFloat(this.form.ktv);
  1029. this.$message.error(resp.msg);
  1030. }
  1031. });
  1032. },
  1033. symptomTextareaBlur: function() {
  1034. if (this.form.symptom.length > 0) {
  1035. this.symptom_selecteds = this.form.symptom.split(",");
  1036. } else {
  1037. this.symptom_selecteds = [];
  1038. }
  1039. },
  1040. symptomSelectorChange: function() {
  1041. if (this.symptom_selecteds.length > 0) {
  1042. this.form.symptom = this.symptom_selecteds.join(",") + ",";
  1043. } else {
  1044. this.form.symptom = "";
  1045. }
  1046. },
  1047. disposeTextareaBlur: function() {
  1048. if (this.form.dispose.length > 0) {
  1049. this.dispose_selecteds = this.form.dispose.split(",");
  1050. } else {
  1051. this.dispose_selecteds = [];
  1052. }
  1053. },
  1054. disposeSelectorChange: function() {
  1055. if (this.dispose_selecteds.length > 0) {
  1056. this.form.dispose = this.dispose_selecteds.join(",") + ",";
  1057. } else {
  1058. this.form.dispose = "";
  1059. }
  1060. },
  1061. resultTextareaBlur: function() {
  1062. if (this.form.result.length > 0) {
  1063. this.result_selecteds = this.form.result.split(",");
  1064. } else {
  1065. this.result_selecteds = [];
  1066. }
  1067. },
  1068. setRecords(records) {
  1069. this.monitors = records;
  1070. },
  1071. resultSelectorChange: function() {
  1072. if (this.result_selecteds.length > 0) {
  1073. this.form.result = this.result_selecteds.join(",") + ",";
  1074. } else {
  1075. this.form.result = "";
  1076. }
  1077. },
  1078. deleteRecordAction: function() {
  1079. if (this.table_current_row == null) {
  1080. this.$message.error("请选择一条监测记录");
  1081. return;
  1082. }
  1083. this.$confirm("删除记录", "是否删除该监测记录", {
  1084. confirmButtonText: "确定",
  1085. cancelButtonText: "取消",
  1086. type: "warning"
  1087. })
  1088. .then(() => {
  1089. let mode = "4"
  1090. if(this.table_current_row.creator > 0 && this.table_current_row.creator != this.$store.getters.xt_user.user.id){
  1091. mode = "5"
  1092. }
  1093. const params = {
  1094. patient_id: this.patient_id,
  1095. record_id: this.table_current_row.id,
  1096. mode: mode
  1097. };
  1098. postDelMonitorInfo(params).then(response => {
  1099. if (response.data.state == 0) {
  1100. this.$message.error(response.data.msg);
  1101. return false;
  1102. } else {
  1103. const record_id = response.data.data.record_id;
  1104. for (let i = 0; i < this.monitors.length; i++) {
  1105. if (this.monitors[i].id == record_id) {
  1106. this.monitors.splice(i, 1);
  1107. }
  1108. }
  1109. this.$message.success("删除成功");
  1110. }
  1111. });
  1112. })
  1113. .catch(() => {});
  1114. }
  1115. }
  1116. };
  1117. </script>
  1118. <style style="stylesheet/scss" lang="scss" scoped>
  1119. .grid {
  1120. padding: 10px 0 20px 0;
  1121. .list {
  1122. ul {
  1123. @include display-flex;
  1124. @include align-items-center;
  1125. @include text-align;
  1126. @include justify-content-around;
  1127. cursor: pointer;
  1128. li {
  1129. font-size: 12px;
  1130. color: #5d6b7a;
  1131. margin-top: 20px;
  1132. p {
  1133. height: 30px;
  1134. line-height: 30px;
  1135. color: #34495e;
  1136. font-size: 14px;
  1137. }
  1138. img {
  1139. width: 50px;
  1140. height: 50px;
  1141. }
  1142. }
  1143. }
  1144. }
  1145. }
  1146. .txsj {
  1147. text-align: center;
  1148. margin-bottom: 20px;
  1149. }
  1150. .current-box-class::-webkit-scrollbar {
  1151. height: 20px; /*滚动条高度*/
  1152. }
  1153. </style>
  1154. <style style="stylesheet/scss" lang="scss">
  1155. .dialog_box .current-box-class .current-row > td {
  1156. background: #6fb5fa;
  1157. color: white;
  1158. /* font-size: 12px; */
  1159. }
  1160. .dialog_box .current-box-class .current-row:hover > td {
  1161. background: #6fb5fa;
  1162. color: white;
  1163. /* font-size: 12px; */
  1164. }
  1165. .el-table__body-wrapper::-webkit-scrollbar {
  1166. height: 20px;
  1167. }
  1168. </style>