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

DialysisPrintOrderSixtyfour.vue 59KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430
  1. <template>
  2. <div >
  3. <!-- <el-button type="primary" @click="checkData">一键核对</el-button> -->
  4. <el-button type="primary" @click="toUpload">一键上传</el-button>
  5. <div id="dialysis-print-box-64">
  6. <div
  7. id="dialysis-print-box-64-1"
  8. class="dialysis-print-order print-template-two print_page_main_content"
  9. >
  10. <div>
  11. <!-- <div
  12. class="order-yy-name"
  13. style=" letter-spacing: 0;
  14. font-weight: 600;
  15. font-size: 22px;
  16. display: inline-block;
  17. "
  18. >
  19. {{ orgname }}
  20. </div> -->
  21. <h1 style="text-align: center;">血液透析(滤过)记录表单</h1>
  22. <div>
  23. <div>
  24. <div style="display:inline-block; ;">病历号:
  25. {{patientInfo.record_number?patientInfo.record_number:"" }}
  26. </div>
  27. <div style="display:inline-block;margin-left: 90px;">
  28. 姓名:{{ patientInfo.name }}
  29. </div>
  30. <div style="display:inline-block; margin-left: 90px;">
  31. 性别:{{ patientInfo_gender_1 == true ? "男" : "女" }}
  32. </div>
  33. <div style="display:inline-block; margin-left: 90px;">
  34. 年龄:{{ getAge(patientInfo) }}
  35. </div>
  36. <div style="display:inline-block; margin-left: 90px;">
  37. 透析次数:{{
  38. patientInfo.total_dialysis +
  39. patientInfo.user_sys_before_count
  40. }}次
  41. </div>
  42. </div>
  43. <div style="margin: 10px 0px;">
  44. <div style="display:inline-block;">
  45. 透析日期:{{ queryParams.xtdate }}
  46. </div>
  47. <div style="display:inline-block; margin-left: 90px;">
  48. 透析机号:{{ getNumber() }}
  49. </div>
  50. <div style="display:inline-block; margin-left: 90px;">
  51. 透析中心:{{ orgname }}
  52. </div>
  53. </div>
  54. <table border="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse; width: 960px; ">
  55. <tr>
  56. <td colspan="3" style="border:1px solid black">
  57. <div style="display: inline-block; word-break: break-all;word-wrap: break-word;">
  58. 上机前病情:
  59. <!-- {{ predialysis.symptom_before_dialysis ? predialysis.symptom_before_dialysis : "/" }} -->
  60. {{ predialysis.befor_symptoms? predialysis.befor_symptoms:"" }}
  61. </div>
  62. </td>
  63. </tr>
  64. <tr>
  65. <td colspan="3">
  66. <div style="display: inline-block; word-break: break-all;word-wrap: break-word;">
  67. 疾病诊断:
  68. {{ getDiagnosis(prescriptionInfo.patient_diagnosis) }}
  69. </div>
  70. </td>
  71. </tr>
  72. <tr>
  73. <td colspan="2">
  74. <span>治疗方式:</span>
  75. <span v-if="prescription.mode_id == 0">/</span>
  76. <span v-else-if="prescription.mode_id == 1">HD</span>
  77. <span v-else-if="prescription.mode_id == 2">HDF</span>
  78. <span v-else-if="prescription.mode_id == 3">HD+HP</span>
  79. <span v-else-if="prescription.mode_id == 4">HP</span>
  80. <span v-else-if="prescription.mode_id == 5">HF</span>
  81. <span v-else-if="prescription.mode_id == 6">SCUF</span>
  82. <span v-else-if="prescription.mode_id == 7">IUF</span>
  83. <span v-else-if="prescription.mode_id == 8">HFHD</span>
  84. <span v-else-if="prescription.mode_id == 9">HFHD+HP</span>
  85. <span v-else-if="prescription.mode_id == 10">PHF</span>
  86. <span v-else-if="prescription.mode_id == 11">HFR</span>
  87. <span v-else-if="prescription.mode_id == 12">HDF+HP</span>
  88. <span v-else-if="prescription.mode_id == 13">CRRT</span>
  89. <span v-else-if="prescription.mode_id == 19">IUF+HD</span>
  90. <span v-else-if="prescription.mode_id == 20">UF</span>
  91. <span v-else-if="prescription.mode_id == 21">HD+</span>
  92. <span v-else-if="prescription.mode_id == 22">血浆胆红素吸附+HDF</span>
  93. <span v-else-if="prescription.mode_id == 23">血浆胆红素吸附</span>
  94. <span v-else-if="prescription.mode_id == 24">I-HDF</span>
  95. <span v-else-if="prescription.mode_id == 25">HD高通</span>
  96. <span v-else-if="prescription.mode_id == 26">CVVH</span>
  97. <span v-else-if="prescription.mode_id == 27">CVVHD</span>
  98. <span v-else-if="prescription.mode_id == 28">CVVHDF</span>
  99. <span v-else-if="prescription.mode_id == 29">PE</span>
  100. <span v-else-if="prescription.mode_id == 30">血浆胆红素吸附+HP</span>
  101. <span v-else-if="prescription.mode_id == 31">HPD</span>
  102. <span v-else-if="prescription.mode_id == 32">HDP</span>
  103. </td>
  104. <td>
  105. <span
  106. >治疗时间:{{
  107. afterdialysis.actual_treatment_hour
  108. ? afterdialysis.actual_treatment_hour
  109. : "0"
  110. }}&nbsp;小时&nbsp;{{
  111. afterdialysis.actual_treatment_minute
  112. ? afterdialysis.actual_treatment_minute
  113. : '0'
  114. }}&nbsp;分
  115. </span>
  116. </td>
  117. </tr>
  118. <tr>
  119. <td colspan="3">
  120. <span>治疗抗凝:</span>
  121. <span v-if="prescription.anticoagulant == 0">/</span>
  122. <span v-else-if="prescription.anticoagulant == 1">无肝素</span>
  123. <span v-else-if="prescription.anticoagulant == 2">普通肝素</span>
  124. <span v-else-if="prescription.anticoagulant == 3">低分子肝素</span>
  125. <span v-else-if="prescription.anticoagulant == 4">阿加曲班</span>
  126. <span v-else-if="prescription.anticoagulant == 5">枸橼酸钠</span>
  127. <span v-else-if="prescription.anticoagulant == 6">低分子肝素钙</span>
  128. <span v-else-if="prescription.anticoagulant == 7">低分子肝素钠</span>
  129. <span v-else-if="prescription.anticoagulant == 8">依诺肝素</span>
  130. <span v-else-if="prescription.anticoagulant == 9">达肝素</span>
  131. <span v-else-if="prescription.anticoagulant == 10">体外抗凝</span>
  132. <span v-else-if="prescription.anticoagulant == 11">那屈肝素</span>
  133. <span v-else-if="prescription.anticoagulant == 12">无抗凝剂</span>
  134. <span v-else-if="prescription.anticoagulant == 13">那屈肝素钙</span>
  135. <span v-else-if="prescription.anticoagulant == 14">肝素钙注射液</span>
  136. <span v-else-if="prescription.anticoagulant == 15">甲磺酸萘莫司他</span>
  137. &nbsp;
  138. <span style="width:135px;display: inline-block;"
  139. v-if=" prescription.anticoagulant != 1 && prescription.anticoagulant != 12 && prescription.anticoagulant != 5">
  140. 首剂: {{ prescription.anticoagulant_shouji }}
  141. <span v-if="prescription.anticoagulant == 4">mg</span>
  142. <span v-if="prescription.anticoagulant == 3">iu</span>
  143. <span v-if="prescription.anticoagulant == 2">iu</span>
  144. <span v-if="prescription.anticoagulant == 6">iu</span>
  145. <span v-if="prescription.anticoagulant == 7">iu</span>
  146. <span v-if="prescription.anticoagulant == 10">mg</span>
  147. <span v-if="prescription.anticoagulant == 8">iu</span>
  148. <span v-if="prescription.anticoagulant == 9">iu</span>
  149. <span v-if="prescription.anticoagulant == 11">mg</span>
  150. <span v-if="prescription.anticoagulant == 13">mg</span>
  151. <span v-if="prescription.anticoagulant == 14 ||
  152. prescription.anticoagulant == 15">mg
  153. </span>
  154. </span>
  155. &nbsp;
  156. <span style="width:135px;display: inline-block;"
  157. v-if="prescription.anticoagulant != 12 && prescription.anticoagulant != 1 ">
  158. 追加: {{ prescription.anticoagulant_weichi }}
  159. <span v-if="prescription.anticoagulant == 5">ml/h</span>
  160. <span v-if="prescription.anticoagulant == 4">mg/h</span>
  161. <span v-if="prescription.anticoagulant == 3">iu/h</span>
  162. <span v-if="prescription.anticoagulant == 2">iu/h</span>
  163. <span v-if="prescription.anticoagulant == 6">iu/h</span>
  164. <span v-if="prescription.anticoagulant == 7">iu/h</span>
  165. <span v-if="prescription.anticoagulant == 10">mg/h</span>
  166. <span v-if="prescription.anticoagulant == 8">iu/h</span>
  167. <span v-if="prescription.anticoagulant == 9">iu/h</span>
  168. <span v-if="prescription.anticoagulant == 11">mg/h</span>
  169. <span v-if="prescription.anticoagulant == 13">mg/h</span>
  170. <span v-if="prescription.anticoagulant == 14 ||
  171. prescription.anticoagulant == 15">mg/h
  172. </span>
  173. </span>
  174. &nbsp;
  175. <span style="width:150px;display: inline-block;"
  176. v-if="prescription.anticoagulant != 12 && prescription.anticoagulant != 1 && prescription.anticoagulant != 5 ">
  177. 总量: {{ prescription.anticoagulant_zongliang }}
  178. <span v-if="prescription.anticoagulant == 4">mg</span>
  179. <span v-if="prescription.anticoagulant == 3">iu</span>
  180. <span v-if="prescription.anticoagulant == 2">iu</span>
  181. <span v-if="prescription.anticoagulant == 6">iu</span>
  182. <span v-if="prescription.anticoagulant == 7">iu</span>
  183. <span v-if="prescription.anticoagulant == 10">mg</span>
  184. <span v-if="prescription.anticoagulant == 8">iu</span>
  185. <span v-if="prescription.anticoagulant == 9">iu</span>
  186. <span v-if="prescription.anticoagulant == 11">mg</span>
  187. <span v-if="prescription.anticoagulant == 13">mg</span>
  188. <span v-if="prescription.anticoagulant == 14 ||
  189. prescription.anticoagulant == 15">mg
  190. </span>
  191. </span>
  192. </td>
  193. </tr>
  194. <tr>
  195. <td colspan="3">
  196. <div style="display: inline-block;">
  197. 处方脱水量:
  198. {{
  199. prescription.target_ultrafiltration
  200. ? prescription.target_ultrafiltration
  201. : "/"
  202. }}&nbsp;L
  203. </div>
  204. <div style="margin-left:70px ;display: inline-block;">
  205. 透析液流量:
  206. {{
  207. prescription.dialysate_flow
  208. ? prescription.dialysate_flow
  209. : "/"
  210. }}&nbsp;ml/min
  211. </div>
  212. <!-- <div style="margin-left:70px ;display: inline-block;">
  213. 实际预冲量:
  214. {{ prescription.pre_impulse ? prescription.pre_impulse : "/" }}
  215. &nbsp;L
  216. </div> -->
  217. <div style="margin-left:70px ; display: inline-block;">
  218. 医师签名:
  219. <span v-if="setAdminUserES(prescription.creater) == ''">
  220. {{ getAdminUser(prescription.creater) }}
  221. </span>
  222. <img
  223. class="es-img"
  224. style="height: 30px"
  225. :src="setAdminUserES(prescription.creater)"
  226. alt
  227. srcset
  228. v-else
  229. />
  230. </div>
  231. </td>
  232. </tr>
  233. <tr>
  234. <td>
  235. <span
  236. >透析机:
  237. <span>
  238. {{ predialysis.machine_type ? predialysis.machine_type : "/" }}
  239. </span>
  240. </span>
  241. </td>
  242. <td>
  243. <span>
  244. 透析(滤)器:
  245. {{ prescription.dialysis_dialyszers ? prescription.dialysis_dialyszers : "/" }}
  246. </span>
  247. </td>
  248. <td>
  249. <span>灌流器:</span>
  250. <span>{{ prescription.dialysis_irrigation ? prescription.dialysis_irrigation : "/" }}</span>
  251. </td>
  252. </tr>
  253. <tr>
  254. <td colspan="3">
  255. <span>透析液(mmo l/L)
  256. <span>
  257. K:{{
  258. prescription.kalium ? prescription.kalium : "/"
  259. }}&nbsp;&nbsp;\ Ca:{{
  260. prescription.calcium
  261. ? prescription.calcium
  262. : "/"
  263. }}&nbsp;&nbsp;\ Na:{{
  264. prescription.sodium ? prescription.sodium : "/"
  265. }}&nbsp;&nbsp;\ HCO3:{{
  266. prescription.bicarbonate
  267. ? prescription.bicarbonate
  268. : "/"
  269. }}&nbsp;&nbsp;
  270. </span>
  271. </span>
  272. </td>
  273. </tr>
  274. <tr>
  275. <td colspan="2">
  276. <span>血管通路:</span>
  277. <span v-if="predialysis.blood_access_part_opera_name.indexOf('长期管路') > -1">长期管路</span>
  278. <span v-else-if="predialysis.blood_access_part_opera_name.indexOf('动脉直穿') > -1">动脉直穿</span>
  279. <span v-else-if="predialysis.blood_access_part_opera_name.indexOf('动静脉直穿') > -1">动静脉直穿</span>
  280. <span v-else-if="predialysis.blood_access_part_opera_name.indexOf('带隧道带绦纶套股静脉导管') > -1">带隧道带绦纶套股静脉导管</span>
  281. <span v-else-if="predialysis.blood_access_part_opera_name.indexOf('带隧道带绦纶套锁骨下静脉导管') > -1">带隧道带绦纶套锁骨下静脉导管</span>
  282. <span v-else-if="predialysis.blood_access_part_opera_name.indexOf('带隧道带绦纶套颈内静脉导管') > -1">带隧道带绦纶套颈内静脉导管</span>
  283. <span v-else-if="predialysis.blood_access_part_opera_name.indexOf('无绦纶套股静脉导管') > -1">无绦纶套股静脉导管</span>
  284. <span v-else-if="predialysis.blood_access_part_opera_name.indexOf('无绦纶套锁骨下静脉导管') > -1">无绦纶套锁骨下静脉导管</span>
  285. <span v-else-if="predialysis.blood_access_part_opera_name.indexOf('无绦纶套颈内静脉导管') > -1">无绦纶套颈内静脉导管</span>
  286. <span v-else-if="predialysis.blood_access_part_opera_name.indexOf('直线型移植血管动静脉内瘘') > -1">直线型移植血管动静脉内瘘</span>
  287. <span v-else-if="predialysis.blood_access_part_opera_name.indexOf('自体动静脉内瘘') > -1">自体动静脉内瘘</span>
  288. <span v-else-if="predialysis.blood_access_part_opera_name.indexOf('袢型移植血管动静脉内瘘') > -1">袢型移植血管动静脉内瘘</span>
  289. <span v-else-if="predialysis.blood_access_part_opera_name.indexOf('静脉直穿') > -1">静脉直穿</span>
  290. <span v-else-if="predialysis.blood_access_part_opera_name.indexOf('自体内瘘') > -1">自体内瘘</span>
  291. <span v-else-if="predialysis.blood_access_part_opera_name.indexOf('人造血管') > -1">人造血管</span>
  292. <span v-else-if="predialysis.blood_access_part_opera_name.indexOf('直穿') > -1">直穿</span>
  293. <span v-else-if="predialysis.blood_access_part_opera_name.indexOf('颈内静脉') > -1">颈内静脉</span>
  294. <span v-else-if="predialysis.blood_access_part_opera_name.indexOf('股静脉') > -1">股静脉</span>
  295. </td>
  296. <td>
  297. <div style="display: inline-block;">
  298. 穿刺者:
  299. <span
  300. v-if="
  301. setAdminUserES(
  302. dialysisOrder == null
  303. ? 0
  304. : dialysisOrder.puncture_nurse
  305. ) == ''
  306. "
  307. >
  308. {{
  309. getAdminUser(
  310. dialysisOrder == null
  311. ? 0
  312. : dialysisOrder.puncture_nurse
  313. )
  314. }}
  315. </span>
  316. <img
  317. class="es-img"
  318. style="height: 30px"
  319. :src="
  320. setAdminUserES(
  321. dialysisOrder == null
  322. ? 0
  323. : dialysisOrder.puncture_nurse
  324. )
  325. "
  326. alt
  327. srcset
  328. v-else
  329. />
  330. </div>
  331. </td>
  332. </tr>
  333. <tr style="border-bottom: none;">
  334. <td colspan="3" style=" text-align: center; border-bottom: none;">
  335. <span style="font-weight: bold;"
  336. >治&nbsp;疗&nbsp;过&nbsp;程&nbsp;记&nbsp;录</span
  337. >
  338. </td>
  339. </tr>
  340. <tr>
  341. <td colspan="3">
  342. <table border="1" cellspacing="0" cellpadding="0"
  343. style=" width: 100%; text-align: center; border: none;"
  344. >
  345. <!-- border-bottom: 1px solid gray; border-right: 1px solid gray;-->
  346. <tr style="">
  347. <td rowspan="2" style=" ">时间</td>
  348. <td colspan="4" style=" ">透析参数</td>
  349. <td colspan="4" style=" ">生命体征</td>
  350. <td colspan="2" style=" ">治疗中病情变化</td>
  351. </tr>
  352. <tr style="">
  353. <td style=" ">TMP<br />mmHg</td>
  354. <td style=" ">静脉压<br />mmHg</td>
  355. <td style=" ">血流量<br />ml/min</td>
  356. <td style="">脱水量<br />ml</td>
  357. <td style=" ">T<br />ºC</td>
  358. <td style=" ">HR<br />bpm</td>
  359. <td style=" ">R<br />bpm</td>
  360. <td style=" ">BP<br />mmHg</td>
  361. <!-- <td style=" ">时间</td> -->
  362. <td style=" ">记录</td>
  363. <!-- <td >护士签名</td> -->
  364. </tr>
  365. <tr style="" v-for="(monitor, monindex) in monitors" :key="monindex" >
  366. <td style=" "> {{ getTime(monitor.operate_time, "{h}:{i}") }}</td>
  367. <td style=" ">
  368. <span v-if="getTime(monitor.operate_time) != ''">
  369. {{
  370. monitor.transmembrane_pressure
  371. ? monitor.transmembrane_pressure
  372. : ""
  373. }}
  374. </span>
  375. </td >
  376. <td style=" ">
  377. <span v-if="getTime(monitor.operate_time) != ''">
  378. &nbsp;{{
  379. monitor.venous_pressure ? monitor.venous_pressure : ""
  380. }}
  381. </span>
  382. </td>
  383. <td style=" ">
  384. <span v-if="getTime(monitor.operate_time) != ''">
  385. {{
  386. monitor.blood_flow_volume
  387. ? monitor.blood_flow_volume
  388. : ""
  389. }}
  390. </span>
  391. </td>
  392. <td style=" ">
  393. <span v-if="getTime(monitor.operate_time) != ''&&monindex == 0 ">
  394. {{'/'}}
  395. </span>
  396. <span v-else-if="getTime(monitor.operate_time) != ''&&monindex == 0 ">
  397. {{monitor.ultrafiltration_volume? monitor.ultrafiltration_volume: ""}}
  398. </span>
  399. <span v-else>{{monitor.ultrafiltration_volume? monitor.ultrafiltration_volume: ""}}</span>
  400. </td>
  401. <td style=" ">
  402. <span v-if="getTime(monitor.operate_time) != ''">
  403. {{ monitor.temperature ? monitor.temperature : "" }}
  404. </span>
  405. </td>
  406. <td style=" ">
  407. <span v-if="getTime(monitor.operate_time) != ''">
  408. {{
  409. monitor.pulse_frequency ? monitor.pulse_frequency : ""
  410. }}
  411. </span>
  412. </td>
  413. <td style=" ">
  414. <span v-if="getTime(monitor.operate_time) != ''">
  415. {{ monitor.breathing_rate ? monitor.breathing_rate : "" }}
  416. </span>
  417. </td>
  418. <td style=" ">
  419. <span v-if="getTime(monitor.operate_time) != ''">
  420. {{
  421. monitor.systolic_blood_pressure
  422. ? monitor.systolic_blood_pressure
  423. : ""
  424. }}/{{
  425. monitor.diastolic_blood_pressure
  426. ? monitor.diastolic_blood_pressure
  427. : ""
  428. }}
  429. </span>
  430. </td>
  431. <!-- <td style=" "> {{ getTime(monitor.operate_time, "{h}:{i}") }}</td> -->
  432. <td style=" ">
  433. <!-- <span style="display:inline-block;word-break: break-all;word-wrap: break-word; text-align: left;text-indent:2em;">
  434. {{ monitor.symptom }} &nbsp;{{ monitor.dispose }} &nbsp;{{monitor.result}}
  435. </span> -->
  436. <div style="word-break: break-all;word-wrap: break-word; text-align: left;text-indent:2em;">
  437. {{ monitor.symptom }} {{ monitor.dispose }} {{monitor.result}}
  438. </div>
  439. </td>
  440. <!-- <td>
  441. <span v-if="
  442. setAdminUserES(
  443. dialysisOrder == null
  444. ? 0
  445. : dialysisOrder.start_nurse
  446. ) == ''
  447. "
  448. >{{
  449. getAdminUser(
  450. dialysisOrder == null
  451. ? 0
  452. : dialysisOrder.start_nurse
  453. )
  454. }}</span
  455. >
  456. <img
  457. class="es-img"
  458. style="height: 30px"
  459. :src="
  460. setAdminUserES(
  461. dialysisOrder == null
  462. ? 0
  463. : dialysisOrder.start_nurse
  464. )
  465. "
  466. alt=""
  467. srcset=""
  468. v-else
  469. />
  470. </td> -->
  471. </tr>
  472. </table>
  473. </td>
  474. </tr>
  475. <tr>
  476. <td colspan="3">
  477. <table class="inside_table" border="1" cellspacing="0" cellpadding="0"
  478. style="text-align: center; border-top: none;border-bottom: none;
  479. border-right: none;border-left: none; box-sizing: border-box;">
  480. <tr>
  481. <td style="height: 20px;" width="110">
  482. <p style="height: 20px; line-height: 20px" >提交时间</p>
  483. </td>
  484. <td style="height: 20px; " width="350">
  485. <p style="height: 20px; line-height: 20px">医嘱执行记录</p>
  486. </td>
  487. <td style="height: 20px; " width="130">
  488. <p style="height: 20px; line-height: 20px">执行时间</p>
  489. </td>
  490. <td style="height: 20px; " width="110">
  491. <p style="height: 20px; line-height: 20px">执行</p>
  492. </td>
  493. <td style="height: 20px; " width="150">
  494. <p style="height: 20px; line-height: 20px">上次透后体重</p>
  495. </td>
  496. <td style="height: 20px;" width="110">
  497. {{ lastafterdialysis.weight_after.toFixed(2) }}kg
  498. </td>
  499. </tr>
  500. </table>
  501. </td>
  502. </tr>
  503. <tr v-for="(advice, advice_index) in advices" :key="advice_index" >
  504. <td colspan="3">
  505. <table class="inside_table" border="1" cellspacing="0" cellpadding="0"
  506. style="text-align: center; border-top: none;border-bottom: none;
  507. border-right: none;border-left: none; box-sizing: border-box;">
  508. <tr style="border-bottom:none;">
  509. <td width="110" style="">
  510. {{ getTime(advice.start_time, "{h}:{i}") }}
  511. </td>
  512. <td style=" text-align: left; padding-left: 5px ; word-break: break-all;word-wrap: break-word; box-sizing: border-box;" width="350">
  513. <span v-if="advice.parent_id > 0"></span>
  514. <span>{{ advice.advice_name }}</span>
  515. <span v-if="advice && advice.advice_desc">
  516. ({{ advice.advice_desc}}{{ advice.drug_spec_unit }})
  517. </span>
  518. <span v-if="advice.prescribing_number">&nbsp;&nbsp;
  519. {{ advice.prescribing_number}}{{ advice.prescribing_number_unit }}
  520. </span>
  521. <span v-if="advice.single_dose != 0">
  522. {{ advice.single_dose}}{{ advice.single_dose_unit }}
  523. </span>
  524. <span v-if="advice.parent_id == 0">
  525. {{advice.delivery_way}}
  526. </span>
  527. <span v-if="advice.parent_id == 0">
  528. {{advice.execution_frequency}}
  529. </span>
  530. <span>{{ advice.remark }}</span>
  531. </td>
  532. <!-- 执行时间 -->
  533. <td width="130" style="">
  534. {{ getTime(advice.execution_time, "{h}:{i}") }}
  535. </td>
  536. <!-- 执行 -->
  537. <td width="110" style="">
  538. <!-- <span
  539. v-if="setAdminUserES(advice.advice_doctor) == ''"
  540. >
  541. {{ getAdminUser(advice.advice_doctor) }}
  542. </span>
  543. <img
  544. style="height: 30px"
  545. :src="setAdminUserES(advice.advice_doctor)"
  546. alt=""
  547. srcset=""
  548. /> -->
  549. <span
  550. v-if="setAdminUserES(advice.execution_staff) == ''">{{getAdminUser(advice.execution_staff)}}
  551. </span>
  552. <img class="es-img" style="height: 30px" :src="setAdminUserES(advice.execution_staff)"
  553. alt="" srcset="" v-else>
  554. </td>
  555. <td v-if="advice_index === 0" width="150" style="">透前体重</td>
  556. <td v-if="advice_index === 0" width="110" >
  557. {{predialysis.weight_before.toFixed(2) }}kg
  558. </td>
  559. <td v-if="advice_index === 1" width="150" style="">体重增加量</td>
  560. <td v-if="advice_index === 1" width="110">
  561. {{
  562. assessmentafter.weight_after == 0 ||
  563. predialysis.weight_before == 0
  564. ? '0.00'
  565. : (
  566. predialysis.weight_before -
  567. assessmentafter.weight_after
  568. ).toFixed(2)
  569. }}kg
  570. </td>
  571. <td v-if="advice_index === 2" width="150" style="">干体重(DW)</td>
  572. <td v-if="advice_index === 2" width="110">
  573. {{ predialysis.dry_weight.toFixed(2) }}kg
  574. </td>
  575. <td v-if="advice_index === 3" width="150" style="">较干体重增加量</td>
  576. <td v-if="advice_index === 3" width="110">
  577. {{
  578. patientInfo.total_dialysis +
  579. patientInfo.user_sys_before_count >
  580. 0 && predialysis.weight_before != 0
  581. ? (
  582. predialysis.weight_before - predialysis.dry_weight
  583. ).toFixed(2)
  584. : '0.00'
  585. }}kg
  586. </td>
  587. <td v-if="advice_index === 4" width="150" style="">透后体重</td>
  588. <td v-if="advice_index === 4" width="110">
  589. {{ afterdialysis.weight_after.toFixed(2) }}kg
  590. </td>
  591. <td v-if="advice_index === 5" width="150" style="">
  592. 本次透析体重下降量
  593. </td>
  594. <td v-if="advice_index === 5" width="110">
  595. {{
  596. afterdialysis.weight_after == 0 || predialysis.weight_before == 0
  597. ? '0.00'
  598. : (
  599. predialysis.weight_before - afterdialysis.weight_after
  600. ).toFixed(2)
  601. }}kg
  602. </td>
  603. <td v-if="advice_index > 5" width="150" style=""></td>
  604. <td v-if="advice_index > 5" width="110"></td>
  605. </tr>
  606. </table>
  607. </td>
  608. </tr>
  609. <tr>
  610. <td colspan="3">
  611. <!-- <div style="display: inline-block;">
  612. 姓名:{{ patientInfo.name }}
  613. </div>
  614. <div style="display: inline-block; margin-left: 40px;">
  615. 姓别:{{ patientInfo_gender_1 == true ? "男" : "女" }}
  616. </div>
  617. <div style="display: inline-block; margin-left: 40px;">
  618. 透析机号:{{ getNumber() }}
  619. </div> -->
  620. <div style="word-break: break-all;word-wrap: break-word;">
  621. <div >
  622. 治疗小结:
  623. {{
  624. summary.dialysis_summary ? summary.dialysis_summary : "/"
  625. }}
  626. </div>
  627. <div style="display: inline-block; margin-left: 120px;">
  628. 医生签名:
  629. <span v-if="setAdminUserES(prescription.creater) == ''">
  630. {{ getAdminUser(prescription.creater) }}
  631. </span>
  632. <img
  633. class="es-img"
  634. style="height: 30px"
  635. :src="setAdminUserES(prescription.creater)"
  636. alt
  637. srcset
  638. v-else
  639. />
  640. </div>
  641. <div style="display: inline-block; margin-left: 150px;">
  642. 护士签名:
  643. <span v-if="
  644. setAdminUserES(
  645. dialysisOrder == null
  646. ? 0
  647. : dialysisOrder.start_nurse
  648. ) == ''
  649. "
  650. >{{
  651. getAdminUser(
  652. dialysisOrder == null
  653. ? 0
  654. : dialysisOrder.start_nurse
  655. )
  656. }}</span
  657. >
  658. <img
  659. class="es-img"
  660. style="height: 30px"
  661. :src="
  662. setAdminUserES(
  663. dialysisOrder == null
  664. ? 0
  665. : dialysisOrder.start_nurse
  666. )
  667. "
  668. alt=""
  669. srcset=""
  670. v-else
  671. />
  672. </div>
  673. <div style="display: inline-block; margin-left: 150px;">
  674. 核对护士签名:
  675. <span v-if="setAdminUserES(check == null ? 0 : check.modifier) == ''">
  676. {{ getAdminUser(check == null ? 0 : check.modifier) }}
  677. </span>
  678. <img style="height:30px;" :src="setAdminUserES(check == null ? 0 : check.modifier)" alt srcset v-else />
  679. </div>
  680. </div>
  681. </td>
  682. </tr>
  683. </table>
  684. </div>
  685. </div>
  686. </div>
  687. </div>
  688. </div>
  689. </template>
  690. <script>
  691. import { getDialysisRecord } from "@/api/dialysis";
  692. import { jsGetAge, uParseTime } from "@/utils/tools";
  693. import { getDataConfig } from "@/utils/data";
  694. import print from "print-js";
  695. import html2pdf from 'html2pdf.js'
  696. import { UploadPrintOrder } from "@/api/role/admin"
  697. import { HTML5_FMT } from "moment";
  698. import html2canvas from 'html2canvas'
  699. import { jsPDF } from 'jspdf';
  700. export default {
  701. data() {
  702. return {
  703. patientInfo: {
  704. birth: '',
  705. age: '',
  706. DialysisSchedule: {
  707. device_number: { number: '' },
  708. device_zone: { name: '' }
  709. },
  710. gender: 0
  711. },
  712. queryParams: {
  713. xtdate: "",
  714. xtno: "",
  715. patient_id:0,
  716. },
  717. patientInfo_gender_1: false,
  718. patientInfo_gender_2: false,
  719. orgname: "",
  720. dialysisOrder: {
  721. DeviceNumber: []
  722. },
  723. afterdialysis: {
  724. complications_index: ""
  725. },
  726. prescription: {
  727. dialysate_formulation_name: "",
  728. device: {}
  729. },
  730. advices: [],
  731. doctor_advices: [],
  732. assessmentafter: {},
  733. predialysis: {
  734. score: "",
  735. internal_fistula: "",
  736. internal_fistula_skin: "",
  737. catheter: "",
  738. blood_access_part_opera_name: ""
  739. },
  740. summary: {},
  741. operatorMaps: {},
  742. operators: [],
  743. monitors:[],
  744. check:{},
  745. adminUser: [],
  746. bloodAccessParOpera: {},
  747. lastafterdialysis: {},
  748. projects:[],
  749. prescriptionInfo:{},
  750. patientDiagnose:[]
  751. };
  752. },
  753. computed: {},
  754. watch: {
  755. "patientInfo.gender": function() {
  756. if (this.patientInfo.gender == 1) {
  757. this.patientInfo_gender_1 = true;
  758. this.patientInfo_gender_2 = false;
  759. } else if (this.patientInfo.gender == 2) {
  760. this.patientInfo_gender_2 = true;
  761. this.patientInfo_gender_1 = false;
  762. } else {
  763. this.patientInfo_gender_2 = false;
  764. this.patientInfo_gender_1 = false;
  765. }
  766. }
  767. },
  768. methods: {
  769. unique(arr) { // 根据唯一标识id来对数组进行过滤
  770. const res = new Map();//定义常量 res,值为一个Map对象实例
  771. //返回arr数组过滤后的结果,结果为一个数组 过滤条件是,如果res中没有某个键,就设置这个键的值为1
  772. return arr.filter((arr) => !res.has(arr.advice_name) && res.set(arr.advice_name, 1))
  773. },
  774. getDialysisRecord() {
  775. this.loading = true;
  776. this.queryParams.patient_id = parseInt(this.$route.query.patient_id)
  777. getDialysisRecord(this.queryParams).then(response => {
  778. if (response.data.state == 1) {
  779. this.adminUser = response.data.data.users;
  780. // this.xtdate = response.data.data.xtdate;
  781. // this.users = response.data.data.users;
  782. this.patientInfo = response.data.data.patientInfo;
  783. console.log("this.patienInfo的数据", response.data.data);
  784. console.log("this.patienInfo的数据", this.patientInfo);
  785. this.patientInfo.birth = uParseTime(
  786. this.patientInfo.birthday,
  787. "{y}-{m}-{d}"
  788. );
  789. // }
  790. if (response.data.data.patientInfo.first_dialysis_date != 0) {
  791. this.patientInfo.first_dialysis_date = uParseTime(
  792. response.data.data.patientInfo.first_dialysis_date,
  793. "{y}-{m}-{d}"
  794. );
  795. } else {
  796. this.patientInfo.first_dialysis_date = "";
  797. }
  798. this.check = response.data.data.check;
  799. this.predialysis = response.data.data.PredialysisEvaluation;
  800. this.predialysis.blood_access_part_opera_name =
  801. this.bloodAccessParOperaName(
  802. this.predialysis.blood_access_part_opera_id
  803. );
  804. // console.log(
  805. // this.predialysis.blood_access_part_opera_name,
  806. // "this.predialysis.blood_access_part_opera_name"
  807. // );
  808. this.lastafterdialysis = response.data.data.assessmentAfterDislysis;
  809. this.afterdialysis = response.data.data.AssessmentAfterDislysis;
  810. this.operators = response.data.data.operators;
  811. this.dialysisOrder =
  812. response.data.data.dialysisOrder === null
  813. ? null
  814. : response.data.data.dialysisOrder;
  815. if (this.operators.length > 0) {
  816. var operatorsLen = this.operators.length;
  817. for (var index = 0; index < operatorsLen; index++) {
  818. this.$set(
  819. this.operatorMaps,
  820. this.operators[index].creator,
  821. this.operators[index]
  822. );
  823. }
  824. }
  825. // this.afterdialysis.txqnx = -1;
  826. // if (this.afterdialysis.cruor.indexOf("0度") > -1) {
  827. // this.afterdialysis.txqnx = 0;
  828. // }
  829. // if (this.afterdialysis.cruor.indexOf("Ⅰ度") > -1) {
  830. // this.afterdialysis.txqnx = 1;
  831. // }
  832. // if (this.afterdialysis.cruor.indexOf("Ⅱ度") > -1) {
  833. // this.afterdialysis.txqnx = 2;
  834. // }
  835. // if (this.afterdialysis.cruor.indexOf("Ⅲ度") > -1) {
  836. // this.afterdialysis.txqnx = 3;
  837. // }
  838. // this.afterdialysis.complications =
  839. // this.afterdialysis.complication.split(",");
  840. // this.afterdialysis.complications_other = [];
  841. // this.afterdialysis.complications_index = [];
  842. // var acllen = this.afterdialysis.complications.length;
  843. // for (let index = 0; index < acllen; index++) {
  844. // if (
  845. // this.complications.indexOf(
  846. // this.afterdialysis.complications[index]
  847. // ) >= 0
  848. // ) {
  849. // this.afterdialysis.complications_index.push(
  850. // this.afterdialysis.complications[index]
  851. // );
  852. // } else if (
  853. // this.complications.indexOf(
  854. // this.afterdialysis.complications[index]
  855. // ) < 0 &&
  856. // this.afterdialysis.complications_other.indexOf(
  857. // this.afterdialysis.complications[index]
  858. // ) < 0
  859. // ) {
  860. // this.afterdialysis.complications_other.push(
  861. // this.afterdialysis.complications[index]
  862. // );
  863. // }
  864. // }
  865. // this.afterdialysis.complications_other =
  866. // this.afterdialysis.complications_other.join(",");
  867. this.prescription = response.data.data.dialysisPrescription;
  868. // this.receiverTreatmentAccess =
  869. // response.data.data.receiverTreatmentAccess;
  870. this.assessmentafter = response.data.data.assessmentAfterDislysis;
  871. this.prescriptionInfo = response.data.data.prescriptionInfo
  872. this.patientDiagnose = response.data.data.patientDiagnose
  873. // this.sick_condition_arr.forEach((o) => {
  874. // if (this.receiverTreatmentAccess.sick_condition == o.id) {
  875. // this.sick_condition = o.name;
  876. // }
  877. // });
  878. // this.prescription.mode = this.modeName(this.prescription.mode_id);
  879. // var rwLen = this.replacementWays.length;
  880. // this.prescription.replacement = "";
  881. // for (let index = 0; index < rwLen; index++) {
  882. // if (
  883. // this.replacementWays[index].id ==
  884. // this.prescription.replacement_way
  885. // ) {
  886. // this.prescription.replacement = this.replacementWays[index].name;
  887. // break;
  888. // }
  889. // }
  890. // this.prescription.dialysate_formulation_name =
  891. // this.dialysateFormulationName(
  892. // this.prescription.dialysate_formulation
  893. // );
  894. // var paLen = this.perfusionApparatus.length;
  895. // this.prescription.perfusion_apparatus_name = "";
  896. // for (let index = 0; index < paLen; index++) {
  897. // if (
  898. // this.perfusionApparatus[index].id ==
  899. // this.prescription.perfusion_apparatus
  900. // ) {
  901. // this.prescription.perfusion_apparatus_name =
  902. // this.perfusionApparatus[index].name;
  903. // break;
  904. // }
  905. // }
  906. // console.log(this.prescription, "透析处方");
  907. // var acLen = this.anticoagulantsConfit.length;
  908. // var thisALID = this.prescription.anticoagulant;
  909. // this.prescription.anticoagulant_name = "";
  910. // if (
  911. // typeof this.anticoagulantsConfit[thisALID] !== "undefined" &&
  912. // this.anticoagulantsConfit[thisALID] != null
  913. // ) {
  914. // this.prescription.anticoagulant_name =
  915. // this.anticoagulantsConfit[thisALID].name;
  916. // this.AlPanel = this.anticoagulantsConfit[thisALID];
  917. // }
  918. this.advices = response.data.data.advices;
  919. this.monitors = response.data.data.monitors;
  920. this.summary = response.data.data.summary;
  921. this.org_template_info = response.data.data.org_template_info;
  922. if (this.monitors.length <= 0) {
  923. var nl = 8 - this.monitors.length;
  924. for (let index = 0; index < nl; index++) {
  925. this.monitors.push([]);
  926. }
  927. }
  928. this.jilurow = this.monitors.length + 1;
  929. this.advice_jilurow = this.advices.length + 1;
  930. var childMap = {};
  931. for (const index in this.advices) {
  932. if (this.advices[index].parent_id == 0) {
  933. continue;
  934. }
  935. if (!(this.advices[index].parent_id in childMap)) {
  936. childMap[this.advices[index].parent_id] = [];
  937. }
  938. childMap[this.advices[index].parent_id].push(this.advices[index]);
  939. }
  940. var advices = [];
  941. for (const index in this.advices) {
  942. if (this.advices[index].parent_id > 0) {
  943. continue;
  944. }
  945. var item = this.advices[index];
  946. if (item.id in childMap) {
  947. item.children = childMap[item.id];
  948. } else {
  949. item.children = [];
  950. }
  951. advices.push(item);
  952. }
  953. let projects = [];
  954. response.data.data.projects.map((item) => {
  955. if (item.type == 2 && item.project.is_print == 1) {
  956. projects.push(item);
  957. }
  958. });
  959. this.projects = projects;
  960. if (this.doctor_advices.length + this.projects.length <= 6) {
  961. var nl = 6 - (this.doctor_advices.length + this.projects.length);
  962. this.print_length = 6;
  963. for (let index = 0; index < nl; index++) {
  964. if (
  965. this.projects[index] == undefined ||
  966. this.projects[index].length <= 0
  967. ) {
  968. this.projects.push([]);
  969. } else {
  970. continue;
  971. }
  972. }
  973. }
  974. console.log("advices",this.advices)
  975. console.log("this.projects", this.projects);
  976. // var objProject = {advice_name:"",start_time:"",single_dose:"",single_dose_unit:"",}
  977. if(this.projects!=null && this.projects.length >0){
  978. for(let i=0;i<this.projects.length;i++){
  979. if(this.projects[i].type== 2){
  980. this.projects[i].project_team_name = ""
  981. this.projects[i].project_team_id = 0
  982. console.log("this.projects[i].project.team",this.projects[i].project.team)
  983. if(this.projects[i].team!= "undefined" && this.projects[i].team.id >0){
  984. this.projects[i].project_team = this.projects[i].team.project_team
  985. this.projects[i].project_team_id = this.projects[i].team.id
  986. this.projects[i].start_time = this.projects[i].start_time
  987. this.projects[i].single_dose = this.projects[i].single_dose
  988. this.projects[i].single_dose_unit = this.projects[i].unit
  989. this.projects[i].execution_time = this.projects[i].execution_time
  990. this.projects[i].execution_staff= this.projects[i].execution_staff
  991. this.projects[i].advice_name = this.projects[i].team.project_team
  992. this.advices.push(this.projects[i])
  993. }else{
  994. this.projects[i].project_team = this.projects[i].project.project_name
  995. this.projects[i].advice_name = this.projects[i].project.project_name
  996. this.projects[i].start_time = this.projects[i].start_time
  997. this.projects[i].single_dose = this.projects[i].single_dose
  998. this.projects[i].single_dose_unit = this.projects[i].unit
  999. this.projects[i].execution_time = this.projects[i].execution_time
  1000. this.projects[i].execution_staff= this.projects[i].execution_staff
  1001. this.advices.push(this.projects[i])
  1002. }
  1003. }
  1004. }
  1005. }
  1006. var tableAdvice = this.advices;
  1007. if (tableAdvice.length === 0) {
  1008. var obj = { advice_name: "", start_time: "" };
  1009. var obj1 = { advice_name: "", start_time: "" };
  1010. var obj2 = { advice_name: "", start_time: "" };
  1011. var obj3 = { advice_name: "", start_time: "" };
  1012. var obj4 = { advice_name: "", start_time: "" };
  1013. var obj5 = { advice_name: "", start_time: "" };
  1014. tableAdvice.push(obj);
  1015. tableAdvice.push(obj1);
  1016. tableAdvice.push(obj2);
  1017. tableAdvice.push(obj3);
  1018. tableAdvice.push(obj4);
  1019. tableAdvice.push(obj5);
  1020. this.advices = tableAdvice;
  1021. }
  1022. if (tableAdvice.length === 1) {
  1023. var obj = { advice_name: "", start_time: "" };
  1024. var obj1 = { advice_name: "", start_time: "" };
  1025. var obj2 = { advice_name: "", start_time: "" };
  1026. var obj3 = { advice_name: "", start_time: "" };
  1027. var obj4 = { advice_name: "", start_time: "" };
  1028. tableAdvice.push(obj);
  1029. tableAdvice.push(obj1);
  1030. tableAdvice.push(obj2);
  1031. tableAdvice.push(obj3);
  1032. tableAdvice.push(obj4);
  1033. this.advices = tableAdvice;
  1034. }
  1035. if (tableAdvice.length === 2) {
  1036. var obj = { advice_name: "", start_time: "" };
  1037. var obj1 = { advice_name: "", start_time: "" };
  1038. var obj2 = { advice_name: "", start_time: "" };
  1039. var obj3 = { advice_name: "", start_time: "" };
  1040. tableAdvice.push(obj);
  1041. tableAdvice.push(obj1);
  1042. tableAdvice.push(obj2);
  1043. tableAdvice.push(obj3);
  1044. this.advices = tableAdvice;
  1045. }
  1046. if (tableAdvice.length === 3) {
  1047. var obj = { advice_name: "", start_time: "" };
  1048. var obj1 = { advice_name: "", start_time: "" };
  1049. var obj2 = { advice_name: "", start_time: "" };
  1050. tableAdvice.push(obj);
  1051. tableAdvice.push(obj1);
  1052. tableAdvice.push(obj2);
  1053. this.advices = tableAdvice;
  1054. }
  1055. if (tableAdvice.length === 4) {
  1056. var obj = { advice_name: "", start_time: "" };
  1057. var obj1 = { advice_name: "", start_time: "" };
  1058. tableAdvice.push(obj);
  1059. tableAdvice.push(obj1);
  1060. this.advices = tableAdvice;
  1061. }
  1062. if (tableAdvice.length === 5) {
  1063. var obj = { advice_name: "", start_time: "" };
  1064. var obj1 = { advice_name: "", start_time: "" };
  1065. tableAdvice.push(obj);
  1066. tableAdvice.push(obj1);
  1067. this.advices = tableAdvice;
  1068. }
  1069. if (tableAdvice.length === 6) {
  1070. var obj1 = { advice_name: "", start_time: "" };
  1071. tableAdvice.push(obj1);
  1072. this.advices = tableAdvice;
  1073. }
  1074. var arr = []
  1075. arr = this.unique(this.advices)
  1076. // console.log("arriooowo",arr)
  1077. // if(arr!=null && arr.length >0){
  1078. // for(let i=0;i<arr.length;i++){
  1079. // if(arr[i].advice_name!="" && arr[i].advice_name!=undefined){
  1080. // arr[i].prescription_id_no = 0
  1081. // arr[i].prescription_id_no = parseInt(arr[i].prescription_id) + parseInt(arr[i].groupno)
  1082. // }else{
  1083. // arr[i].prescription_id_no = 0
  1084. // }
  1085. // }
  1086. // let dataInfo = {}
  1087. // arr.forEach((item, index) => {
  1088. // let { prescription_id_no } = item
  1089. // if (!dataInfo[prescription_id_no]) {
  1090. // dataInfo[prescription_id_no] = {
  1091. // prescription_id_no:item.prescription_id_no,
  1092. // advice_name:item.advice_name,
  1093. // start_time:item.start_time,
  1094. // single_dose:item.single_dose,
  1095. // single_dose_unit:item.unit,
  1096. // execution_time:item.execution_time,
  1097. // execution_staff:item.execution_staff,
  1098. // advice_doctor:item.advice_doctor,
  1099. // checker:item.checker,
  1100. // check_time:item.check_time,
  1101. // delivery_way:item.delivery_way,
  1102. // frequency_type:item.frequency_type,
  1103. // prescribing_number:item.prescribing_number,
  1104. // prescribing_number_unit:item.prescribing_number_unit,
  1105. // single_dose:item.single_dose,
  1106. // single_dose_unit:item.single_dose_unit,
  1107. // child:[]
  1108. // }
  1109. // }
  1110. // })
  1111. // let newArr = Object.values(dataInfo)
  1112. // if(newArr!=null && newArr.length>0){
  1113. // for(let i=0;i<newArr.length;i++){
  1114. // for(let i=0;i<arr[i].length;i++){
  1115. // if(newArr[i].prescription_id_no == arr[i].prescription_id_no){
  1116. // newArr[i].child.push(arr[i])
  1117. // }
  1118. // }
  1119. // }
  1120. // }
  1121. // console.log("newARRWOOWOW",newArr)
  1122. // }
  1123. this.advices = []
  1124. this.advices= arr
  1125. console.log("advices-----------------",this.advices)
  1126. // this.loading = false;
  1127. // console.log(this.advice_groups);
  1128. } else {
  1129. this.loading = false;
  1130. this.$message.error("请求数据失败");
  1131. return false;
  1132. }
  1133. });
  1134. },
  1135. getNumber() {
  1136. if (this.dialysisOrder != null) {
  1137. return (
  1138. this.patientInfo.DialysisSchedule.device_zone.name +
  1139. this.dialysisOrder.DeviceNumber.number
  1140. );
  1141. } else {
  1142. return (
  1143. this.patientInfo.DialysisSchedule.device_zone.name +
  1144. this.patientInfo.DialysisSchedule.device_number.number
  1145. );
  1146. }
  1147. },
  1148. setAdminUserES(id) {
  1149. console.log(id);
  1150. if (id == 0) {
  1151. return "";
  1152. }
  1153. if (id in this.operatorMaps) {
  1154. return this.operatorMaps[id].url;
  1155. } else {
  1156. return "";
  1157. }
  1158. },
  1159. getAdminUser(id) {
  1160. if (id == 0) {
  1161. return "";
  1162. }
  1163. if (id == undefined) {
  1164. return "";
  1165. }
  1166. for (let i = 0; i < this.adminUser.length; i++) {
  1167. if (this.adminUser[i].id == id) {
  1168. return this.adminUser[i].name;
  1169. }
  1170. }
  1171. },
  1172. getTime(value, temp) {
  1173. if (value == 0) {
  1174. return "";
  1175. }
  1176. if (value != undefined) {
  1177. return uParseTime(value, temp);
  1178. }
  1179. return "";
  1180. },
  1181. bloodAccessParOperaName(id) {
  1182. if (id in this.bloodAccessParOpera) {
  1183. return this.bloodAccessParOpera[id].name
  1184. }
  1185. return ''
  1186. },
  1187. // getAge: function (val) {
  1188. // if (
  1189. // this.org_template_info.template_id == 2 ||
  1190. // this.org_template_info.template_id == 0
  1191. // ) {
  1192. // if (val.age == 0) {
  1193. // return jsGetAge(val.birth, "-");
  1194. // } else {
  1195. // return val.age;
  1196. // }
  1197. // } else {
  1198. // return jsGetAge(val.birth, "-");
  1199. // }
  1200. // },
  1201. getAge: function (val) {
  1202. if(val!=undefined){
  1203. var thisLen = val.id_card_no.length;
  1204. var birth = "";
  1205. if (thisLen == 15) {
  1206. birth = "19" + val.id_card_no.substr(6, 6);
  1207. } else {
  1208. birth = val.id_card_no.substr(6, 8);
  1209. }
  1210. var birthtwo =
  1211. birth.substr(0, 4) +
  1212. "-" +
  1213. birth.substr(4, 2) +
  1214. "-" +
  1215. birth.substr(6, 2);
  1216. var age = jsGetAge(birthtwo, "-");
  1217. return age;
  1218. }
  1219. },
  1220. getDiagnosis(id) {
  1221. let arr = id.split(',')
  1222. var name = ''
  1223. for (let i = 0; i < this.patientDiagnose.length; i++) {
  1224. if (arr.indexOf(String(this.patientDiagnose[i].id)) > -1) {
  1225. name += this.patientDiagnose[i].class_name + ' '
  1226. }
  1227. }
  1228. return name
  1229. },
  1230. toUpload() {
  1231. let dom = document.getElementById("dialysis-print-box-64");
  1232. //调用方法下载
  1233. html2canvas(dom, {
  1234. useCORS: true, //允许跨域
  1235. allowTaint: false,
  1236. logging: false,
  1237. letterRendering: true,
  1238. ddpi: window.devicePixelRatio * 4, //将分辨率提高到特定的DPI 提高四倍
  1239. scale: 4, //按比例增加分辨率
  1240. background: '#fff',//pdf背景色为白色,默认是黑色的
  1241. }).then((canvas) => {
  1242. //返回图片dataURL,参数:图片格式和清晰度(0-1)
  1243. var pageData = canvas.toDataURL('image/jpeg', 1.0);
  1244. //方向默认竖直,尺寸ponits,格式a4[595.28,841.89]
  1245. var pdf = new jsPDF('', 'pt', 'a4');
  1246. //addImage后两个参数控制添加图片的尺寸,此处将页面高度按照a4纸宽高比列进行压缩
  1247. pdf.addImage(pageData, 'JPEG', 0, 0, 595.28, 592.28 / canvas.width * canvas.height);
  1248. var newBase64Data = pdf.output("dataurlstring").split("base64,")[1]
  1249. console.log("base63",newBase64Data)
  1250. this.viewPdf(newBase64Data)
  1251. var data = {
  1252. name:newBase64Data,
  1253. }
  1254. UploadPrintOrder(data).then(response=>{
  1255. if(response.data.state == 1){
  1256. var sign = response.data.data.sign
  1257. console.log("SIGNWWOOWWO")
  1258. this.$message.success("保存成功!")
  1259. }
  1260. })
  1261. // this.viewPdf(newBase64Data)
  1262. //保存到pdf,名字是stone
  1263. // pdf.save('stone.pdf');
  1264. });
  1265. },
  1266. viewPdf(content) {
  1267. console.log("content",content);
  1268. const blob = this.base64ToBlob(content);
  1269. if (window.navigator && window.navigator.msSaveOrOpenBlob) {
  1270. window.navigator.msSaveOrOpenBlob(blob);
  1271. } else {
  1272. const fileURL = URL.createObjectURL(blob);
  1273. console.log("fileUlrwowowoow",fileURL)
  1274. window.open(fileURL);//打开ppf文件
  1275. }
  1276. },
  1277. base64ToBlob(code) {
  1278. code = code.replace(/[\n\r]/g, '');// 检查base64字符串是否符合base64编码
  1279. // atob() 方法用于解码使用 base-64 编码的字符串。
  1280. const raw = window.atob(code);
  1281. const rawLength = raw.length;
  1282. const uInt8Array = new Uint8Array(rawLength);
  1283. for (let i = 0; i < rawLength; ++i) {
  1284. // 将解码后的逐个字符转换成Unicode序号,放入Unit8Array数组
  1285. uInt8Array[i] = raw.charCodeAt(i);
  1286. }
  1287. // 通过Blob将Uint8Array数组转换成pdf类型的文件对象
  1288. return new Blob([uInt8Array], { type: 'application/pdf' });
  1289. },
  1290. },
  1291. created() {
  1292. var bloodAccessParOpera = getDataConfig(
  1293. "hemodialysis",
  1294. "vascular_access_desc"
  1295. );
  1296. for (var key in bloodAccessParOpera) {
  1297. this.bloodAccessParOpera[bloodAccessParOpera[key].id] =
  1298. bloodAccessParOpera[key];
  1299. }
  1300. var xtuser = this.$store.getters.xt_user;
  1301. this.orgname = xtuser.org.org_name;
  1302. const xtdate = this.$route.query && this.$route.query.xtdate;
  1303. const xtno = this.$route.query && this.$route.query.xtno;
  1304. if (
  1305. typeof xtdate === "string" &&
  1306. xtdate.length > 0 &&
  1307. typeof xtno === "string" &&
  1308. xtno.length > 0
  1309. ) {
  1310. this.queryParams.xtdate = xtdate;
  1311. this.queryParams.xtno = xtno;
  1312. this.xtdate = xtdate;
  1313. this.getDialysisRecord();
  1314. } else {
  1315. this.$message.error("参数不齐");
  1316. return false;
  1317. }
  1318. }
  1319. };
  1320. </script>
  1321. <style>
  1322. .print_page_main_content {
  1323. background-color: white;
  1324. width: 960px;
  1325. margin: 0 auto 50px;
  1326. padding: 0 0 0 0;
  1327. page-break-after: always;
  1328. }
  1329. </style>