MonitDialog.vue 54KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525
  1. <template>
  2. <div>
  3. <div v-loading="loading">
  4. <div class="Dialog" v-show="listPanel">
  5. <div class="DialogTit">
  6. <span class="iconfont" @click="close()">&#xe6e9;</span>
  7. <h1 class="name">透析监测</h1>
  8. <span class="success">&nbsp;</span>
  9. </div>
  10. <div style="width:100%;background: #fff;">
  11. <div class="yzNav" style="width:80%">
  12. <span :class="{ forbid: is_has_create != true }" @click="openForm()">新增监测</span>
  13. <span
  14. :class="{ forbid: is_has_modify != true && is_has_modify_other != true }"
  15. @click="openEidtForm()"
  16. >修改监测</span>
  17. <span
  18. :class="{ forbid: is_has_del != true && is_has_del_other != true }"
  19. @click="deleteForm()"
  20. >删除监测</span>
  21. </div>
  22. </div>
  23. <div class="DialogContent choose" id="dialogTop">
  24. <div style="width:100%;overflow:hildden;">
  25. <table class="table newMonitTable" style>
  26. <tr @click="selectRow(-1, null)">
  27. <th v-if="isShow('监测时间')" width="60px">时间</th>
  28. <th v-if="isShow('血压')" width="60px"> 血压 <br />(mmHg) </th>
  29. <th v-if="isShow('脉搏')" width="50px"> 脉搏 <br />(次/分) </th>
  30. <th v-if="isShow('体温')" width="40px"> 体温 <br />(℃) </th>
  31. <th v-if="isShow('呼吸频率')" width="60px"> 呼吸频率 <br />(次/分) </th>
  32. <th v-if="isShow('血流量')" width="60px"> 血流量 <br />(ml/min) </th>
  33. <th width="76px"> 静脉压/动脉压 <br />(mmHg) </th>
  34. <th v-if="isShow('跨膜压')" width="60px"> 跨膜压 <br />(mmHg) </th>
  35. <th v-if="isShow('超滤量') && (template_id ==6 || template_id == 10 || template_id == 11 || template_id == 12 || template_id == 13 || template_id == 17 || template_id == 18)" width="50px" > 超滤量 <br />(ml) </th>
  36. <th v-if="isShow('超滤量') && template_id !=6 && template_id !=10 && template_id !=11 && template_id !=12 && template_id !=13 && template_id !=17 && template_id !=18" width="50px" > 超滤量 <br />(L) </th>
  37. <th v-if="isShow('钠浓度')" width="60px"> 钠浓度 <br />(mmol/L) </th>
  38. <th v-if="isShow('透析液温度')" width="60px"> 透析液温度 <br />(℃) </th>
  39. <th v-if="isShow('置换率') && (template_id ==6 || template_id == 10 || template_id == 11)" width="50px" > 置换率 <br />(ml/min) </th>
  40. <th v-if="isShow('置换率') && template_id !=6 && template_id !=10 && template_id != 11" width="50px" > 置换率 <br />(L/h) </th>
  41. <th v-if="isShow('置换量') && (template_id ==6 || template_id ==10 ||template_id ==11 )" width="50px" > 置换量 <br />(ml) </th>
  42. <th v-if="isShow('置换量') && template_id !=6 && template_id !=10 && template_id !=11" width="50px" > 置换量 <br />(L) </th>
  43. <th v-if="isShow('SpO₂') && template_id !=6 && template_id !=10 && template_id !=11" width="40px" > SpO₂ <br />(%) </th>
  44. <th v-if="isShow('电导度')" width="50px"> 电导度 <br />(mS/cm) </th>
  45. <th v-if="isShow('置换液流量')" width="50px"> 置换液流量 <br />(ml/h) </th>
  46. <th v-if="isShow('透析液流量')" width="50px"> 透析液流量 <br />(ml/h) </th>
  47. <th v-if="isShow('超滤率') && (template_id ==6 || template_id == 10 || template_id == 11 || template_id == 12 || template_id == 13 || template_id == 17 || template_id == 18)" width="50px"> 超滤率 <br />(ml/h) </th>
  48. <th v-if="isShow('超滤率') && template_id !=6 && template_id !=10 && template_id !=11 && template_id !=12 && template_id !=13 && template_id !=17 && template_id !=18" width="50px"> 超滤率 <br />(L/h) </th>
  49. <th v-if="isShow('肝素用量余量')" width="60px"> 肝素用量余量 <br />(ml) </th>
  50. <th v-if="isShow('病情变化')" width="92px">病情变化</th>
  51. <th v-if="isShow('处理')" width="92px">处理</th>
  52. <th v-if="isShow('结果')" width="92px">结果</th>
  53. </tr>
  54. <tr v-for="(item,index) in monitorRecords" :key="index" :value="item.value" @click="selectRow(index, item)" :class="index==currentIndex?rowClass:''" >
  55. <td v-if="isShow('监测时间')">{{parseTime(item.operate_time, '{y}-{m}-{d} {h}:{i}')}}</td>
  56. <td v-if="isShow('血压')" >{{item.systolic_blood_pressure?item.systolic_blood_pressure:''}}/{{item.diastolic_blood_pressure?item.diastolic_blood_pressure:''}}</td>
  57. <td v-if="isShow('脉搏')">{{item.pulse_frequency?item.pulse_frequency:''}}</td>
  58. <td v-if="isShow('体温')">{{item.temperature?item.temperature:''}}</td>
  59. <td v-if="isShow('呼吸频率')">{{item.breathing_rate?item.breathing_rate:''}}</td>
  60. <td v-if="isShow('血流量')">{{item.blood_flow_volume?item.blood_flow_volume:''}}</td>
  61. <td> {{item.venous_pressure?item.venous_pressure:''}}/{{item.arterial_pressure?item.arterial_pressure:''}}</td>
  62. <td v-if="isShow('跨膜压')" >{{item.transmembrane_pressure?item.transmembrane_pressure:''}}</td>
  63. <td v-if="isShow('超滤量')" >{{item.ultrafiltration_volume?item.ultrafiltration_volume:''}}</td>
  64. <td v-if="isShow('钠浓度')">{{item.sodium_concentration?item.sodium_concentration:''}}</td>
  65. <td v-if="isShow('透析液温度')" >{{item.dialysate_temperature?item.dialysate_temperature:''}}</td>
  66. <td v-if="isShow('置换率')">{{item.replacement_rate?item.replacement_rate:''}}</td>
  67. <td v-if="isShow('置换量')" >{{item.displacement_quantity?item.displacement_quantity:''}}</td>
  68. <td v-if="isShow('SpO₂') && template_id != 6 && template_id != 10 && template_id != 11" >{{item.blood_oxygen_saturation?item.blood_oxygen_saturation:''}}</td>
  69. <td v-if="isShow('电导度')">{{item.conductivity?item.conductivity:''}}</td>
  70. <td v-if="isShow('置换液流量')" >{{item.displacement_flow_quantity?item.displacement_flow_quantity:''}}</td>
  71. <td v-if="isShow('透析液流量')" >{{item.dialysate_flow?item.dialysate_flow:''}}</td>
  72. <td v-if="isShow('超滤率')" >{{item.ultrafiltration_rate?item.ultrafiltration_rate:''}}</td>
  73. <td v-if="isShow('肝素用量余量')">{{item.heparin?item.heparin:''}}</td>
  74. <td v-if="isShow('病情变化')">{{item.symptom}}</td>
  75. <td v-if="isShow('处理')">{{item.dispose}}</td>
  76. <td v-if="isShow('结果')">{{item.result}}</td>
  77. </tr>
  78. </table>
  79. </div>
  80. </div>
  81. </div>
  82. <div class="Dialog" v-show="formPanel">
  83. <div class="DialogTit">
  84. <div class="back" @click="formPanel=false;listPanel=true;">
  85. <span class="iconfont">&#xe720;</span>返回
  86. </div>
  87. <h1 class="name">{{formTitle}}</h1>
  88. <span class="success" v-if="form.id>0" @click="submitEditAction()">保存</span>
  89. <span class="success" v-else @click="submitAction()">保存</span>
  90. </div>
  91. <div class="DialogContent choose">
  92. <div class="content">
  93. <div class="cell" v-if="isShow('监测时间')">
  94. <label>监测时间</label>
  95. <input
  96. type="text"
  97. class="inputBox"
  98. @click="chooseTime()"
  99. v-on:change="timechange()"
  100. :value="parseTime(this.form.operate_time, '{y}-{m}-{d} {h}:{i}')"
  101. readonly
  102. />
  103. </div>
  104. <div class="cell" v-if="isShow('收缩压')">
  105. <label>收缩压(mmHg)</label>
  106. <input
  107. type="number"
  108. @focus="inputFocus"
  109. onclick="this.select();"
  110. class="inputBox"
  111. v-model="form.systolic_bp"
  112. />
  113. </div>
  114. <div class="cell" v-if="isShow('舒张压')">
  115. <label>舒张压(mmHg)</label>
  116. <input
  117. type="number"
  118. @focus="inputFocus"
  119. onclick="this.select();"
  120. class="inputBox"
  121. v-model="form.diastolic_bp"
  122. />
  123. </div>
  124. <div class="cell" v-if="isShow('脉搏')">
  125. <label>脉搏(次/分)</label>
  126. <input
  127. type="number"
  128. @focus="inputFocus"
  129. onclick="this.select();"
  130. class="inputBox"
  131. v-model="form.pulse_frequency"
  132. />
  133. </div>
  134. <div class="cell" v-if="isShow('体温')">
  135. <label>体温(℃)</label>
  136. <input
  137. type="number"
  138. @focus="inputFocus"
  139. onclick="this.select();"
  140. class="inputBox"
  141. v-model="form.temperature"
  142. />
  143. </div>
  144. <div class="cell" v-if="isShow('呼吸频率')">
  145. <label>呼吸频率(次/分)</label>
  146. <input
  147. type="number"
  148. @focus="inputFocus"
  149. onclick="this.select();"
  150. class="inputBox"
  151. v-model="form.breathing_rated"
  152. />
  153. </div>
  154. <div class="cell" v-if="isShow('血流量')">
  155. <label>血流量(ml/min)</label>
  156. <input
  157. type="number"
  158. @focus="inputFocus"
  159. onclick="this.select();"
  160. class="inputBox"
  161. v-model="form.blood_flow_volume"
  162. />
  163. </div>
  164. <div class="cell" v-if="isShow('静脉压')">
  165. <label>静脉压(mmHg)</label>
  166. <input
  167. type="number"
  168. @focus="inputFocus"
  169. onclick="this.select();"
  170. class="inputBox"
  171. v-model="form.venous_pressure"
  172. style="width:60%"
  173. />
  174. <button
  175. class="typeButton"
  176. style="width:30%;padding: 0.18rem 0; color: #fff; background: #409eff;border-radius:5px"
  177. @click="venousPressureChangeOne"
  178. >转换</button>
  179. </div>
  180. <div class="cell" v-if="isShow('跨膜压')">
  181. <label>跨膜压(mmHg)</label>
  182. <input
  183. type="number"
  184. @focus="inputFocus"
  185. onclick="this.select();"
  186. class="inputBox"
  187. v-model="form.transmembrane_pressure"
  188. style="width:60%"
  189. />
  190. <button
  191. class="typeButton"
  192. style="width:30%;padding: 0.18rem 0; color: #fff; background: #409eff;border-radius:5px"
  193. @click="venousPressureChangeTwo"
  194. >转换</button>
  195. </div>
  196. <div class="cell" v-if="isShow('超滤量')">
  197. <label v-if="template_id == 6 || template_id == 10 || template_id == 11 || template_id == 12 || template_id == 13 || template_id == 17 || template_id == 18" >超滤量(ml)</label>
  198. <label v-else>超滤量(L)</label>
  199. <input
  200. type="number"
  201. @focus="inputFocus"
  202. onclick="this.select();"
  203. class="inputBox"
  204. v-model="form.ultrafiltration_volume"
  205. />
  206. </div>
  207. <div class="cell" v-if="isShow('超滤率')">
  208. <label v-if="template_id == 6 || template_id == 10 || template_id == 11 || template_id == 13 || template_id == 17 || template_id == 18">超滤率(ml/h)</label>
  209. <label v-else>超滤率(L/h)</label>
  210. <input
  211. type="number"
  212. @focus="inputFocus"
  213. onclick="this.select();"
  214. class="inputBox"
  215. v-model="form.ultrafiltration_rate"
  216. />
  217. </div>
  218. <div class="cell" v-if="isShow('动脉压')">
  219. <label>动脉压(mmHg)</label>
  220. <input
  221. type="tel"
  222. @focus="inputFocus"
  223. class="inputBox"
  224. v-model="form.arterial_pressure"
  225. style="width:60%"
  226. />
  227. <button
  228. class="typeButton"
  229. style="width:30%;padding: 0.18rem 0; color: #fff; background: #409eff;border-radius:5px"
  230. @click="venousPressureChangeThree"
  231. >转换</button>
  232. </div>
  233. <div class="cell" v-if="isShow('透析液温度')">
  234. <label>透析液温度(℃)</label>
  235. <input
  236. type="number"
  237. @focus="inputFocus"
  238. onclick="this.select();"
  239. class="inputBox"
  240. v-model="form.dialysate_temperature"
  241. />
  242. </div>
  243. <div class="cell" v-if="isShow('钠浓度')">
  244. <label>钠浓度(mmol/L)</label>
  245. <input
  246. type="number"
  247. @focus="inputFocus"
  248. onclick="this.select();"
  249. class="inputBox"
  250. v-model="form.sodium_concentration"
  251. />
  252. </div>
  253. <div class="cell" v-if="isShow('置换率')">
  254. <label v-if="template_id == 6 || template_id == 10 || template_id == 11">置换率(ml/min)</label>
  255. <label v-else>置换率(L/h)</label>
  256. <input
  257. type="number"
  258. @focus="inputFocus"
  259. onclick="this.select();"
  260. class="inputBox"
  261. v-model="form.replacement_rate"
  262. />
  263. </div>
  264. <div class="cell" v-if="isShow('置换量')">
  265. <label v-if="template_id == 6 || template_id == 10 || template_id == 11">置换量(ml)</label>
  266. <label v-else>置换量(L)</label>
  267. <input
  268. type="number"
  269. @focus="inputFocus"
  270. onclick="this.select();"
  271. class="inputBox"
  272. v-model="form.displacement_quantity"
  273. />
  274. </div>
  275. <div class="cell" v-if="isShow('SpO₂')">
  276. <label v-if="template_id == 6 || template_id == 10 || template_id == 11">SpO₂(%)</label>
  277. <label v-else>SpO₂(L)</label>
  278. <input
  279. type="number"
  280. @focus="inputFocus"
  281. onclick="this.select();"
  282. class="inputBox"
  283. v-model="form.blood_oxygen_saturation"
  284. />
  285. </div>
  286. <div class="cell" v-if="isShow('电导度')">
  287. <label>电导度(mS/cm)</label>
  288. <input
  289. type="number"
  290. @focus="inputFocus"
  291. onclick="this.select();"
  292. class="inputBox"
  293. v-model="form.conductivity"
  294. />
  295. </div>
  296. <div class="cell" v-if="isShow('置换液流量')">
  297. <label>置换液流量(ml/h)</label>
  298. <input
  299. type="number"
  300. @focus="inputFocus"
  301. onclick="this.select();"
  302. class="inputBox"
  303. v-model="form.displacement_flow_quantity"
  304. />
  305. </div>
  306. <div class="cell" v-if="isShow('透析液流量')">
  307. <label>透析液流量(ml/h)</label>
  308. <input
  309. type="number"
  310. @focus="inputFocus"
  311. onclick="this.select();"
  312. class="inputBox"
  313. v-model="form.dialysate_flow"
  314. />
  315. </div>
  316. <div class="cell" v-if="isShow('肝素用量余量')">
  317. <label>肝素用量余量(ml)</label>
  318. <input
  319. type="number"
  320. @focus="inputFocus"
  321. onclick="this.select();"
  322. class="inputBox"
  323. v-model="form.heparin"
  324. />
  325. </div>
  326. <div class="cell width" v-if="isShow('KT/V')">
  327. <label>KT/V(在线)</label>
  328. <!-- <input type="text" class="inputBox" v-model="form.ktv"> -->
  329. <textarea
  330. @focus="inputFocus"
  331. class="inputBox"
  332. style="width: 100%;"
  333. :rows="4"
  334. v-model="form.ktv"
  335. ></textarea>
  336. </div>
  337. <div class="cell width" v-if="isShow('病情变化')">
  338. <label>病情变化</label>
  339. <input
  340. type="text"
  341. class="inputBox"
  342. style="width: 100%;margin-bottom:5px;"
  343. v-model="form.symptom"
  344. readonly
  345. placeholder="选择 "
  346. @click="showSubMenu('symptom')"
  347. />
  348. <textarea
  349. @focus="inputFocus"
  350. class="inputBox"
  351. style="width: 100%;"
  352. :rows="4"
  353. v-model="form.symptom"
  354. ></textarea>
  355. </div>
  356. <div class="cell width" v-if="isShow('处理')">
  357. <label>处理</label>
  358. <!-- <input type="text" class="inputBox" v-model="form.dispose"> -->
  359. <input
  360. type="text"
  361. class="inputBox"
  362. style="width: 100%;margin-bottom:5px;"
  363. v-model="form.dispose"
  364. readonly
  365. placeholder="选择"
  366. @click="showSubMenu('dispose')"
  367. />
  368. <textarea
  369. @focus="inputFocus"
  370. class="inputBox"
  371. style="width: 100%;"
  372. :rows="4"
  373. v-model="form.dispose"
  374. ></textarea>
  375. </div>
  376. <div class="cell width" v-if="isShow('结果')">
  377. <label>结果</label>
  378. <!-- <input type="text" class="inputBox" v-model="form.result"> -->
  379. <input
  380. type="text"
  381. class="inputBox"
  382. style="width: 100%;margin-bottom:5px;"
  383. v-model="form.result"
  384. readonly
  385. placeholder="选择"
  386. @click="showSubMenu('result')"
  387. />
  388. <textarea
  389. @focus="lastInputFocus"
  390. @blur="lastInputBlur"
  391. class="inputBox"
  392. style="width: 100%;"
  393. :rows="4"
  394. v-model="form.result"
  395. ></textarea>
  396. </div>
  397. <div class="cell width">
  398. <label>监测人:</label>
  399. <span class="doctor">{{doctor}}</span>
  400. </div>
  401. </div>
  402. </div>
  403. </div>
  404. </div>
  405. <mt-datetime-picker ref="picker" type="datetime" @confirm="handleConfirm" v-model="pickertime"></mt-datetime-picker>
  406. <check-box-sub-menu
  407. :visibility="visibility"
  408. v-on:menu-cancle="menuCancle"
  409. v-on:menu-comfirm="menuComfirm"
  410. :propsForm="propForm"
  411. ></check-box-sub-menu>
  412. </div>
  413. </template>
  414. <script>
  415. import { addMonitorRecord, deleteMonitorRecord, editMonitorRecord, GetMonitor, GetMonitorToday } from '@/api/dialysis'
  416. import { parseTime } from '@/utils'
  417. import { Dialog, Toast } from 'vant'
  418. import CheckBoxSubMenu from './subMenu/checkBoxSubMenu'
  419. import { getDataConfig } from '@/utils/data'
  420. import request from '@/utils/request'
  421. export default {
  422. name: 'MonitDialog',
  423. props: {
  424. monitor_records: {
  425. type: Array
  426. },
  427. patient: {
  428. type: Object
  429. },
  430. order: {
  431. type: Object
  432. },
  433. last_monitor_record: {
  434. type: Object
  435. }
  436. },
  437. data () {
  438. return {
  439. is_has_create: true,
  440. is_has_modify: true,
  441. is_has_modify_other: true,
  442. is_has_del: true,
  443. is_has_del_other: true,
  444. creator: 0,
  445. loading: false,
  446. formTitle: '新增监测',
  447. formPanel: false,
  448. listPanel: true,
  449. tableDate: [],
  450. monitorRecords: this.monitor_records,
  451. pickertime: new Date(),
  452. monitor_time_str: '',
  453. // monitor_date_str: "",
  454. currentIndex: -1,
  455. currentRow: null,
  456. rowClass: 'row-class-active',
  457. template_id: 0,
  458. visibility: false,
  459. today_last_monitor_record: {},
  460. propForm: {
  461. title: '',
  462. list: [],
  463. optionList: [],
  464. isMultiple: 2,
  465. result: [], // 选中的值
  466. type: 1, // 用来区分不同子菜单,方便对返回值进行赋值
  467. selectId: 0
  468. },
  469. form: {
  470. // patient_id: 0,
  471. // order_id: 0,
  472. monitor_date: 0,
  473. // monitor_time: "00:00",
  474. operate_time: 0,
  475. pulse_frequency: '', // 脉率
  476. breathing_rated: '', // 呼吸频率
  477. systolic_bp: '', // 收缩压
  478. diastolic_bp: '', // 舒张压
  479. blood_flow_volume: '', // 血流量
  480. venous_pressure: '', // 静脉压
  481. arterial_pressure: '', // 动脉压
  482. transmembrane_pressure: '', // 跨膜压
  483. ultrafiltration_rate: '', // 超滤率
  484. ultrafiltration_volume: '', // 超滤量
  485. sodium_concentration: '', // 钠浓度
  486. dialysate_temperature: '', // 透析液温度
  487. temperature: '', // 体温
  488. replacement_rate: '', // 置换率
  489. displacement_quantity: '', // 置换量
  490. conductivity: '',
  491. displacement_flow_quantity: '',
  492. ktv: '', // KT/V(在线)
  493. symptom: '', // 症状
  494. dispose: '', // 处理
  495. result: '', // 结果,
  496. blood_oxygen_saturation: '',
  497. monitoring_nurse: this.$store.getters.user.admin.id, // 监测人
  498. creator: 0,
  499. heparin: '',
  500. dialysate_flow: ''
  501. },
  502. doctor: this.$store.getters.user.user.user_name,
  503. value: 0,
  504. valueOne: 0,
  505. valueTwo: 0
  506. }
  507. },
  508. created () {
  509. this.getPermission()
  510. var date = this.$route.query && this.$route.query.date
  511. this.template_id = this.$store.getters.user.template_info.template_id
  512. // date *= 1000;
  513. // var newDate = new Date(date);
  514. // var cDate = new Date();
  515. // var y = newDate.getFullYear();
  516. // var m = newDate.getMonth() + 1;
  517. // var d = newDate.getDate();
  518. // if (isNaN(y) || isNaN(m) || isNaN(d)) {
  519. // // newDate = new Date();
  520. // y = cDate.getFullYear();
  521. // m = cDate.getMonth() + 1;
  522. // d = cDate.getDate();
  523. // }
  524. // var h = cDate.getHours();
  525. // var mi = cDate.getMinutes();
  526. // var pickertime = (h < 10 ? "0" + h : h) + ":" + (mi < 10 ? "0" + mi : mi);
  527. // var monitor_date_str =
  528. // y + "-" + (m < 10 ? "0" + m : m) + "-" + (d < 10 ? "0" + d : d);
  529. // this.form.monitor_date = Math.round(
  530. // new Date(monitor_date_str + " 00:00:00").getTime() / 1000
  531. // );
  532. // this.form.monitor_date = parseInt((new Date(date.getFullYear, date.getMonth, date.getDate, 0, 0, 0, 0)).getTime()) //parseTime(date, "{y}-{m}-{d}") + " 00:00:00"
  533. this.form.monitor_date = date
  534. this.form.operate_time = this.pickertime.getTime()
  535. },
  536. methods: {
  537. timechange () {
  538. debugger
  539. },
  540. venousPressureChange (type) {
  541. if (type == 1) {
  542. this.form.venous_pressure = Math.ceil(Math.round(this.form.venous_pressure * 7.5))
  543. } else if (type == 2) {
  544. this.form.transmembrane_pressure = Math.ceil(Math.round(this.form.transmembrane_pressure * 7.5))
  545. } else {
  546. this.form.arterial_pressure = Math.ceil(Math.round(this.form.arterial_pressure * 7.5))
  547. }
  548. },
  549. venousPressureChangeOne () {
  550. if (this.value == 0) {
  551. this.form.venous_pressure = Math.ceil(Math.round(this.form.venous_pressure * 7.5))
  552. this.value = 1
  553. return false
  554. }
  555. if (this.value == 1) {
  556. this.form.venous_pressure = Math.ceil(Math.round(this.form.venous_pressure / 7.5))
  557. this.value = 0
  558. }
  559. },
  560. venousPressureChangeTwo () {
  561. if (this.valueOne == 0) {
  562. this.form.transmembrane_pressure = Math.ceil(Math.round(this.form.transmembrane_pressure * 7.5))
  563. this.valueOne = 1
  564. return false
  565. }
  566. if (this.valueOne == 1) {
  567. this.form.transmembrane_pressure = Math.ceil(Math.round(this.form.transmembrane_pressure / 7.5))
  568. this.valueOne = 0
  569. return false
  570. }
  571. },
  572. venousPressureChangeThree () {
  573. if (this.valueTwo == 0) {
  574. this.form.arterial_pressure = Math.ceil(Math.round(this.form.arterial_pressure * 7.5))
  575. this.valueTwo = 1
  576. return false
  577. }
  578. if (this.valueTwo == 1) {
  579. this.form.arterial_pressure = Math.ceil(Math.round(this.form.arterial_pressure / 7.5))
  580. this.valueTwo = 0
  581. return false
  582. }
  583. },
  584. isShow (name) {
  585. var filedList = this.$store.getters.user.fileds
  586. for (let i = 0; i < filedList.length; i++) {
  587. if (filedList[i].module == 4 && filedList[i].filed_name_cn == name && filedList[i].is_show == 1) {
  588. return true
  589. }
  590. }
  591. return false
  592. },
  593. getLastRecordTody () {
  594. let params = {
  595. patient_id: this.patient.id
  596. }
  597. GetMonitorToday(params).then(rs => {
  598. var resp = rs.data.data
  599. this.today_last_monitor_record = resp.monitor
  600. // this.form.operate_time = Date.parse(new Date())
  601. this.form.operate_time = resp.monitor.operate_time ? (resp.monitor.operate_time + 3600) * 1000 : Date.parse(new Date())
  602. this.form.pulse_frequency = '' // this.last_monitor_record.pulse_frequency;
  603. this.form.breathing_rated = resp.monitor.breathing_rate ? resp.monitor.breathing_rate : ''
  604. this.form.systolic_bp = '' // this.last_monitor_record.systolic_blood_pressure;
  605. this.form.diastolic_bp = '' // this.last_monitor_record.diastolic_blood_pressure;
  606. this.form.blood_flow_volume = resp.monitor.blood_flow_volume ? resp.monitor.blood_flow_volume : ''
  607. this.form.venous_pressure = '' // this.last_monitor_record.venous_pressure;
  608. if (this.template_id == 17) {
  609. this.form.arterial_pressure = '-'
  610. } else {
  611. this.form.arterial_pressure = '' // this.last_monitor_record.arterial_pressure;
  612. }
  613. this.form.transmembrane_pressure = '' // this.last_monitor_record.transmembrane_pressure;
  614. this.form.ultrafiltration_rate = resp.monitor.ultrafiltration_rate ? resp.monitor.ultrafiltration_rate : ''
  615. this.form.ultrafiltration_volume = resp.monitor.ultrafiltration_volume ? resp.monitor.ultrafiltration_volume : ''
  616. this.form.sodium_concentration = resp.monitor.sodium_concentration ? resp.monitor.sodium_concentration : ''
  617. this.form.dialysate_temperature = resp.monitor.dialysate_temperature ? resp.monitor.dialysate_temperature : ''
  618. this.form.temperature = resp.monitor.temperature ? resp.monitor.temperature : ''
  619. this.form.replacement_rate = resp.monitor.replacement_rate ? resp.monitor.replacement_rate : ''
  620. this.form.heparin = resp.monitor.heparin ? resp.monitor.heparin : ''
  621. this.form.dialysate_flow = resp.monitor.dialysate_flow ? resp.monitor.dialysate_flow : ''
  622. this.form.displacement_quantity = '' // this.last_monitor_record.displacement_quantity;
  623. this.form.conductivity = ''
  624. this.form.displacement_flow_quantity = ''
  625. this.form.ktv = '' // this.last_monitor_record.ktv;
  626. this.form.symptom = '' // this.last_monitor_record.symptom;
  627. this.form.dispose = '' // this.last_monitor_record.dispose;
  628. this.form.result = '' // this.last_monitor_record.result;
  629. this.form.id = -1
  630. this.form.blood_oxygen_saturation = resp.monitor.blood_oxygen_saturation ? resp.monitor.blood_oxygen_saturation : ''
  631. })
  632. },
  633. getLastRecord () {
  634. let params = {
  635. patient_id: this.patient.id
  636. }
  637. GetMonitor(params).then(rs => {
  638. var resp = rs.data
  639. if (resp.state == 1) {
  640. var monitor = resp.data.monitor
  641. if (monitor.systolic_blood_pressure == 0) {
  642. this.form.systolic_bp = ''
  643. } else {
  644. this.form.systolic_bp = monitor.systolic_blood_pressure
  645. }
  646. if (monitor.diastolic_blood_pressure == 0) {
  647. this.form.diastolic_bp = ''
  648. } else {
  649. this.form.diastolic_bp = monitor.diastolic_blood_pressure
  650. }
  651. if (monitor.pulse_frequency == 0) {
  652. this.form.pulse_frequency = ''
  653. } else {
  654. this.form.pulse_frequency = monitor.pulse_frequency
  655. }
  656. if (monitor.breathing_rate == 0) {
  657. this.form.breathing_rated = ''
  658. } else {
  659. this.form.breathing_rated = monitor.breathing_rate
  660. }
  661. if (monitor.blood_flow_volume == 0) {
  662. this.form.blood_flow_volume = ''
  663. } else {
  664. this.form.blood_flow_volume = monitor.blood_flow_volume
  665. }
  666. if (monitor.venous_pressure == 0) {
  667. this.form.venous_pressure = ''
  668. } else {
  669. this.form.venous_pressure = monitor.venous_pressure
  670. }
  671. if (monitor.arterial_pressure == 0) {
  672. this.form.arterial_pressure = ''
  673. } else {
  674. this.form.arterial_pressure = monitor.arterial_pressure
  675. }
  676. if (monitor.transmembrane_pressure == 0) {
  677. this.form.transmembrane_pressure = ''
  678. } else {
  679. this.form.transmembrane_pressure = monitor.transmembrane_pressure
  680. }
  681. if (monitor.ultrafiltration_rate == 0) {
  682. this.form.ultrafiltration_rate = ''
  683. } else {
  684. this.form.ultrafiltration_rate = monitor.ultrafiltration_rate
  685. }
  686. if (monitor.ultrafiltration_volume == 0) {
  687. this.form.ultrafiltration_volume = ''
  688. } else {
  689. this.form.ultrafiltration_volume = monitor.ultrafiltration_volume
  690. }
  691. if (monitor.sodium_concentration == 0) {
  692. this.form.sodium_concentration = ''
  693. } else {
  694. this.form.sodium_concentration = monitor.sodium_concentration
  695. }
  696. if (monitor.dialysate_temperature == 0) {
  697. this.form.dialysate_temperature = ''
  698. } else {
  699. this.form.dialysate_temperature = monitor.dialysate_temperature
  700. }
  701. if (monitor.temperature == 0) {
  702. this.form.temperature = ''
  703. } else {
  704. this.form.temperature = monitor.temperature
  705. }
  706. if (monitor.replacement_rate == 0) {
  707. this.form.replacement_rate = ''
  708. } else {
  709. this.form.replacement_rate = monitor.replacement_rate
  710. }
  711. if (monitor.displacement_quantity == 0) {
  712. this.form.displacement_quantity = ''
  713. } else {
  714. this.form.displacement_quantity = monitor.displacement_quantity
  715. }
  716. if (monitor.conductivity == 0) {
  717. this.form.conductivity = ''
  718. } else {
  719. this.form.conductivity = monitor.conductivity
  720. }
  721. if (monitor.displacement_flow_quantity == 0) {
  722. this.form.displacement_flow_quantity = ''
  723. } else {
  724. this.form.displacement_flow_quantity =
  725. monitor.displacement_flow_quantity
  726. }
  727. if (monitor.heparin == 0) {
  728. this.form.heparin = ''
  729. } else {
  730. this.form.heparin = monitor.heparin
  731. }
  732. if (monitor.dialysate_flow == 0) {
  733. this.form.dialysate_flow = ''
  734. } else {
  735. this.form.dialysate_flow = monitor.dialysate_flow
  736. }
  737. this.form.ktv = monitor.ktv
  738. this.form.symptom = monitor.symptom
  739. this.form.dispose = monitor.dispose
  740. this.form.result = monitor.result
  741. this.form.operate_time = new Date(
  742. monitor.operate_time * 1000
  743. ).getTime()
  744. this.form.id = -1
  745. }
  746. })
  747. },
  748. selectRow (index, row) {
  749. if (row != null) {
  750. this.creator = row.creator
  751. }
  752. this.currentIndex = index
  753. this.currentRow = row
  754. },
  755. inputFocus: function (event) {
  756. var input = event.target
  757. setTimeout(function () {
  758. input.parentNode.scrollIntoView()
  759. }, 0)
  760. // if (input.setSelectionRange) {
  761. // setTimeout(function () {
  762. // input.setSelectionRange(0, input.value.length);
  763. // }, 0);
  764. // } else if (input.createTextRange) {
  765. // var rng = input.createTextRange();
  766. // rng.move('character', input.value.length);
  767. // rng.select();
  768. // }
  769. },
  770. lastInputFocus: function (event) {
  771. var input = event.target
  772. setTimeout(function () {
  773. input.style.marginBottom = '2rem'
  774. input.parentNode.scrollIntoView()
  775. }, 0)
  776. },
  777. lastInputBlur: function (event) {
  778. var input = event.target
  779. setTimeout(function () {
  780. input.style.marginBottom = ''
  781. }, 0)
  782. },
  783. close: function () {
  784. this.$emit('close')
  785. },
  786. setRecords (records) {
  787. this.monitorRecords = records
  788. },
  789. parseTime (time, layout) {
  790. return parseTime(time, layout)
  791. },
  792. addRecords (records) {
  793. this.tableDate.push(...records)
  794. },
  795. deleteForm () {
  796. if (this.currentIndex < 0 || this.currentRow == null) {
  797. Toast.fail('请先选择要删除的记录')
  798. return false
  799. }
  800. Dialog.confirm({
  801. title: '删除监测记录',
  802. message: '是否删除该监测记录'
  803. })
  804. .then(() => {
  805. let params = {
  806. record_id: this.currentRow.id,
  807. patient_id: this.patient.id,
  808. mode: '4'
  809. }
  810. if (
  811. this.$store.getters.user.admin.id != this.creator &&
  812. this.creator != 0
  813. ) {
  814. params.mode = '5'
  815. }
  816. deleteMonitorRecord(params).then(rs => {
  817. var resp = rs.data
  818. if (resp.state == 1) {
  819. var recordId = resp.data.record_id
  820. this.$emit('did_delete_monitor', recordId)
  821. Toast.success('删除成功')
  822. } else {
  823. Toast.fail(resp.msg)
  824. }
  825. })
  826. })
  827. .catch(() => {})
  828. },
  829. handleConfirm (time) {
  830. this.form.operate_time = time.getTime()
  831. // var timeMap = time.split(":");
  832. // this.form.monitor_time = time;
  833. // this.monitor_time_str =
  834. // parseTime(this.form.monitor_date, "{y}-{m}-{d}") +
  835. // " " +
  836. // this.form.monitor_time;
  837. // this.monitor_time_str = this.handleTime(time);
  838. // this.form.monitor_time = parseTime(time, "{h}:{i}")
  839. // this.form.monitor_date = Math.round(new Date(parseTime(time, "{y}-{m}-{d}") + " 00:00:00").getTime()/1000);
  840. },
  841. handleTime (time) {
  842. var year = time.getFullYear()
  843. var month = time.getMonth() + 1
  844. var day = time.getDate()
  845. var hour = time.getHours()
  846. var minute = time.getMinutes()
  847. if (month < 10) {
  848. month = '0' + month
  849. }
  850. if (day < 10) {
  851. day = '0' + day
  852. }
  853. if (hour < 10) {
  854. hour = '0' + hour
  855. }
  856. if (minute < 10) {
  857. minute = '0' + minute
  858. }
  859. return year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':00'
  860. },
  861. chooseTime () {
  862. this.$refs.picker.open()
  863. },
  864. openEidtForm () {
  865. if (this.currentIndex < 0 || this.currentRow == null) {
  866. Toast.fail('请先选择要修改的记录')
  867. return false
  868. }
  869. this.formTitle = '修改监测'
  870. this.formPanel = true
  871. this.listPanel = false
  872. // console.log("this.currentRow", this.currentRow);
  873. if (this.currentRow.systolic_blood_pressure == 0) {
  874. this.form.systolic_bp = ''
  875. } else {
  876. this.form.systolic_bp = this.currentRow.systolic_blood_pressure
  877. }
  878. if (this.currentRow.diastolic_blood_pressure == 0) {
  879. this.form.diastolic_bp = ''
  880. } else {
  881. this.form.diastolic_bp = this.currentRow.diastolic_blood_pressure
  882. }
  883. if (this.currentRow.pulse_frequency == 0) {
  884. this.form.pulse_frequency = ''
  885. } else {
  886. this.form.pulse_frequency = this.currentRow.pulse_frequency
  887. }
  888. if (this.currentRow.breathing_rate == 0) {
  889. this.form.breathing_rated = ''
  890. } else {
  891. this.form.breathing_rated = this.currentRow.breathing_rate
  892. }
  893. if (this.currentRow.blood_flow_volume == 0) {
  894. this.form.blood_flow_volume = ''
  895. } else {
  896. this.form.blood_flow_volume = this.currentRow.blood_flow_volume
  897. }
  898. if (this.currentRow.venous_pressure == 0) {
  899. this.form.venous_pressure = ''
  900. } else {
  901. this.form.venous_pressure = this.currentRow.venous_pressure
  902. }
  903. if (this.currentRow.arterial_pressure == 0) {
  904. this.form.arterial_pressure = ''
  905. } else {
  906. this.form.arterial_pressure = this.currentRow.arterial_pressure
  907. }
  908. if (this.currentRow.transmembrane_pressure == 0) {
  909. this.form.transmembrane_pressure = ''
  910. } else {
  911. this.form.transmembrane_pressure = this.currentRow.transmembrane_pressure
  912. }
  913. if (this.currentRow.ultrafiltration_rate == 0) {
  914. this.form.ultrafiltration_rate = ''
  915. } else {
  916. this.form.ultrafiltration_rate = this.currentRow.ultrafiltration_rate
  917. }
  918. if (this.currentRow.ultrafiltration_volume == 0) {
  919. this.form.ultrafiltration_volume = ''
  920. } else {
  921. this.form.ultrafiltration_volume = this.currentRow.ultrafiltration_volume
  922. }
  923. if (this.currentRow.sodium_concentration == 0) {
  924. this.form.sodium_concentration = ''
  925. } else {
  926. this.form.sodium_concentration = this.currentRow.sodium_concentration
  927. }
  928. if (this.currentRow.dialysate_temperature == 0) {
  929. this.form.dialysate_temperature = ''
  930. } else {
  931. this.form.dialysate_temperature = this.currentRow.dialysate_temperature
  932. }
  933. if (this.currentRow.temperature == 0) {
  934. this.form.temperature = ''
  935. } else {
  936. this.form.temperature = this.currentRow.temperature
  937. }
  938. if (this.currentRow.replacement_rate == 0) {
  939. this.form.replacement_rate = ''
  940. } else {
  941. this.form.replacement_rate = this.currentRow.replacement_rate
  942. }
  943. if (this.currentRow.displacement_quantity == 0) {
  944. this.form.displacement_quantity = ''
  945. } else {
  946. this.form.displacement_quantity = this.currentRow.displacement_quantity
  947. }
  948. if (this.currentRow.conductivity == 0) {
  949. this.form.conductivity = ''
  950. } else {
  951. this.form.conductivity = this.currentRow.conductivity
  952. }
  953. if (this.currentRow.displacement_flow_quantity == 0) {
  954. this.form.displacement_flow_quantity = ''
  955. } else {
  956. this.form.displacement_flow_quantity = this.currentRow.displacement_flow_quantity
  957. }
  958. if (this.currentRow.heparin == 0) {
  959. this.form.heparin = ''
  960. } else {
  961. this.form.heparin = this.currentRow.heparin
  962. }
  963. if (this.currentRow.dialysate_flow == 0) {
  964. this.form.dialysate_flow = ''
  965. } else {
  966. this.form.dialysate_flow = this.currentRow.dialysate_flow
  967. }
  968. if (this.currentRow.ktv == 0) {
  969. this.form.ktv = ''
  970. } else {
  971. this.form.ktv = this.currentRow.ktv
  972. }
  973. this.form.blood_oxygen_saturation = this.currentRow.blood_oxygen_saturation
  974. this.form.symptom = this.currentRow.symptom
  975. this.form.dispose = this.currentRow.dispose
  976. this.form.result = this.currentRow.result
  977. this.form.id = this.currentRow.id
  978. this.form.operate_time = this.currentRow.operate_time * 1000
  979. this.form.creator = this.currentRow.creator
  980. // this.monitor_time_str =
  981. // parseTime(this.form.monitor_date, "{y}-{m}-{d}") +
  982. // " " +
  983. // this.form.monitor_time;
  984. },
  985. openForm () {
  986. if (this.is_has_create == false) {
  987. Toast.fail('你没有新增监测的权限')
  988. return false
  989. }
  990. this.formTitle = '新增监测'
  991. this.formPanel = true
  992. this.listPanel = false
  993. // if(this.monitor_time_str == "") {
  994. var date = this.$route.query && this.$route.query.date
  995. date *= 1000
  996. var newDate = new Date(date)
  997. var y = newDate.getFullYear()
  998. var m = newDate.getMonth() + 1
  999. var d = newDate.getDate()
  1000. var record_date = y + '/' + (m < 10 ? '0' + m : m) + '/' + (d < 10 ? '0' + d : d)
  1001. this.form.monitor_date = new Date(record_date + ' 00:00:00').getTime() / 1000
  1002. var nowTime = new Date()
  1003. // this.form.monitor_time = parseTime(nowTime, "{h}:{i}");
  1004. // this.monitor_time_str = this.handleTime(nowTime);
  1005. // this.monitor_time_str = record_date + " " + this.form.monitor_time;
  1006. this.getLastRecordTody()
  1007. // }
  1008. },
  1009. submitEditAction: function () {
  1010. this.loading = true
  1011. Toast.loading({ forbidClick: true, duration: 0 })
  1012. var params = {}
  1013. params.patient_id = this.patient.id
  1014. params.order_id = this.order == null ? 0 : this.order.id
  1015. params.date = this.form.monitor_date
  1016. // params.time = this.form.monitor_time;
  1017. params.operate_time = parseInt(this.form.operate_time / 1000)
  1018. params.pulse_frequency = this.form.pulse_frequency
  1019. params.breathing_rated = this.form.breathing_rated
  1020. params.systolic_bp = this.form.systolic_bp
  1021. params.diastolic_bp = this.form.diastolic_bp
  1022. params.blood_flow_volume = this.form.blood_flow_volume
  1023. params.venous_pressure = this.form.venous_pressure
  1024. params.arterial_pressure = this.form.arterial_pressure
  1025. params.transmembrane_pressure = this.form.transmembrane_pressure
  1026. params.ultrafiltration_rate = this.form.ultrafiltration_rate
  1027. params.ultrafiltration_volume = this.form.ultrafiltration_volume
  1028. params.sodium_concentration = this.form.sodium_concentration
  1029. params.dialysate_temperature = this.form.dialysate_temperature
  1030. params.temperature = this.form.temperature
  1031. params.replacement_rate = this.form.replacement_rate
  1032. params.displacement_quantity = this.form.displacement_quantity
  1033. params.ktv = this.form.ktv
  1034. params.conductivity = this.form.conductivity
  1035. params.symptom = this.form.symptom
  1036. params.heparin = this.form.heparin
  1037. params.dialysate_flow = this.form.dialysate_flow
  1038. params.dispose = this.form.dispose
  1039. params.result = this.form.result
  1040. params.monitoring_nurse = this.form.monitoring_nurse
  1041. params.displacement_flow_quantity = this.form.displacement_flow_quantity
  1042. params.blood_oxygen_saturation = this.form.blood_oxygen_saturation
  1043. params.id = this.form.id
  1044. params.mode = '2'
  1045. if (
  1046. this.form.creator != this.$store.getters.user.admin.id &&
  1047. this.form.creator != 0
  1048. ) {
  1049. params.mode = '3'
  1050. }
  1051. editMonitorRecord(params)
  1052. .then(rs => {
  1053. var resp = rs.data
  1054. if (resp.state == 1) {
  1055. this.loading = false
  1056. var monitor = resp.data.monitor
  1057. // console.log(monitor)
  1058. this.$emit('did_edit_monitor', monitor)
  1059. //
  1060. Toast.success('修改成功')
  1061. this.selectRow(-1, null)
  1062. this.form.pulse_frequency = ''
  1063. this.form.breathing_rated = ''
  1064. this.form.systolic_bp = ''
  1065. this.form.diastolic_bp = ''
  1066. this.form.blood_flow_volume = ''
  1067. this.form.venous_pressure = ''
  1068. this.form.arterial_pressure = ''
  1069. this.form.transmembrane_pressure = ''
  1070. this.form.ultrafiltration_rate = ''
  1071. this.form.ultrafiltration_volume = ''
  1072. this.form.sodium_concentration = ''
  1073. this.form.dialysate_temperature = ''
  1074. this.form.temperature = ''
  1075. this.form.replacement_rate = ''
  1076. this.form.displacement_quantity = ''
  1077. this.form.ktv = ''
  1078. this.form.blood_oxygen_saturation = ''
  1079. this.form.symptom = ''
  1080. this.form.dispose = ''
  1081. this.form.result = ''
  1082. this.form.conductivity = ''
  1083. this.form.displacement_flow_quantity = ''
  1084. this.form.heparin = ''
  1085. this.form.dialysate_flow = ''
  1086. this.form.creator = 0
  1087. this.form.id = -1
  1088. this.formPanel = false
  1089. this.listPanel = true
  1090. } else {
  1091. this.loading = false
  1092. Toast.fail(resp.msg)
  1093. }
  1094. })
  1095. .catch(error => {
  1096. Toast.fail(error.toString())
  1097. })
  1098. },
  1099. submitAction: function () {
  1100. this.loading = true
  1101. Toast.loading({ forbidClick: true, duration: 0 })
  1102. var params = {}
  1103. params.patient_id = this.patient.id
  1104. params.order_id = this.order == null ? 0 : this.order.id
  1105. params.date = this.form.monitor_date
  1106. params.operate_time = parseInt(this.form.operate_time / 1000)
  1107. params.pulse_frequency = this.form.pulse_frequency
  1108. params.breathing_rated = this.form.breathing_rated
  1109. params.systolic_bp = this.form.systolic_bp
  1110. params.diastolic_bp = this.form.diastolic_bp
  1111. params.blood_flow_volume = this.form.blood_flow_volume
  1112. params.venous_pressure = this.form.venous_pressure
  1113. params.arterial_pressure = this.form.arterial_pressure
  1114. params.transmembrane_pressure = this.form.transmembrane_pressure
  1115. params.ultrafiltration_rate = this.form.ultrafiltration_rate
  1116. params.ultrafiltration_volume = this.form.ultrafiltration_volume
  1117. params.sodium_concentration = this.form.sodium_concentration
  1118. params.dialysate_temperature = this.form.dialysate_temperature
  1119. params.temperature = this.form.temperature
  1120. params.replacement_rate = this.form.replacement_rate
  1121. params.displacement_quantity = this.form.displacement_quantity
  1122. params.conductivity = this.form.conductivity
  1123. params.displacement_flow_quantity = this.form.displacement_flow_quantity
  1124. params.blood_oxygen_saturation = this.form.blood_oxygen_saturation
  1125. params.heparin = this.form.heparin
  1126. params.dialysate_flow = this.form.dialysate_flow
  1127. params.ktv = this.form.ktv
  1128. params.symptom = this.form.symptom
  1129. params.dispose = this.form.dispose
  1130. params.result = this.form.result
  1131. params.monitoring_nurse = this.form.monitoring_nurse
  1132. params.mode = '1'
  1133. addMonitorRecord(params)
  1134. .then(rs => {
  1135. var resp = rs.data
  1136. if (resp.state == 1) {
  1137. this.loading = false
  1138. var monitor = resp.data.monitor
  1139. this.$emit('did_add_monitor', monitor)
  1140. // this.monitor_records.unshift(monitor)
  1141. // this.monitor_records= this.quickSort(this.monitor_records,"operate_time",false)
  1142. this.form.pulse_frequency = ''
  1143. this.form.breathing_rated = ''
  1144. this.form.systolic_bp = ''
  1145. this.form.diastolic_bp = ''
  1146. this.form.blood_flow_volume = ''
  1147. this.form.venous_pressure = ''
  1148. this.form.arterial_pressure = ''
  1149. this.form.transmembrane_pressure = ''
  1150. this.form.ultrafiltration_rate = ''
  1151. this.form.ultrafiltration_volume = ''
  1152. this.form.sodium_concentration = ''
  1153. this.form.dialysate_temperature = ''
  1154. this.form.temperature = ''
  1155. this.form.replacement_rate = ''
  1156. this.form.displacement_quantity = ''
  1157. this.form.ktv = ''
  1158. this.form.symptom = ''
  1159. this.form.dispose = ''
  1160. this.form.result = ''
  1161. this.form.conductivity = ''
  1162. this.form.displacement_flow_quantity = ''
  1163. this.form.heparin = ''
  1164. this.form.dialysate_flow = ''
  1165. // this.last_monitor_record.sodium_concentration =
  1166. // monitor.sodium_concentration
  1167. // this.last_monitor_record.dialysate_temperature =
  1168. // monitor.dialysate_temperature
  1169. Toast.success('新增成功')
  1170. this.formPanel = false
  1171. this.listPanel = true
  1172. } else {
  1173. this.loading = false
  1174. Toast.fail(resp.msg)
  1175. }
  1176. })
  1177. .catch(err => {
  1178. this.loading = false
  1179. Toast.fail(err)
  1180. })
  1181. },
  1182. showSubMenu: function (val) {
  1183. switch (val) {
  1184. case 'symptom':
  1185. this.propForm.type = 1
  1186. this.formPanel = false
  1187. this.propForm.title = '病情变化'
  1188. this.visibility = true
  1189. this.propForm.list = getDataConfig('hemodialysis', 'symptoms')
  1190. this.propForm.optionList = []
  1191. this.propForm.isMultiple = 2
  1192. if (this.form.symptom.length > 0) {
  1193. this.propForm.result = this.form.symptom.split(',')
  1194. } else {
  1195. this.propForm.result = []
  1196. }
  1197. break
  1198. case 'dispose':
  1199. this.propForm.type = 2
  1200. this.formPanel = false
  1201. this.propForm.title = '处理'
  1202. this.visibility = true
  1203. this.propForm.list = getDataConfig('hemodialysis', 'deals')
  1204. this.propForm.optionList = []
  1205. this.propForm.isMultiple = 2
  1206. if (this.form.dispose.length > 0) {
  1207. this.propForm.result = this.form.dispose.split(',')
  1208. } else {
  1209. this.propForm.result = []
  1210. }
  1211. break
  1212. case 'result':
  1213. this.propForm.type = 3
  1214. this.formPanel = false
  1215. this.propForm.title = '结果'
  1216. this.visibility = true
  1217. this.propForm.list = getDataConfig('hemodialysis', 'results')
  1218. this.propForm.optionList = []
  1219. this.propForm.isMultiple = 2
  1220. if (this.form.result.length > 0) {
  1221. this.propForm.result = this.form.result.split(',')
  1222. } else {
  1223. this.propForm.result = []
  1224. }
  1225. break
  1226. }
  1227. },
  1228. menuCancle: function () {
  1229. this.visibility = false
  1230. this.formPanel = true
  1231. },
  1232. menuComfirm: function (val) {
  1233. this.visibility = false
  1234. this.formPanel = true
  1235. switch (val.type) {
  1236. case 1:
  1237. this.form.symptom = val.result.join(',')
  1238. break
  1239. case 2:
  1240. this.form.dispose = val.result.join(',')
  1241. break
  1242. case 3:
  1243. this.form.result = val.result.join(',')
  1244. break
  1245. }
  1246. },
  1247. open: function () {
  1248. this.listPanel = true
  1249. this.formPanel = false
  1250. this.visibility = false
  1251. this.$refs.picker.close()
  1252. var dialogTop = document.querySelector('#dialogTop')
  1253. if (dialogTop != null) {
  1254. this.$nextTick(() => {
  1255. dialogTop.scrollTop = 0
  1256. })
  1257. }
  1258. },
  1259. parseTime: function (time, format) {
  1260. return parseTime(time, format)
  1261. },
  1262. quickSort (arr, name, snum) {
  1263. // 如果数组<=1,则直接返回
  1264. if (arr.length <= 1) {
  1265. return arr
  1266. }
  1267. var pivotIndex = Math.floor(arr.length / 2)
  1268. // 找基准,并把基准从原数组删除
  1269. var pivot = arr.splice(pivotIndex, 1)[0]
  1270. var middleNum = pivot[name]
  1271. // 定义左右数组
  1272. var left = []
  1273. var right = []
  1274. // 比基准小的放在left,比基准大的放在right
  1275. if (snum) {
  1276. for (var i = 0; i < arr.length; i++) {
  1277. if (arr[i][name] <= middleNum) {
  1278. left.push(arr[i])
  1279. } else {
  1280. right.push(arr[i])
  1281. }
  1282. }
  1283. } else {
  1284. for (var i = 0; i < arr.length; i++) {
  1285. if (arr[i][name] <= middleNum) {
  1286. left.push(arr[i])
  1287. } else {
  1288. right.push(arr[i])
  1289. }
  1290. }
  1291. }
  1292. // 递归,返回所需数组
  1293. return this.quickSort(left, name, snum).concat(
  1294. [pivot],
  1295. this.quickSort(right, name, snum)
  1296. )
  1297. },
  1298. getPermission () {
  1299. request
  1300. .get('/m/api/permission/get', {
  1301. params: {
  1302. create_url: '/m/api/monitor/add?mode=1',
  1303. modify_url: '/m/api/monitor/edit?mode=2',
  1304. modify_other_url: '/m/api/monitor/edit?mode=3',
  1305. del_url: '/m/api/monitor/delete?mode=4',
  1306. del_other_url: '/m/api/monitor/delete?mode=5',
  1307. module: 7
  1308. }
  1309. })
  1310. .then(res => {
  1311. console.log(res)
  1312. // console.log("监测",this.record)
  1313. if (res.data.state == 0) {
  1314. this.hasPermission = false
  1315. } else if (res.data.state == 1) {
  1316. this.is_has_create = res.data.data.is_has_create
  1317. this.is_has_modify = res.data.data.is_has_modify
  1318. this.is_has_modify_other = res.data.data.is_has_modify_other
  1319. this.is_has_del = res.data.data.is_has_del
  1320. this.is_has_del_other = res.data.data.is_has_del_other
  1321. }
  1322. })
  1323. }
  1324. },
  1325. components: {
  1326. CheckBoxSubMenu
  1327. }
  1328. }
  1329. </script>
  1330. <style style="stylesheet/scss" lang="scss" scoped>
  1331. .DialogContent {
  1332. .content {
  1333. .cell {
  1334. float: left;
  1335. width: 4.8rem;
  1336. margin: 0.35rem 0 0 0.5rem !important;
  1337. label {
  1338. display: block;
  1339. height: 0.55rem;
  1340. line-height: 0.55rem;
  1341. color: $pgh-color;
  1342. font-size: 0.45rem;
  1343. margin-bottom: 0.2rem;
  1344. }
  1345. select {
  1346. width: 100%;
  1347. padding: 0.2rem 0;
  1348. border: 1px $border-color solid;
  1349. border-radius: 2px;
  1350. padding-left: 5px;
  1351. }
  1352. .inputBox {
  1353. border: 1px $border-color solid;
  1354. border-radius: 2px;
  1355. padding: 0.18rem 0;
  1356. padding-left: 5px;
  1357. width: 100%;
  1358. @media only screen and (max-width: 415px) {
  1359. padding: 12px 0;
  1360. }
  1361. @media only screen and (min-width: 415px) and (max-width: 767px) {
  1362. padding: 9.4px 0;
  1363. }
  1364. @media only screen and (min-width: 768px) {
  1365. height: 60px;
  1366. line-height: 60px;
  1367. font-size: 0.45rem;
  1368. }
  1369. }
  1370. .typeButton {
  1371. height: 38px;
  1372. line-height: 38px;
  1373. font-size: 0.42rem;
  1374. padding: 0 !important;
  1375. @media only screen and (min-width: 415px) and (max-width: 767px) {
  1376. font-size: 0.4rem;
  1377. }
  1378. @media only screen and (min-width: 768px) {
  1379. height: 60px;
  1380. line-height: 60px;
  1381. font-size: 0.45rem;
  1382. padding: 0 !important;
  1383. }
  1384. }
  1385. .input_focus {
  1386. margin-bottom: 2rem;
  1387. }
  1388. .textarea {
  1389. width: 100%;
  1390. height: 1.22rem;
  1391. border: 1px $border-color solid;
  1392. border-radius: 2px;
  1393. padding-left: 5px;
  1394. }
  1395. }
  1396. .width {
  1397. width: 95%;
  1398. @include box-sizing;
  1399. label {
  1400. display: inline-block;
  1401. }
  1402. button {
  1403. background: $main-color;
  1404. color: #fff;
  1405. border-radius: 6px;
  1406. width: 3.1rem;
  1407. height: 0.9rem;
  1408. line-height: 0.9rem;
  1409. text-align: center;
  1410. margin: 0 0 0.9rem 0;
  1411. }
  1412. }
  1413. .center {
  1414. text-align: center;
  1415. }
  1416. }
  1417. .newMonitTable {
  1418. width: 1670px;
  1419. }
  1420. }
  1421. .row-class-active > td {
  1422. background: #badcff !important;
  1423. }
  1424. .doctor {
  1425. font-size: 0.45rem;
  1426. }
  1427. </style>
  1428. <style lang="scss">
  1429. .el-table td {
  1430. padding: 0;
  1431. }
  1432. .el-table th {
  1433. padding: 6px 0;
  1434. }
  1435. </style>