monitor_dialog.vue 37KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134
  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. patient_id: 0,
  578. schedule_date: 0,
  579. template_id: 0,
  580. isAdd: false,
  581. // monitoring_date: 0,
  582. form: {
  583. id: 0,
  584. monitoring_date: 0, // 监测日期
  585. // operate_date: 0, // 实际测量日期
  586. // monitoring_time: "", // 监测时间 HH:mm
  587. operate_time: 0,
  588. systolic_bp: "", // 收缩压
  589. diastolic_bp: "", // 舒张压
  590. pulse_frequency: "", // 心率
  591. temperature: "", // 体温
  592. breathing_rated: "", // 呼吸频率
  593. blood_flow_volume: "", // 血流量
  594. venous_pressure: "", // 静脉压
  595. transmembrane_pressure: "", // 跨膜压
  596. ultrafiltration_volume: "", // 超滤量
  597. ultrafiltration_rate: "", // 超滤率
  598. arterial_pressure: "", // 动脉压
  599. sodium_concentration: "", // 钠浓度
  600. dialysate_temperature: "", // 透析液温度
  601. replacement_rate: "", // 置换率
  602. displacement_quantity: "", // 置换量
  603. conductivity: "", // 电导度
  604. displacement_flow_quantity: "", // 置换液流量
  605. ktv: "", // KT/V
  606. symptom: "", // 病情变化
  607. dispose: "", // 处理
  608. result: "", // 结果,
  609. blood_oxygen_saturation: "" // 血氧饱和度
  610. },
  611. table_current_row: null,
  612. symptom_selecteds: [],
  613. symptom_options: getDataConfig("hemodialysis", "symptoms"),
  614. dispose_selecteds: [],
  615. dispose_options: getDataConfig("hemodialysis", "deals"),
  616. result_selecteds: [],
  617. result_options: getDataConfig("hemodialysis", "results")
  618. };
  619. },
  620. props: {
  621. monitors: {
  622. type: Array
  623. }
  624. },
  625. computed: {
  626. monitor_date_str: function() {
  627. return parseTime(this.form.monitoring_date, "{y}-{m}-{d}");
  628. }
  629. },
  630. created() {
  631. this.template_id = this.$store.getters.xt_user.template_info.template_id;
  632. var date = this.$route.query.date;
  633. var patient_id = this.$route.query.patient_id;
  634. this.patient_id = patient_id;
  635. this.schedule_date = date;
  636. this.form.monitoring_date = date;
  637. // this.form.operate_date = parseInt((new Date()).getTime() / 1000)
  638. // this.form.monitoring_time = parseTime(new Date(), "{h}:{i}")
  639. this.form.operate_time = new Date().getTime();
  640. },
  641. methods: {
  642. venousPressureChange(type) {
  643. if (type == 1) {
  644. this.form.venous_pressure = Math.ceil(
  645. Math.round(this.form.venous_pressure * 7.5)
  646. );
  647. } else if (type == 2) {
  648. this.form.transmembrane_pressure = Math.ceil(
  649. Math.round(this.form.transmembrane_pressure * 7.5)
  650. );
  651. } else {
  652. this.form.arterial_pressure = Math.ceil(
  653. Math.round(this.form.arterial_pressure * 7.5)
  654. );
  655. }
  656. },
  657. isShow(name) {
  658. var filedList = store.getters.xt_user.fileds;
  659. for (let i = 0; i < filedList.length; i++) {
  660. if (
  661. filedList[i].module == 4 &&
  662. filedList[i].filed_name_cn == name &&
  663. filedList[i].is_show == 1
  664. ) {
  665. return true;
  666. }
  667. }
  668. return false;
  669. },
  670. reset: function() {
  671. this.cancelEditAction();
  672. },
  673. show() {
  674. this.visible = true;
  675. },
  676. hide() {
  677. this.visible = false;
  678. },
  679. getMonitorDate: function(monitor) {
  680. return parseTime(monitor.operate_time, "{y}-{m}-{d} {h}:{i}");
  681. },
  682. newRecordAction: function() {
  683. this.setEditMonitor(null);
  684. this.$refs.table.setCurrentRow(null);
  685. this.edit = true;
  686. this.isAdd = true;
  687. this.getLastRecordTody();
  688. },
  689. getLastRecordTody() {
  690. const params = {
  691. patient_id: this.patient_id
  692. };
  693. getTodayMonitor(params).then(rs => {
  694. var resp = rs.data.data;
  695. this.form.operate_time = resp.monitor.operate_time
  696. ? (resp.monitor.operate_time + 3600) * 1000
  697. : Date.parse(new Date());
  698. this.form.pulse_frequency = ""; // this.last_monitor_record.pulse_frequency;
  699. this.form.breathing_rated = resp.monitor.breathing_rate
  700. ? resp.monitor.breathing_rate
  701. : "";
  702. this.form.systolic_bp = ""; // this.last_monitor_record.systolic_blood_pressure;
  703. this.form.diastolic_bp = ""; // this.last_monitor_record.diastolic_blood_pressure;
  704. this.form.blood_flow_volume = resp.monitor.blood_flow_volume
  705. ? resp.monitor.blood_flow_volume
  706. : "";
  707. this.form.venous_pressure = ""; // this.last_monitor_record.venous_pressure;
  708. this.form.arterial_pressure = ""; // this.last_monitor_record.arterial_pressure;
  709. this.form.transmembrane_pressure = ""; // this.last_monitor_record.transmembrane_pressure;
  710. this.form.ultrafiltration_rate = resp.monitor.ultrafiltration_rate
  711. ? resp.monitor.ultrafiltration_rate
  712. : "";
  713. this.form.ultrafiltration_volume = resp.monitor.ultrafiltration_volume
  714. ? resp.monitor.ultrafiltration_volume
  715. : "";
  716. this.form.sodium_concentration = resp.monitor.sodium_concentration
  717. ? resp.monitor.sodium_concentration
  718. : "";
  719. this.form.dialysate_temperature = resp.monitor.dialysate_temperature
  720. ? resp.monitor.dialysate_temperature
  721. : "";
  722. this.form.temperature = resp.monitor.temperature
  723. ? resp.monitor.temperature
  724. : "";
  725. this.form.replacement_rate = resp.monitor.replacement_rate
  726. ? resp.monitor.replacement_rate
  727. : "";
  728. this.form.displacement_quantity = ""; // this.last_monitor_record.displacement_quantity;
  729. this.form.conductivity = "";
  730. this.form.displacement_flow_quantity = "";
  731. this.form.ktv = ""; // this.last_monitor_record.ktv;
  732. this.form.symptom = ""; // this.last_monitor_record.symptom;
  733. this.form.dispose = ""; // this.last_monitor_record.dispose;
  734. this.form.result = ""; // this.last_monitor_record.result;
  735. });
  736. },
  737. modifyRecordAction: function() {
  738. if (this.table_current_row == null) {
  739. this.$message.error("请选择一条监测记录");
  740. return;
  741. }
  742. this.setEditMonitor(this.table_current_row);
  743. this.$refs.table.setCurrentRow(null);
  744. this.edit = true;
  745. this.isAdd = false;
  746. },
  747. cancelEditAction: function() {
  748. this.setEditMonitor(null);
  749. this.$refs.table.setCurrentRow(null);
  750. this.edit = false;
  751. },
  752. tableCurrentRowChange: function(currentRow) {
  753. this.table_current_row = currentRow;
  754. // console.log("tableCurrentRowChange", currentRow)
  755. },
  756. setEditMonitor: function(monitor) {
  757. if (monitor == null || monitor == undefined) {
  758. this.form.id = 0;
  759. // this.form.operate_date = parseInt((new Date()).getTime() / 1000)
  760. // this.form.monitoring_time = parseTime(new Date(), "{h}:{i}")
  761. this.form.operate_time = new Date().getTime();
  762. this.form.systolic_bp = "";
  763. this.form.diastolic_bp = "";
  764. this.form.pulse_frequency = "";
  765. this.form.breathing_rated = "";
  766. this.form.blood_flow_volume = "";
  767. this.form.temperature = "";
  768. this.form.venous_pressure = "";
  769. this.form.transmembrane_pressure = "";
  770. this.form.ultrafiltration_volume = "";
  771. this.form.ultrafiltration_rate = "";
  772. this.form.arterial_pressure = "";
  773. this.form.sodium_concentration = "";
  774. this.form.dialysate_temperature = "";
  775. this.form.replacement_rate = "";
  776. this.form.displacement_quantity = "";
  777. this.form.conductivity = "";
  778. this.form.displacement_flow_quantity = "";
  779. this.form.ktv = "";
  780. this.form.symptom = "";
  781. this.form.dispose = "";
  782. this.form.result = "";
  783. this.symptom_selecteds = [];
  784. this.dispose_selecteds = [];
  785. this.result_selecteds = [];
  786. } else {
  787. (this.form.id = monitor.id),
  788. // this.form.operate_date = monitor.operate_date
  789. // this.form.monitoring_time = monitor.monitoring_time
  790. (this.form.operate_time = monitor.operate_time * 1000);
  791. this.form.systolic_bp = monitor.systolic_blood_pressure
  792. ? monitor.systolic_blood_pressure
  793. : "";
  794. this.form.temperature = monitor.temperature ? monitor.temperature : "";
  795. this.form.diastolic_bp = monitor.diastolic_blood_pressure
  796. ? monitor.diastolic_blood_pressure
  797. : "";
  798. this.form.pulse_frequency = monitor.pulse_frequency
  799. ? monitor.pulse_frequency
  800. : "";
  801. this.form.breathing_rated = monitor.breathing_rate
  802. ? monitor.breathing_rate
  803. : "";
  804. this.form.blood_flow_volume = monitor.blood_flow_volume
  805. ? monitor.blood_flow_volume
  806. : "";
  807. this.form.venous_pressure = monitor.venous_pressure
  808. ? monitor.venous_pressure
  809. : "";
  810. this.form.transmembrane_pressure = monitor.transmembrane_pressure
  811. ? monitor.transmembrane_pressure
  812. : "";
  813. this.form.ultrafiltration_volume = monitor.ultrafiltration_volume
  814. ? monitor.ultrafiltration_volume
  815. : "";
  816. this.form.ultrafiltration_rate = monitor.ultrafiltration_rate
  817. ? monitor.ultrafiltration_rate
  818. : "";
  819. this.form.arterial_pressure = monitor.arterial_pressure
  820. ? monitor.arterial_pressure
  821. : "";
  822. this.form.sodium_concentration = monitor.sodium_concentration
  823. ? monitor.sodium_concentration
  824. : "";
  825. this.form.dialysate_temperature = monitor.dialysate_temperature
  826. ? monitor.dialysate_temperature
  827. : "";
  828. this.form.replacement_rate = monitor.replacement_rate
  829. ? monitor.replacement_rate
  830. : "";
  831. this.form.displacement_quantity = monitor.displacement_quantity
  832. ? monitor.displacement_quantity
  833. : "";
  834. this.form.conductivity = monitor.conductivity
  835. ? monitor.conductivity
  836. : "";
  837. this.form.displacement_flow_quantity = monitor.displacement_flow_quantity
  838. ? monitor.displacement_flow_quantity
  839. : "";
  840. this.form.ktv = monitor.ktv;
  841. this.form.symptom = monitor.symptom;
  842. this.form.dispose = monitor.dispose;
  843. this.form.result = monitor.result;
  844. this.form.blood_oxygen_saturation = monitor.blood_oxygen_saturation;
  845. // 设置三个下拉框的值,直接调用事件偷懒
  846. this.symptomTextareaBlur();
  847. this.disposeTextareaBlur();
  848. this.resultTextareaBlur();
  849. }
  850. },
  851. submitAction: function() {
  852. // TODO loading
  853. var is_new = this.form.id;
  854. this.form.operate_time = parseInt(this.form.operate_time / 1000);
  855. this.form.systolic_bp =
  856. parseFloat(this.form.systolic_bp) == NaN
  857. ? 0
  858. : parseFloat(this.form.systolic_bp);
  859. this.form.diastolic_bp =
  860. parseFloat(this.form.diastolic_bp) == NaN
  861. ? 0
  862. : parseFloat(this.form.diastolic_bp);
  863. this.form.temperature =
  864. parseFloat(this.form.temperature) == NaN
  865. ? 0
  866. : parseFloat(this.form.temperature);
  867. this.form.pulse_frequency =
  868. parseFloat(this.form.pulse_frequency) == NaN
  869. ? 0
  870. : parseFloat(this.form.pulse_frequency);
  871. this.form.breathing_rated =
  872. parseFloat(this.form.breathing_rated) == NaN
  873. ? 0
  874. : parseFloat(this.form.breathing_rated);
  875. this.form.blood_flow_volume =
  876. parseFloat(this.form.blood_flow_volume) == NaN
  877. ? 0
  878. : parseFloat(this.form.blood_flow_volume);
  879. this.form.venous_pressure =
  880. parseFloat(this.form.venous_pressure) == NaN
  881. ? 0
  882. : parseFloat(this.form.venous_pressure);
  883. this.form.transmembrane_pressure =
  884. parseFloat(this.form.transmembrane_pressure) == NaN
  885. ? 0
  886. : parseFloat(this.form.transmembrane_pressure);
  887. this.form.ultrafiltration_volume =
  888. parseFloat(this.form.ultrafiltration_volume) == NaN
  889. ? 0
  890. : parseFloat(this.form.ultrafiltration_volume);
  891. this.form.ultrafiltration_rate =
  892. parseFloat(this.form.ultrafiltration_rate) == NaN
  893. ? 0
  894. : parseFloat(this.form.ultrafiltration_rate);
  895. this.form.arterial_pressure =
  896. parseFloat(this.form.arterial_pressure) == NaN
  897. ? 0
  898. : parseFloat(this.form.arterial_pressure);
  899. this.form.sodium_concentration =
  900. parseFloat(this.form.sodium_concentration) == NaN
  901. ? 0
  902. : parseFloat(this.form.sodium_concentration);
  903. this.form.dialysate_temperature =
  904. parseFloat(this.form.dialysate_temperature) == NaN
  905. ? 0
  906. : parseFloat(this.form.dialysate_temperature);
  907. this.form.replacement_rate =
  908. parseFloat(this.form.replacement_rate) == NaN
  909. ? 0
  910. : parseFloat(this.form.replacement_rate);
  911. this.form.displacement_quantity =
  912. parseFloat(this.form.displacement_quantity) == NaN
  913. ? 0
  914. : parseFloat(this.form.displacement_quantity);
  915. this.form.conductivity =
  916. parseFloat(this.form.conductivity) == NaN
  917. ? 0
  918. : parseFloat(this.form.conductivity);
  919. this.form.displacement_flow_quantity =
  920. parseFloat(this.form.displacement_flow_quantity) == NaN
  921. ? 0
  922. : parseFloat(this.form.displacement_flow_quantity);
  923. this.form.ktv =
  924. parseFloat(this.form.ktv) == NaN ? 0 : parseFloat(this.form.ktv);
  925. this.form.monitoring_date = parseInt(this.form.monitoring_date);
  926. let mode = "1"
  927. if(this.form.id > 0){
  928. mode = "2"
  929. if(this.form.creator > 0 && this.form.creator != this.$store.getters.xt_user.user.id){
  930. mode = "3"
  931. }
  932. }
  933. editMonitor(this.patient_id, this.schedule_date, this.form,mode).then(rs => {
  934. var resp = rs.data;
  935. if (resp.state == 1) {
  936. var monitor = resp.data.monitor;
  937. if (this.isAdd) {
  938. this.monitors.unshift(monitor);
  939. this.monitors.sort((a, b) => b.operate_time - a.operate_time);
  940. this.monitors.reverse();
  941. } else {
  942. for (let index = 0; index < this.monitors.length; index++) {
  943. const m = this.monitors[index];
  944. if (m.id == monitor.id) {
  945. for (const key in monitor) {
  946. m[key] = monitor[key];
  947. }
  948. break;
  949. }
  950. }
  951. }
  952. this.reset();
  953. } else {
  954. this.$message.error(resp.msg);
  955. }
  956. });
  957. },
  958. symptomTextareaBlur: function() {
  959. if (this.form.symptom.length > 0) {
  960. this.symptom_selecteds = this.form.symptom.split(",");
  961. } else {
  962. this.symptom_selecteds = [];
  963. }
  964. },
  965. symptomSelectorChange: function() {
  966. if (this.symptom_selecteds.length > 0) {
  967. this.form.symptom = this.symptom_selecteds.join(",") + ",";
  968. } else {
  969. this.form.symptom = "";
  970. }
  971. },
  972. disposeTextareaBlur: function() {
  973. if (this.form.dispose.length > 0) {
  974. this.dispose_selecteds = this.form.dispose.split(",");
  975. } else {
  976. this.dispose_selecteds = [];
  977. }
  978. },
  979. disposeSelectorChange: function() {
  980. if (this.dispose_selecteds.length > 0) {
  981. this.form.dispose = this.dispose_selecteds.join(",") + ",";
  982. } else {
  983. this.form.dispose = "";
  984. }
  985. },
  986. resultTextareaBlur: function() {
  987. if (this.form.result.length > 0) {
  988. this.result_selecteds = this.form.result.split(",");
  989. } else {
  990. this.result_selecteds = [];
  991. }
  992. },
  993. setRecords(records) {
  994. this.monitors = records;
  995. },
  996. resultSelectorChange: function() {
  997. if (this.result_selecteds.length > 0) {
  998. this.form.result = this.result_selecteds.join(",") + ",";
  999. } else {
  1000. this.form.result = "";
  1001. }
  1002. },
  1003. deleteRecordAction: function() {
  1004. if (this.table_current_row == null) {
  1005. this.$message.error("请选择一条监测记录");
  1006. return;
  1007. }
  1008. this.$confirm("删除记录", "是否删除该监测记录", {
  1009. confirmButtonText: "确定",
  1010. cancelButtonText: "取消",
  1011. type: "warning"
  1012. })
  1013. .then(() => {
  1014. const params = {
  1015. patient_id: this.patient_id,
  1016. record_id: this.table_current_row.id
  1017. };
  1018. postDelMonitorInfo(params).then(response => {
  1019. if (response.data.state == 0) {
  1020. this.$message.error(response.data.msg);
  1021. return false;
  1022. } else {
  1023. const record_id = response.data.data.record_id;
  1024. for (let i = 0; i < this.monitors.length; i++) {
  1025. if (this.monitors[i].id == record_id) {
  1026. this.monitors.splice(i, 1);
  1027. }
  1028. }
  1029. }
  1030. });
  1031. })
  1032. .catch(() => {});
  1033. }
  1034. }
  1035. };
  1036. </script>
  1037. <style style="stylesheet/scss" lang="scss" scoped>
  1038. .grid {
  1039. padding: 10px 0 20px 0;
  1040. .list {
  1041. ul {
  1042. @include display-flex;
  1043. @include align-items-center;
  1044. @include text-align;
  1045. @include justify-content-around;
  1046. cursor: pointer;
  1047. li {
  1048. font-size: 12px;
  1049. color: #5d6b7a;
  1050. margin-top: 20px;
  1051. p {
  1052. height: 30px;
  1053. line-height: 30px;
  1054. color: #34495e;
  1055. font-size: 14px;
  1056. }
  1057. img {
  1058. width: 50px;
  1059. height: 50px;
  1060. }
  1061. }
  1062. }
  1063. }
  1064. }
  1065. .txsj {
  1066. text-align: center;
  1067. margin-bottom: 20px;
  1068. }
  1069. .current-box-class::-webkit-scrollbar {
  1070. height: 20px; /*滚动条高度*/
  1071. }
  1072. </style>
  1073. <style style="stylesheet/scss" lang="scss">
  1074. .dialog_box .current-box-class .current-row > td {
  1075. background: #6fb5fa;
  1076. color: white;
  1077. /* font-size: 12px; */
  1078. }
  1079. .dialog_box .current-box-class .current-row:hover > td {
  1080. background: #6fb5fa;
  1081. color: white;
  1082. /* font-size: 12px; */
  1083. }
  1084. .el-table__body-wrapper::-webkit-scrollbar {
  1085. height: 20px;
  1086. }
  1087. </style>