DialysisPrintOrderThirteen.vue 55KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464
  1. <template>
  2. <div id="dialysis-print-box-1">
  3. <div
  4. id="dialysis-print-box-1-1"
  5. class="dialysis-print-order print-template-two print_page_main_content"
  6. >
  7. <div style="width:100%;text-align:center;">
  8. <div
  9. class="order-yy-name"
  10. style="letter-spacing: 0;font-weight:600;font-size:22px;display:inline-block;"
  11. >
  12. {{ orgname }}
  13. </div>
  14. </div>
  15. <div style="display:inline-block;width:100%;text-align:center;">
  16. <div
  17. class="order-title"
  18. style="letter-spacing: 0;font-weight:600;font-size:22px;display:inline-block;"
  19. >
  20. 血液净化治疗记录单
  21. </div>
  22. </div>
  23. <div class="row">
  24. <div class="inline_block" style="margin-right:30px;">
  25. 日期 <div class="inline_block under_line" style="width:50px">{{ queryParams.xtdate.slice(0,4) }}</div>年
  26. <div class="inline_block under_line" style="width:50px">{{ queryParams.xtdate.slice(5,7) }}</div>月
  27. <div class="inline_block under_line" style="width:50px">{{ queryParams.xtdate.slice(8,11) }}</div>日
  28. </div>
  29. <div class="inline_block" style="margin-right:30px;">
  30. 机器编号
  31. <div class="inline_block under_line" style="width:80px;">
  32. {{ getNumber() }}
  33. </div>
  34. </div>
  35. <div class="inline_block" style="margin-right:30px;">
  36. 病案号 <div class="inline_block under_line" style="width:80px">{{ patientInfo.dialysis_no }}</div>
  37. </div>
  38. </div>
  39. <div style="border-bottom: 2px solid #000;width:100%;"></div>
  40. <div class="row">
  41. <div class="inline_block" style="margin-right:30px;">
  42. 姓名
  43. <div class="inline_block under_line" style="width:100px;text-align: center;">
  44. {{ patientInfo.name ? patientInfo.name : "" }}
  45. </div>
  46. </div>
  47. <div class="inline_block" style="margin-right:30px;">
  48. 性别&nbsp;&nbsp;&nbsp;&nbsp;
  49. <label-box :isChecked="patientInfo.gender == '男'" showValue="男" ></label-box>&nbsp;
  50. <label-box :isChecked="patientInfo.gender == '女'" showValue="女" ></label-box>
  51. </div>
  52. <div class="inline_block" style="margin-right:30px;">
  53. 年龄:
  54. <div class="under_line" style="width: 50px;text-align: center">
  55. {{ getAge(patientInfo) }}
  56. </div>
  57. </div>
  58. </div>
  59. <div class="row">
  60. <div class="inline_block" style="margin-right:30px;">
  61. 血液净化方式
  62. <div class="inline_block under_line" style="width:300px;text-align: center;">
  63. <label-box :isChecked="prescription.mode_id == 1 ? true : false" showValue="HD"></label-box>&nbsp;&nbsp;&nbsp;&nbsp;
  64. <label-box :isChecked="prescription.mode_id == 2 ? true : false" showValue="HDF"></label-box>&nbsp;&nbsp;&nbsp;&nbsp;
  65. <!-- <label-box :isChecked="prescription.mode_id == 5 ? true : false" showValue="HF"></label-box>
  66. <label-box :isChecked="prescription.mode_id == 4 ? true : false" showValue="HP"></label-box> -->
  67. <label-box :isChecked="prescription.mode_id == 3 ? true : false" showValue="HD+HP"></label-box>
  68. </div>
  69. </div>
  70. <div class="inline_block" style="margin-right:30px;">
  71. 血液净化器类型
  72. <div class="inline_block under_line" style="width:150px;text-align: center;">
  73. {{ prescription.dialyzer_perfusion_apparatus ? prescription.dialyzer_perfusion_apparatus : ''}}
  74. </div>
  75. </div>
  76. </div>
  77. <div class="row">
  78. 血管通路
  79. <div class="inline_block under_line" style="width:93%;text-align: left;">
  80. <label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('内瘘-左') > -1 ? true : predialysis.blood_access_part_opera_name.indexOf('内瘘-右') > -1 ? true : false" showValue="内瘘"></label-box>
  81. (<label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('内瘘-左') > -1 ? true : false" showValue="左"></label-box>
  82. <label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('内瘘-右') > -1 ? true : false" showValue="右"></label-box>)
  83. &nbsp;
  84. <label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('中心静脉置管-左') > -1 ? true : predialysis.blood_access_part_opera_name.indexOf('中心静脉置管-右') > -1 ? true : false" showValue="中心静脉置管"></label-box>
  85. (<label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('中心静脉置管-左') > -1 ? true : false" showValue="左"></label-box>
  86. <label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('中心静脉置管-右') > -1 ? true : false" showValue="右"></label-box>)部位
  87. &nbsp;
  88. <label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('颈内') > -1 ? true : false" showValue="颈内"></label-box>
  89. &nbsp;
  90. <label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('锁骨下') > -1 ? true : false" showValue="锁骨下"></label-box>
  91. &nbsp;
  92. <label-box :isChecked="predialysis.blood_access_part_opera_name.indexOf('股') > -1 ? true : false" showValue="股"></label-box>
  93. &nbsp;
  94. <label-box :isChecked="['内瘘-左','内瘘-右','中心静脉置管-左','中心静脉置管-右','颈内','锁骨下','股'].indexOf(predialysis.blood_access_part_opera_name) == -1? true : false" showValue="其他"></label-box>
  95. &nbsp;
  96. </div>
  97. </div>
  98. <div class="row">
  99. 抗凝药物
  100. <div class="inline_block under_line" style="width:93%;text-align: left;">
  101. <label-box :isChecked="prescription.anticoagulant == '普通肝素' ? true : false" showValue="普通肝素"></label-box>&nbsp;
  102. <label-box :isChecked="prescription.anticoagulant == '低分子肝素钙' ? true : prescription.anticoagulant == '低分子肝素钠' ? true : false" showValue="低分子肝素"></label-box>
  103. (<label-box :isChecked="prescription.anticoagulant == '低分子肝素钙' ? true : false" showValue="钙"></label-box>
  104. <label-box :isChecked="prescription.anticoagulant == '低分子肝素钠' ? true : false" showValue="钠"></label-box>)
  105. <div class="inline_block">
  106. 剂量:首次
  107. <div class="inline_block" style="width:50px;text-align:center">
  108. {{ prescription.anticoagulant_shouji ? prescription.anticoagulant_shouji : "" }}
  109. </div>
  110. <span v-if="prescription.anticoagulant == '枸橼酸钠'">mg</span>
  111. <span v-if="prescription.anticoagulant == '阿加曲班'">mg</span>
  112. <span v-if="prescription.anticoagulant == '低分子肝素'">iu</span>
  113. <span v-if="prescription.anticoagulant == '普通肝素'">iu</span>
  114. <span v-if="prescription.anticoagulant == '无肝素'">mg</span>
  115. <span v-if="prescription.anticoagulant == '低分子肝素钙'">iu</span>
  116. <span v-if="prescription.anticoagulant == '低分子肝素钠'">iu</span>&nbsp;
  117. </div>
  118. <div class="inline_block">
  119. 追加
  120. <div class="inline_block" style="width:50px;text-align:center">
  121. {{ prescription.anticoagulant_weichi ? prescription.anticoagulant_weichi : "" }}
  122. </div>
  123. <span v-if="prescription.anticoagulant == '枸橼酸钠'">ml/h</span>
  124. <span v-if="prescription.anticoagulant == '阿加曲班'">mg/h</span>
  125. <span v-if="prescription.anticoagulant == '低分子肝素'">iu/h</span>
  126. <span v-if="prescription.anticoagulant == '普通肝素'">iu/h</span>
  127. <span v-if="prescription.anticoagulant == '无肝素'">mg/h</span>
  128. <span v-if="prescription.anticoagulant == '低分子肝素钙'">iu/h</span>
  129. <span v-if="prescription.anticoagulant == '低分子肝素钠'">iu/h</span>&nbsp;
  130. </div>
  131. <div class="inline_block">
  132. 总量
  133. <div class="inline_block" style="width:50px;text-align:center">
  134. {{ prescription.anticoagulant_zongliang ? prescription.anticoagulant_zongliang : ""}}
  135. </div>
  136. <span v-if="prescription.anticoagulant == '枸橼酸钠'">mg</span>
  137. <span v-if="prescription.anticoagulant == '阿加曲班'">mg</span>
  138. <span v-if="prescription.anticoagulant == '低分子肝素'">iu</span>
  139. <span v-if="prescription.anticoagulant == '普通肝素'">iu</span>
  140. <span v-if="prescription.anticoagulant == '无肝素'">mg</span>
  141. <span v-if="prescription.anticoagulant == '低分子肝素钙'">iu</span>
  142. <span v-if="prescription.anticoagulant == '低分子肝素钠'">iu</span>
  143. </div>
  144. </div>
  145. </div>
  146. <div class="row">
  147. <div class="inline_block" style="margin-right:30px;">
  148. 干体重
  149. <div class="inline_block under_line" style="width:100px;">
  150. {{ predialysis.dry_weight ? predialysis.dry_weight : " " }}
  151. </div>kg
  152. </div>
  153. <div class="inline_block" style="margin-right:30px;">
  154. 净化前体重
  155. <div class="inline_block under_line" style="width:100px;">
  156. {{ predialysis.weight_before ? predialysis.weight_before : " " }}
  157. </div>kg
  158. </div>
  159. <div class="inline_block" style="margin-right:30px;">
  160. 预设脱水
  161. <div class="inline_block under_line" style="width:100px;">
  162. {{ prescription.target_ultrafiltration ? prescription.target_ultrafiltration : ' ' }}
  163. </div>kg
  164. </div>
  165. </div>
  166. <div class="row">
  167. <div class="inline_block" style="margin-right:22px;">
  168. 净化时间
  169. <div class="inline_block under_line" style="width:50px;">
  170. {{ afterdialysis.actual_treatment_hour ? afterdialysis.actual_treatment_hour : 0 }}
  171. </div>h
  172. <div class="inline_block under_line" style="width:50px;">
  173. {{ afterdialysis.actual_treatment_minute ? afterdialysis.actual_treatment_minute : 0 }}
  174. </div>min
  175. </div>
  176. <div class="inline_block" style="margin-right:30px;">
  177. 净化后体重
  178. <div class="inline_block under_line" style="width:100px;">
  179. {{ afterdialysis.weight_after ? parseFloat(afterdialysis.weight_after).toFixed(1) : " " }}
  180. </div>kg
  181. </div>
  182. <div class="inline_block" style="margin-right:30px;">
  183. 实际脱水
  184. <div class="inline_block under_line" style="width:100px;">
  185. {{ afterdialysis.actual_ultrafiltration ? afterdialysis.actual_ultrafiltration : " " }}
  186. </div>kg
  187. </div>
  188. </div>
  189. <div class="row">
  190. 透前评估
  191. <div class="inline_block under_line" style="width:93%;text-align: left;">
  192. <div class="inline_block" style="margin-right:30px;">
  193. 体温
  194. <div class="inline_block" style="width:50px;text-align:center">
  195. {{ predialysis.temperature ? predialysis.temperature : "" }}
  196. </div>℃
  197. </div>
  198. <div class="inline_block" style="margin-right:30px;">
  199. 血压
  200. <div class="inline_block" style="width:100px;text-align:center">
  201. {{ predialysis.systolic_blood_pressure ? predialysis.systolic_blood_pressure : "" }}/
  202. {{ predialysis.diastolic_blood_pressure ? predialysis.diastolic_blood_pressure : "" }}
  203. </div>mmHg
  204. </div>
  205. <div class="inline_block" style="margin-right:30px;">
  206. 脉搏
  207. <div class="inline_block" style="width:50px;text-align:center">
  208. {{ predialysis.pulse_frequency ? predialysis.pulse_frequency : "" }}
  209. </div>次/分
  210. </div>
  211. </div>
  212. </div>
  213. <table class="print-table" border="1">
  214. <tr>
  215. <td>时间</td>
  216. <td>医嘱</td>
  217. <td>医师签名</td>
  218. <td>执行时间</td>
  219. <td>执行者签名</td>
  220. </tr>
  221. <tr v-for="(advice, advice_index) in tableAdvice" :key="advice_index">
  222. <td style="height:30px;line-height:30px">{{ getTime(advice.start_time, "{y}-{m}-{d} {h}:{i}") }}</td>
  223. <td class="parent">
  224. <span v-if="advice.parent_id > 0">---></span>
  225. <span>{{ advice.advice_name }}</span>
  226. <span v-if="advice && advice.advice_desc">({{ advice.advice_desc }}{{ advice.drug_spec_unit }})</span>
  227. <span v-if="advice.prescribing_number"> &nbsp;&nbsp; {{ advice.prescribing_number }}{{ advice.prescribing_number_unit }}</span>
  228. <span v-if="advice.single_dose != 0">{{ advice.single_dose }}{{ advice.single_dose_unit }}</span>
  229. <span v-if="advice.parent_id == 0">{{ advice.delivery_way }}</span>
  230. <span v-if="advice.parent_id == 0">{{ advice.execution_frequency }}</span>
  231. <span v-if="advice.parent_id == 0 && advice.remark.length > 0">({{ advice.remark }})</span>
  232. </td>
  233. <td>
  234. <span v-if="setAdminUserES(advice.advice_doctor) == ''">
  235. {{
  236. getAdminUser(advice.advice_doctor)
  237. }}
  238. </span>
  239. <span
  240. v-else
  241. style="display:flex;align-items:center;justify-content:space-around;height:36px;"
  242. >
  243. <img style="height:30px;" :src="setAdminUserES(advice.advice_doctor)" alt srcset />
  244. </span>
  245. </td>
  246. <td>{{ getTime(advice.execution_time, "{y}-{m}-{d} {h}:{i}") }}</td>
  247. <td>
  248. <span v-if="setAdminUserES(advice.execution_staff) == ''">
  249. {{
  250. getAdminUser(advice.execution_staff)
  251. }}
  252. </span>
  253. <span
  254. v-else
  255. style="display:flex;align-items:center;justify-content:space-around;height:36px;"
  256. >
  257. <img style="height:30px;" :src="setAdminUserES(advice.execution_staff)" alt srcset />
  258. </span>
  259. </td>
  260. </tr>
  261. </table>
  262. <table class="print-table" border="1">
  263. <tbody>
  264. <tr>
  265. <td width="60">时间</td>
  266. <td width="80">BP</td>
  267. <td width="40">心率</td>
  268. <td width="60">血流速</td>
  269. <td width="60">静脉压</td>
  270. <td width="60">TMP</td>
  271. <td width="60">电导率</td>
  272. <td width="40">温度</td>
  273. <td width="60">透析液流量</td>
  274. <td width="60">UF/hr</td>
  275. <td width="100">症状处理</td>
  276. </tr>
  277. <tr v-for="monitor in monitors" :key="monitor.id">
  278. <td>&nbsp;
  279. {{getTime(monitor.operate_time,'{h}:{i}')}}
  280. </td>
  281. <td>&nbsp;{{monitor.systolic_blood_pressure?monitor.systolic_blood_pressure:''}} /
  282. {{monitor.diastolic_blood_pressure?monitor.diastolic_blood_pressure:''}}
  283. </td>
  284. <td>&nbsp;{{monitor.pulse_frequency?monitor.pulse_frequency:''}}</td>
  285. <td>&nbsp;{{monitor.blood_flow_volume?monitor.blood_flow_volume:''}}</td>
  286. <td>&nbsp;{{monitor.venous_pressure?monitor.venous_pressure:''}}</td>
  287. <td>&nbsp;{{monitor.transmembrane_pressure?monitor.transmembrane_pressure:''}}</td>
  288. <td>&nbsp;{{monitor.conductivity?monitor.conductivity:''}}</td>
  289. <td>&nbsp;{{monitor.dialysate_temperature ? monitor.dialysate_temperature : ''}}</td>
  290. <td>&nbsp;
  291. <span v-if="monitor.operate_time">
  292. {{ prescription.dialysate_flow ? prescription.dialysate_flow : "" }}
  293. </span>
  294. </td>
  295. <td>&nbsp;{{monitor.ultrafiltration_volume?monitor.ultrafiltration_volume:''}}</td>
  296. <td>
  297. <span v-if="monitor.symptom || monitor.dispose || monitor.result">
  298. {{ monitor.symptom + "," + monitor.dispose + "," + monitor.result }}
  299. </span>
  300. </td>
  301. </tr>
  302. </tbody>
  303. </table>
  304. <table class="print-table" border="1">
  305. <tbody>
  306. <tr>
  307. <td width="50" style="padding-left:5px;border:none;border-right:1px solid #000;">
  308. 透后评估
  309. </td>
  310. <td width="30" style="border:none;padding-left:5px;">
  311. 体温:
  312. </td>
  313. <td width="50" style="text-align:left;border:none;">
  314. <div>
  315. <span class="under_line" style="width:50px;display:inline-block;">
  316. {{ afterdialysis.temperature ? afterdialysis.temperature : "" }}
  317. </span>℃
  318. </div>
  319. </td>
  320. <!-- <td width="10" style="border:none;"></td> -->
  321. <td width="30" style="border:none;padding-left:5px;">血压:</td>
  322. <td width="100" style="text-align:left;border:none;line-height: 30px;">
  323. <div>
  324. <span class="under_line" style="width:100px;display:inline-block">
  325. {{ afterdialysis.systolic_blood_pressure ? afterdialysis.systolic_blood_pressure : "" }}/
  326. {{ afterdialysis.diastolic_blood_pressure ? afterdialysis.diastolic_blood_pressure : "" }}
  327. </span>mmHg
  328. </div>
  329. </td>
  330. <td width="30" style="border:none;padding-left:5px">脉搏:</td>
  331. <td width="50" style="text-align:left;border:none;">
  332. <div>
  333. <span class="under_line" style="width:50px;display:inline-block">
  334. {{ predialysis.pulse_frequency ? predialysis.pulse_frequency : "" }}
  335. </span>次/分
  336. </div>
  337. </td>
  338. <td width="50" style="border:none;padding-left:5px">透析器凝血:</td>
  339. <td width="120" style="text-align:left;border:none;">
  340. <label-box :isChecked="afterdialysis.cruor.indexOf('透析器-0度') > -1 ? true : false" showValue="0"></label-box>
  341. <label-box :isChecked="afterdialysis.cruor.indexOf('透析器-Ⅰ度') > -1 ? true : false" showValue="+"></label-box>
  342. <label-box :isChecked="afterdialysis.cruor.indexOf('透析器-Ⅱ度') > -1" showValue="+ +"></label-box>
  343. <label-box :isChecked="afterdialysis.cruor.indexOf('透析器-Ⅲ度') > -1 ? true : false" showValue="+ + +"></label-box>
  344. </td>
  345. </tr>
  346. </tbody>
  347. </table>
  348. <table class="print-table" border="1">
  349. <tr style="height:36px;text-align:left;border:none;">
  350. <td style="padding-left:5px;border:none">
  351. <p style="margin-bottom:60px">
  352. 透析小结:{{ summary.dialysis_summary ? summary.dialysis_summary : "" }}
  353. </p>
  354. </td>
  355. </tr>
  356. <tr style="height:40px">
  357. <td rowspan="11" style="border:none;text-align:right;height:40px">
  358. 记录者
  359. <span style="display: inline-block;width:100px;text-align: left;">
  360. <span v-if="orderForm.url === ''" style="display:flex;align-items:center;">{{ orderForm.start_nurse }}</span>
  361. <span v-if="orderForm.url !== ''" style="display:flex;align-items:center;height:36px;">
  362. <img :src="orderForm.url" style="height:30px;" />
  363. </span>
  364. </span>
  365. 校对护士
  366. <span style="display: inline-block;width:100px;text-align: left;">
  367. &nbsp;
  368. <span v-if="setAdminUserES(check == null ? 0 : check.modifier) == ''">
  369. {{ getAdminUser(check == null ? 0 : check.modifier) }}
  370. </span>
  371. <img style="height:30px;" :src="setAdminUserES(check == null ? 0 : check.modifier)" alt srcset v-else />
  372. </span>
  373. 医生签名
  374. <span style="display: inline-block;width:100px;text-align: left;">
  375. &nbsp;
  376. <span v-if="doctorForm.url === ''">{{ doctorForm.doctor }}</span>
  377. <span v-if="doctorForm.url !== ''">
  378. <img class="es-img" style="height:30px;" :src="doctorForm.url" />
  379. </span>
  380. </span>
  381. </td>
  382. </tr>
  383. </table>
  384. </div>
  385. </div>
  386. </template>
  387. <script>
  388. import { getDialysisRecord } from "@/api/dialysis";
  389. import { getDataConfig } from "@/utils/data";
  390. import { jsGetAge, uParseTime } from "@/utils/tools";
  391. import LabelBox from "../printItem/LabelBox";
  392. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  393. // import DialysisPrintOrderOne from './template/dialysisPrintOrderOne'
  394. // import DialysisPrintOrderTwo from './template/dialysisPrintOrderTwo'
  395. import print from "print-js";
  396. export default {
  397. name: "dialysisPrintOrderOne",
  398. components: {
  399. // DialysisPrintOrderOne,
  400. // DialysisPrintOrderTwo,
  401. LabelBox,
  402. BreadCrumb
  403. },
  404. data() {
  405. return {
  406. way_arr: [],
  407. consciousness_arr: [],
  408. appetite_arr: [],
  409. posture_arr: [],
  410. sick_condition_arr: [],
  411. precaution_arr: [],
  412. intake_arr: [],
  413. nutrition_arr: [],
  414. crumbs: [
  415. { path: false, name: "透析管理" },
  416. { path: false, name: "打印单" }
  417. ],
  418. operators: [],
  419. adminUser: [],
  420. check: {},
  421. dialysisOrder: {
  422. DeviceNumber: []
  423. },
  424. Order: {},
  425. operatorMaps: {},
  426. complications: [
  427. "低血压",
  428. "高血压",
  429. "心律失常",
  430. "头晕",
  431. "头痛",
  432. "呕吐",
  433. "抽搐",
  434. "出血",
  435. "心衰",
  436. "腹痛",
  437. "无"
  438. ],
  439. jilurow: 0,
  440. advice_jilurow: 0,
  441. loading: false,
  442. orgname: "",
  443. patientInfo_gender_1: false,
  444. patientInfo_gender_2: false,
  445. patientInfo_source_2: false,
  446. patientInfo_source_1: false,
  447. modeOptions: {},
  448. replacementWays: [],
  449. perfusionApparatus: [],
  450. anticoagulantsConfit: {},
  451. bloodAccessParOpera: {},
  452. dialysateFormulationOptions: {},
  453. queryParams: {
  454. xtdate: "",
  455. xtno: ""
  456. },
  457. patientInfo: {
  458. birth: "",
  459. age: "",
  460. DialysisSchedule: {
  461. device_number: { number: "" },
  462. device_zone: { name: "" }
  463. },
  464. gender: 0
  465. },
  466. predialysis: {
  467. score: "",
  468. internal_fistula: "",
  469. internal_fistula_skin: "",
  470. catheter: "",
  471. blood_access_part_opera_name: ""
  472. },
  473. afterdialysis: {
  474. complications_index: ""
  475. },
  476. prescription: {
  477. dialysate_formulation_name: "",
  478. device: {}
  479. },
  480. advices: [],
  481. users: [],
  482. monitors: [],
  483. summary: {},
  484. receiverTreatmentAccess: {},
  485. org_template_info: {},
  486. isShowZero: false,
  487. doctor_advices: [],
  488. advice_groups: [],
  489. AlPanel: {
  490. id: 0,
  491. name: "",
  492. type: 1,
  493. shouji: 2,
  494. weichi: 2,
  495. zongliang: 2,
  496. gaimingcheng: -1,
  497. gaijiliang: -1,
  498. shouji_unit: "mg",
  499. weichi_unit: "mg/h",
  500. zongliang_unit: "mg",
  501. gaimingcheng_unit: "",
  502. gaijiliang_unit: ""
  503. },
  504. total: "",
  505. doctorForm: {
  506. doctor: "",
  507. url: ""
  508. },
  509. dialysisDoctor: {
  510. doctor: "",
  511. url: ""
  512. },
  513. tableAdvice: [],
  514. assessmentafter: {},
  515. orderForm: {
  516. start_nurse: "",
  517. url: ""
  518. },
  519. finshForm: {
  520. finish_nurse: "",
  521. url: ""
  522. },
  523. displaceLiquiPartOptions: []
  524. };
  525. },
  526. methods: {
  527. getDisplaceLiquiPart: function(val) {
  528. let displace_liqui_part_name = "/";
  529. const displace_liqui_part = this.displaceLiquiPartOptions;
  530. for (let i = 0; i < displace_liqui_part.length; i++) {
  531. if (displace_liqui_part[i].id == val) {
  532. displace_liqui_part_name = displace_liqui_part[i].name;
  533. }
  534. }
  535. return displace_liqui_part_name;
  536. },
  537. getAdminUser(id) {
  538. if (id == 0) {
  539. return "";
  540. }
  541. if (id == undefined) {
  542. return "";
  543. }
  544. for (let i = 0; i < this.adminUser.length; i++) {
  545. if (this.adminUser[i].id == id) {
  546. return this.adminUser[i].name;
  547. }
  548. }
  549. },
  550. getTime(value, temp) {
  551. if (value == 0) {
  552. return "";
  553. }
  554. if (value != undefined) {
  555. return uParseTime(value, temp);
  556. }
  557. return "";
  558. },
  559. printThisPage() {
  560. var ptime = Math.round(new Date().getTime() / 1000);
  561. this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
  562. const style =
  563. '@media print {.dialysis-print-order{width:960px;margin:0 auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px}.dialysis-print-order .table-box{width:100%;line-height:23px;font-size:14px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px}.dialysis-print-order .print-table-no{width:100%;text-align:left;border-collapse:collapse;font-size:14px} .dialysis-print-order .under_line {display: inline-block;border-bottom: 1px solid #999;text-align:left;white-space: nowrap;width: 50%;} .dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;} .print-template-two tr {line-height: 30px;} .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;} .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}';
  564. if (this.org_template_info.template_id == 1) {
  565. printJS({
  566. printable: "dialysis-print-box",
  567. type: "html",
  568. style: style,
  569. scanStyles: false
  570. });
  571. } else if (
  572. this.org_template_info.template_id == 2 ||
  573. this.org_template_info.template_id == 0
  574. ) {
  575. printJS({
  576. printable: "dialysis-print-box-1",
  577. type: "html",
  578. style: style,
  579. scanStyles: false
  580. });
  581. }
  582. },
  583. getNumber() {
  584. if (this.dialysisOrder != null) {
  585. return (
  586. this.patientInfo.DialysisSchedule.device_zone.name +
  587. this.dialysisOrder.DeviceNumber.number
  588. );
  589. } else {
  590. return (
  591. this.patientInfo.DialysisSchedule.device_zone.name +
  592. this.patientInfo.DialysisSchedule.device_number.number
  593. );
  594. }
  595. },
  596. getXuserName(id) {
  597. if (id <= 0) {
  598. return "";
  599. }
  600. var name = "";
  601. if (this.users == null || typeof this.users.length === "undefined") {
  602. return name;
  603. }
  604. var leng = this.users.length;
  605. if (leng == 0) {
  606. return name;
  607. }
  608. for (let index = 0; index < leng; index++) {
  609. if (this.users[index].id == id) {
  610. name = this.users[index].name;
  611. break;
  612. }
  613. }
  614. return name;
  615. },
  616. setAdminUserES(id) {
  617. if (id == 0) {
  618. return "";
  619. }
  620. if (id in this.operatorMaps) {
  621. return this.operatorMaps[id].url;
  622. } else {
  623. return "";
  624. }
  625. },
  626. modeName(mode_id) {
  627. return typeof this.modeOptions[mode_id] !== "undefined" &&
  628. typeof this.modeOptions[mode_id].name !== "undefined"
  629. ? this.modeOptions[mode_id].name
  630. : "";
  631. },
  632. getDialysisRecord() {
  633. this.loading = true;
  634. getDialysisRecord(this.queryParams).then(response => {
  635. if (response.data.state === 1) {
  636. this.total = response.data.data.total;
  637. this.adminUser = response.data.data.users;
  638. this.users = response.data.data.users;
  639. var patientInfo = response.data.data.patientInfo;
  640. console.log("烧腊店就拉萨讲道理看", patientInfo);
  641. if (patientInfo.gender === 1) {
  642. patientInfo.gender = "男";
  643. }
  644. if (patientInfo.gender === 2) {
  645. patientInfo.gender = "女";
  646. }
  647. console.log("patientInfo", patientInfo);
  648. this.patientInfo = patientInfo;
  649. this.patientInfo.birth = uParseTime(
  650. this.patientInfo.birthday,
  651. "{y}-{m}-{d}"
  652. );
  653. // this.patientInfo.age = jsGetAge(this.patientInfo.birth, '-')
  654. if (response.data.data.patientInfo.first_dialysis_date != 0) {
  655. this.patientInfo.first_dialysis_date = uParseTime(
  656. response.data.data.patientInfo.first_dialysis_date,
  657. "{y}-{m}-{d}"
  658. );
  659. } else {
  660. this.patientInfo.first_dialysis_date = "";
  661. }
  662. this.check = response.data.data.check;
  663. console.log("核对信息", this.check);
  664. this.predialysis = response.data.data.PredialysisEvaluation;
  665. console.log("透前评估", this.predialysis);
  666. this.predialysis.blood_access_part_opera_name = this.bloodAccessParOperaName(
  667. this.predialysis.blood_access_part_opera_id
  668. );
  669. this.assessmentafter = response.data.data.assessmentAfterDislysis;
  670. console.log("上次透后体重", this.assessmentafter);
  671. var doctorAdevieInfo = response.data.data.doctorAdevieInfo;
  672. var tableAdvice = doctorAdevieInfo;
  673. console.log("医生", tableAdvice);
  674. if (tableAdvice.length === 0) {
  675. var obj = { advice_name: "", start_time: "" };
  676. var obj1 = { advice_name: "", start_time: "" };
  677. var obj2 = { advice_name: "", start_time: "" };
  678. var obj3 = { advice_name: "", start_time: "" };
  679. var obj4 = { advice_name: "", start_time: "" };
  680. var obj5 = { advice_name: "", start_time: "" };
  681. tableAdvice.push(obj);
  682. tableAdvice.push(obj1);
  683. tableAdvice.push(obj2);
  684. tableAdvice.push(obj3);
  685. tableAdvice.push(obj4);
  686. tableAdvice.push(obj5);
  687. this.tableAdvice = tableAdvice;
  688. }
  689. if (tableAdvice.length === 1) {
  690. var obj = { advice_name: "", start_time: "" };
  691. var obj1 = { advice_name: "", start_time: "" };
  692. var obj2 = { advice_name: "", start_time: "" };
  693. var obj3 = { advice_name: "", start_time: "" };
  694. var obj4 = { advice_name: "", start_time: "" };
  695. tableAdvice.push(obj);
  696. tableAdvice.push(obj1);
  697. tableAdvice.push(obj2);
  698. tableAdvice.push(obj3);
  699. tableAdvice.push(obj4);
  700. this.tableAdvice = tableAdvice;
  701. }
  702. if (tableAdvice.length === 2) {
  703. var obj = { advice_name: "", start_time: "" };
  704. var obj1 = { advice_name: "", start_time: "" };
  705. var obj2 = { advice_name: "", start_time: "" };
  706. var obj3 = { advice_name: "", start_time: "" };
  707. tableAdvice.push(obj);
  708. tableAdvice.push(obj1);
  709. tableAdvice.push(obj2);
  710. tableAdvice.push(obj3);
  711. this.tableAdvice = tableAdvice;
  712. }
  713. if (tableAdvice.length === 3) {
  714. // eslint-disable-next-line no-redeclare
  715. var obj = { advice_name: "", start_time: "" };
  716. // eslint-disable-next-line no-redeclare
  717. var obj1 = { advice_name: "", start_time: "" };
  718. // eslint-disable-next-line no-redeclare
  719. var obj2 = { advice_name: "", start_time: "" };
  720. // eslint-disable-next-line no-redeclare
  721. tableAdvice.push(obj);
  722. tableAdvice.push(obj1);
  723. tableAdvice.push(obj2);
  724. this.tableAdvice = tableAdvice;
  725. }
  726. if (tableAdvice.length === 4) {
  727. // eslint-disable-next-line no-redeclare
  728. var obj = { advice_name: "", start_time: "" };
  729. // eslint-disable-next-line no-redeclare
  730. var obj1 = { advice_name: "", start_time: "" };
  731. // eslint-disable-next-line no-redeclare
  732. tableAdvice.push(obj);
  733. tableAdvice.push(obj1);
  734. this.tableAdvice = tableAdvice;
  735. }
  736. if (tableAdvice.length === 5) {
  737. // eslint-disable-next-line no-redeclare
  738. var obj = { advice_name: "", start_time: "" };
  739. // eslint-disable-next-line no-redeclare
  740. var obj1 = { advice_name: "", start_time: "" };
  741. tableAdvice.push(obj);
  742. tableAdvice.push(obj1);
  743. this.tableAdvice = tableAdvice;
  744. }
  745. if (tableAdvice.length >= 6) {
  746. this.tableAdvice = tableAdvice;
  747. }
  748. this.afterdialysis = response.data.data.AssessmentAfterDislysis;
  749. console.log("透后评估", this.afterdialysis);
  750. this.operators = response.data.data.operators;
  751. this.dialysisOrder =
  752. response.data.data.dialysisOrder === null
  753. ? null
  754. : response.data.data.dialysisOrder;
  755. console.log(111,this.dialysisOrder)
  756. if (this.operators.length > 0) {
  757. var operatorsLen = this.operators.length;
  758. for (var index = 0; index < operatorsLen; index++) {
  759. this.$set(
  760. this.operatorMaps,
  761. this.operators[index].creator,
  762. this.operators[index]
  763. );
  764. }
  765. }
  766. this.afterdialysis.txqnx = -1;
  767. if (this.afterdialysis.cruor.indexOf("0度") > -1) {
  768. this.afterdialysis.txqnx = 0;
  769. }
  770. if (this.afterdialysis.cruor.indexOf("Ⅰ度") > -1) {
  771. this.afterdialysis.txqnx = 1;
  772. }
  773. if (this.afterdialysis.cruor.indexOf("Ⅱ度") > -1) {
  774. this.afterdialysis.txqnx = 2;
  775. }
  776. if (this.afterdialysis.cruor.indexOf("Ⅲ度") > -1) {
  777. this.afterdialysis.txqnx = 3;
  778. }
  779. this.afterdialysis.complications = this.afterdialysis.complication.split(
  780. ","
  781. );
  782. this.afterdialysis.complications_other = [];
  783. this.afterdialysis.complications_index = [];
  784. var acllen = this.afterdialysis.complications.length;
  785. for (let index = 0; index < acllen; index++) {
  786. if (
  787. this.complications.indexOf(
  788. this.afterdialysis.complications[index]
  789. ) >= 0
  790. ) {
  791. this.afterdialysis.complications_index.push(
  792. this.afterdialysis.complications[index]
  793. );
  794. } else if (
  795. this.complications.indexOf(
  796. this.afterdialysis.complications[index]
  797. ) < 0 &&
  798. this.afterdialysis.complications_other.indexOf(
  799. this.afterdialysis.complications[index]
  800. ) < 0
  801. ) {
  802. this.afterdialysis.complications_other.push(
  803. this.afterdialysis.complications[index]
  804. );
  805. }
  806. }
  807. this.afterdialysis.complications_other = this.afterdialysis.complications_other.join(
  808. ","
  809. );
  810. var doctorname = response.data.data.DoctorName;
  811. //console.log("医师签名", doctorname);
  812. this.doctorForm.doctor = doctorname.user_name;
  813. this.doctorForm.url = doctorname.url;
  814. var prescription = response.data.data.dialysisPrescription;
  815. console.log("透析处方", prescription);
  816. if (prescription.anticoagulant == 6) {
  817. prescription.anticoagulant = "低分子肝素钙";
  818. }
  819. if (prescription.anticoagulant == 7) {
  820. prescription.anticoagulant = "低分子肝素钠";
  821. }
  822. if (prescription.blood_access === 1) {
  823. prescription.blood_access = "正常";
  824. }
  825. if (prescription.blood_access === 2) {
  826. prescription.blood_access = "震颤";
  827. }
  828. if (prescription.blood_access === 3) {
  829. prescription.blood_access = "堵塞";
  830. }
  831. if (prescription.blood_access === 4) {
  832. prescription.blood_access = "血肿";
  833. }
  834. if (prescription.blood_access === 5) {
  835. prescription.blood_access = "淤血";
  836. }
  837. if (prescription.blood_access === 6) {
  838. prescription.blood_access = "感染";
  839. }
  840. if (prescription.blood_access === 7) {
  841. prescription.blood_access = "自体内瘘";
  842. }
  843. if (prescription.blood_access === 8) {
  844. prescription.blood_access = "人工血管内瘘";
  845. }
  846. if (prescription.replacement_way === 1) {
  847. prescription.replacement_way = "前置换";
  848. }
  849. if (prescription.replacement_way === 2) {
  850. prescription.replacement_way = "后置换";
  851. }
  852. if (prescription.replacement_way === 3) {
  853. prescription.replacement_way = "中置换";
  854. }
  855. if (prescription.replacement_way === 4) {
  856. prescription.replacement_way = "混合置换";
  857. }
  858. if (prescription.anticoagulant === 1) {
  859. prescription.anticoagulant = "无肝素";
  860. }
  861. if (prescription.anticoagulant === 2) {
  862. prescription.anticoagulant = "普通肝素";
  863. }
  864. if (prescription.anticoagulant === 3) {
  865. prescription.anticoagulant = "低分子肝素";
  866. }
  867. if (prescription.anticoagulant === 4) {
  868. prescription.anticoagulant = "阿加曲班";
  869. }
  870. if (prescription.anticoagulant === 5) {
  871. prescription.anticoagulant = "枸橼酸钠";
  872. }
  873. this.prescription = prescription;
  874. var receiverTreatmentAccess =
  875. response.data.data.receiverTreatmentAccess;
  876. if (receiverTreatmentAccess.sick_condition === 1) {
  877. receiverTreatmentAccess.sick_condition = "一般";
  878. }
  879. if (receiverTreatmentAccess.sick_condition === 2) {
  880. receiverTreatmentAccess.sick_condition = "严重";
  881. }
  882. if (receiverTreatmentAccess.sick_condition === 3) {
  883. receiverTreatmentAccess.sick_condition = "危";
  884. }
  885. if (receiverTreatmentAccess.way === 1) {
  886. receiverTreatmentAccess.way = "步行";
  887. }
  888. if (receiverTreatmentAccess.way === 2) {
  889. receiverTreatmentAccess.way = "扶行";
  890. }
  891. if (receiverTreatmentAccess.way === 3) {
  892. receiverTreatmentAccess.way = "轮椅";
  893. }
  894. if (receiverTreatmentAccess.way === 4) {
  895. receiverTreatmentAccess.way = "平车";
  896. }
  897. console.log("接诊评估:", receiverTreatmentAccess);
  898. this.receiverTreatmentAccess = receiverTreatmentAccess;
  899. this.prescription.mode = this.modeName(this.prescription.mode_id);
  900. var rwLen = this.replacementWays.length;
  901. this.prescription.replacement = "";
  902. for (let index = 0; index < rwLen; index++) {
  903. if (
  904. this.replacementWays[index].id ==
  905. this.prescription.replacement_way
  906. ) {
  907. this.prescription.replacement = this.replacementWays[index].name;
  908. break;
  909. }
  910. }
  911. this.prescription.dialysate_formulation_name = this.dialysateFormulationName(
  912. this.prescription.dialysate_formulation
  913. );
  914. var paLen = this.perfusionApparatus.length;
  915. this.prescription.perfusion_apparatus_name = "";
  916. for (let index = 0; index < paLen; index++) {
  917. if (
  918. this.perfusionApparatus[index].id ==
  919. this.prescription.perfusion_apparatus
  920. ) {
  921. this.prescription.perfusion_apparatus_name = this.perfusionApparatus[
  922. index
  923. ].name;
  924. break;
  925. }
  926. }
  927. var acLen = this.anticoagulantsConfit.length;
  928. var thisALID = this.prescription.anticoagulant;
  929. this.prescription.anticoagulant_name = "";
  930. if (
  931. typeof this.anticoagulantsConfit[thisALID] !== "undefined" &&
  932. this.anticoagulantsConfit[thisALID] != null
  933. ) {
  934. this.prescription.anticoagulant_name = this.anticoagulantsConfit[
  935. thisALID
  936. ].name;
  937. this.AlPanel = this.anticoagulantsConfit[thisALID];
  938. }
  939. this.advices = response.data.data.advices;
  940. this.monitors = response.data.data.monitors;
  941. console.log("透析监测", this.monitors);
  942. this.summary = response.data.data.summary;
  943. this.Order = response.data.data.order;
  944. var start_nurse = response.data.data.startNuse;
  945. // console.log('上机护士', start_nurse)
  946. this.orderForm.start_nurse = start_nurse.user_name;
  947. this.orderForm.url = start_nurse.url;
  948. var finish_nurse = response.data.data.FinishNuse;
  949. // console.log('下机护士', finish_nurse)
  950. this.finshForm.url = finish_nurse.url;
  951. this.finshForm.finish_nurse = finish_nurse.user_name;
  952. var dialysisdoctor = response.data.data.dialysisdocotr;
  953. //this.dialysisDoctor.doctor = dialysisdoctor.user_name;
  954. // this.dialysisDoctor.url = dialysisdoctor.url;
  955. this.org_template_info = response.data.data.org_template_info;
  956. // 配置超滤量和置换量是否要显示0还是空
  957. if (this.org_template_info.org_id == 9535) {
  958. this.isShowZero = true;
  959. }
  960. if (this.monitors.length < 7) {
  961. var nl = 8 - this.monitors.length;
  962. for (let index = 0; index < nl; index++) {
  963. this.monitors.push([]);
  964. }
  965. }
  966. this.jilurow = this.monitors.length + 1;
  967. this.advice_jilurow = this.advices.length + 1;
  968. var childMap = {};
  969. for (const index in this.advices) {
  970. if (this.advices[index].parent_id == 0) {
  971. continue;
  972. }
  973. if (!(this.advices[index].parent_id in childMap)) {
  974. childMap[this.advices[index].parent_id] = [];
  975. }
  976. childMap[this.advices[index].parent_id].push(this.advices[index]);
  977. }
  978. var advices = [];
  979. for (const index in this.advices) {
  980. if (this.advices[index].parent_id > 0) {
  981. continue;
  982. }
  983. var item = this.advices[index];
  984. if (item.id in childMap) {
  985. item.children = childMap[item.id];
  986. } else {
  987. item.children = [];
  988. }
  989. advices.push(item);
  990. }
  991. var leftAdvice = [];
  992. var rightAdvice = [];
  993. var adlen = advices.length;
  994. var halfLen = adlen % 2 == 0 ? adlen / 2 : (adlen + 1) / 2;
  995. for (var i = 0; i < halfLen; i++) {
  996. leftAdvice.push(advices[i]);
  997. rightAdvice.push(advices[i + halfLen]);
  998. }
  999. if (halfLen < 5) {
  1000. var nl = 5 - leftAdvice.length;
  1001. for (let index = 0; index < nl; index++) {
  1002. leftAdvice.push([]);
  1003. }
  1004. var nl = 5 - rightAdvice.length;
  1005. for (let index = 0; index < nl; index++) {
  1006. rightAdvice.push([]);
  1007. }
  1008. }
  1009. this.advices = [];
  1010. for (var i = 0; i < halfLen; i++) {
  1011. var item = [];
  1012. item.push(leftAdvice[i]);
  1013. item.push(rightAdvice[i]);
  1014. this.advices.push(item);
  1015. }
  1016. this.loading = false;
  1017. this.doctor_advices =
  1018. response.data.data.advices == null
  1019. ? []
  1020. : response.data.data.advices;
  1021. for (let index = 0; index < this.doctor_advices.length; index++) {
  1022. this.doctor_advices[index]["isShow"] = 2;
  1023. }
  1024. if (this.doctor_advices.length > 0) {
  1025. var group = this.newAdviceGroupObject();
  1026. var initGroupBlock = function(group, advice) {
  1027. group.group_no = advice.groupno;
  1028. };
  1029. for (
  1030. let index = this.doctor_advices.length - 1;
  1031. index >= 0;
  1032. index--
  1033. ) {
  1034. var new_advice_index = 0;
  1035. if (
  1036. "children" in this.doctor_advices[index] &&
  1037. this.doctor_advices[index].children.length > 0
  1038. ) {
  1039. new_advice_index =
  1040. index + this.doctor_advices[index].children.length + 1;
  1041. var doctor_advice = {
  1042. delivery_way: this.doctor_advices[index].delivery_way,
  1043. execution_frequency: this.doctor_advices[index]
  1044. .execution_frequency,
  1045. groupno: this.doctor_advices[index].groupno,
  1046. id: this.doctor_advices[index].id,
  1047. parent_id: this.doctor_advices[index].parent_id,
  1048. children: this.doctor_advices[index].children,
  1049. remark: this.doctor_advices[index].remark
  1050. };
  1051. doctor_advice["isShow"] = 1;
  1052. this.doctor_advices.splice(new_advice_index, 0, doctor_advice);
  1053. // this.doctor_advices.push(doctor_advice)
  1054. }
  1055. }
  1056. for (let index = 0; index < this.doctor_advices.length; index++) {
  1057. const advice = this.doctor_advices[index];
  1058. if (advice.groupno == 0) {
  1059. // 老版本的医嘱没有分组的概念,所以这一个 if 是解决这个问题的,将每个无分组的医嘱各自归为一组
  1060. if (advice.parent_id > 0) {
  1061. if (this.advice_groups.length > 0) {
  1062. var parent_group = this.advice_groups[
  1063. this.advice_groups.length - 1
  1064. ];
  1065. if (parent_group.advices.length > 0) {
  1066. if (parent_group.advices[0].id == advice.parent_id) {
  1067. parent_group.advices.push(advice);
  1068. }
  1069. }
  1070. }
  1071. continue;
  1072. } else {
  1073. if (group.group_no > 0) {
  1074. this.advice_groups.push(group);
  1075. group = this.newAdviceGroupObject();
  1076. }
  1077. initGroupBlock(group, advice);
  1078. group.advices.push(advice);
  1079. this.advice_groups.push(group);
  1080. group = this.newAdviceGroupObject();
  1081. continue;
  1082. }
  1083. }
  1084. if (group.group_no > 0 && group.group_no != advice.groupno) {
  1085. this.advice_groups.push(group);
  1086. group = this.newAdviceGroupObject();
  1087. }
  1088. if (group.group_no == 0) {
  1089. initGroupBlock(group, advice);
  1090. }
  1091. if (group.group_no == advice.groupno) {
  1092. group.advices.push(advice);
  1093. }
  1094. }
  1095. if (group.group_no > 0) {
  1096. // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
  1097. this.advice_groups.push(group);
  1098. }
  1099. }
  1100. console.log(this.advice_groups);
  1101. } else {
  1102. this.loading = false;
  1103. this.$message.error("请求数据失败");
  1104. return false;
  1105. }
  1106. });
  1107. },
  1108. bloodAccessParOperaName(id) {
  1109. if (id in this.bloodAccessParOpera) {
  1110. return this.bloodAccessParOpera[id].name;
  1111. }
  1112. return "";
  1113. },
  1114. dialysateFormulationName(id) {
  1115. if (id in this.dialysateFormulationOptions) {
  1116. return this.dialysateFormulationOptions[id].name;
  1117. }
  1118. return "";
  1119. },
  1120. getAge: function(val) {
  1121. if (val.birthday != 0) {
  1122. return jsGetAge(val.birth, "-");
  1123. }
  1124. return "";
  1125. },
  1126. checkIdCardNo(val) {
  1127. var thisLen = val.length;
  1128. var birth = "";
  1129. if (thisLen == 15) {
  1130. birth = "19" + val.substr(6, 6);
  1131. } else {
  1132. birth = val.substr(6, 8);
  1133. }
  1134. var birthTwo =
  1135. birth.substr(0, 4) +
  1136. "-" +
  1137. birth.substr(4, 2) +
  1138. "-" +
  1139. birth.substr(6, 2);
  1140. var age = jsGetAge(birthTwo, "-");
  1141. return age;
  1142. },
  1143. newAdviceGroupObject: function() {
  1144. return Object.assign(
  1145. {},
  1146. {
  1147. group_no: 0,
  1148. // advice_doctor: 0,
  1149. // start_time: 0,
  1150. advices: []
  1151. // exec_staff: 0,
  1152. // exec_time: 0,
  1153. // checker: 0,
  1154. }
  1155. );
  1156. }
  1157. },
  1158. watch: {
  1159. "patientInfo.gender": function() {
  1160. if (this.patientInfo.gender == 1) {
  1161. this.patientInfo_gender_1 = true;
  1162. this.patientInfo_gender_2 = false;
  1163. } else if (this.patientInfo.gender == 2) {
  1164. this.patientInfo_gender_2 = true;
  1165. this.patientInfo_gender_1 = false;
  1166. } else {
  1167. this.patientInfo_gender_2 = false;
  1168. this.patientInfo_gender_1 = false;
  1169. }
  1170. },
  1171. "patientInfo.source": function() {
  1172. if (this.patientInfo.source == 1) {
  1173. this.patientInfo_source_1 = true;
  1174. this.patientInfo_source_2 = false;
  1175. } else if (this.patientInfo.source == 2) {
  1176. this.patientInfo_source_2 = true;
  1177. this.patientInfo_source_1 = false;
  1178. } else {
  1179. this.patientInfo_source_2 = false;
  1180. this.patientInfo_source_1 = false;
  1181. }
  1182. }
  1183. },
  1184. created() {
  1185. var xtuser = this.$store.getters.xt_user;
  1186. this.orgname = xtuser.org.org_name;
  1187. // this.orgname = "遂溪方济医院";
  1188. this.modeOptions = this.$store.getters.treatment_mode;
  1189. this.replacementWays = this.$store.getters.replacement_ways;
  1190. this.perfusionApparatus = this.$store.getters.perfusion_apparatus;
  1191. this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit;
  1192. this.way_arr = getDataConfig("hemodialysis", "way");
  1193. this.consciousness_arr = getDataConfig("hemodialysis", "consciousness");
  1194. this.appetite_arr = getDataConfig("hemodialysis", "appetite");
  1195. this.posture_arr = getDataConfig("hemodialysis", "posture");
  1196. this.sick_condition_arr = getDataConfig("hemodialysis", "sick_condition");
  1197. this.precaution_arr = getDataConfig("hemodialysis", "precaution");
  1198. this.intake_arr = getDataConfig("hemodialysis", "intake");
  1199. this.nutrition_arr = getDataConfig("hemodialysis", "nutrition");
  1200. this.displaceLiquiPartOptions = this.$store.getters.displace_liqui;
  1201. // this.bloodAccessParOpera = getDataConfig('hemodialysis', 'vascular_access_desc')
  1202. var bloodAccessParOpera = getDataConfig(
  1203. "hemodialysis",
  1204. "vascular_access_desc"
  1205. );
  1206. for (var key in bloodAccessParOpera) {
  1207. this.bloodAccessParOpera[bloodAccessParOpera[key].id] =
  1208. bloodAccessParOpera[key];
  1209. }
  1210. var dialysateFormulationOptions = getDataConfig(
  1211. "hemodialysis",
  1212. "dialysate_formulation"
  1213. );
  1214. for (var key in dialysateFormulationOptions) {
  1215. this.dialysateFormulationOptions[dialysateFormulationOptions[key].id] =
  1216. dialysateFormulationOptions[key];
  1217. }
  1218. const xtdate = this.$route.query && this.$route.query.xtdate;
  1219. const xtno = this.$route.query && this.$route.query.xtno;
  1220. if (
  1221. typeof xtdate === "string" &&
  1222. xtdate.length > 0 &&
  1223. typeof xtno === "string" &&
  1224. xtno.length > 0
  1225. ) {
  1226. this.queryParams.xtdate = xtdate;
  1227. this.queryParams.xtno = xtno;
  1228. this.getDialysisRecord();
  1229. } else {
  1230. this.$message.error("参数不齐");
  1231. return false;
  1232. }
  1233. }
  1234. };
  1235. </script>
  1236. <style>
  1237. .print_page_main_content {
  1238. background-color: white;
  1239. width: 960px;
  1240. margin: 0 auto 50px;
  1241. padding: 0 0 0 0;
  1242. page-break-after: always;
  1243. }
  1244. .print_page_main_content .order-yy-name {
  1245. margin: auto;
  1246. text-align: center;
  1247. font-size: 20px;
  1248. letter-spacing: 5px;
  1249. }
  1250. .dialysis-print-order .order-title {
  1251. margin: auto;
  1252. font-weight: 600;
  1253. text-align: center;
  1254. font-size: 22px;
  1255. padding: 10px;
  1256. }
  1257. .print_page_main_content .order_title {
  1258. text-align: center;
  1259. font-size: 23px;
  1260. line-height: 50px;
  1261. font-weight: 500;
  1262. }
  1263. .row {
  1264. font-size: 14px;
  1265. line-height: 20px;
  1266. padding: 5px 0;
  1267. }
  1268. .inline_block {
  1269. display: inline-block;
  1270. }
  1271. .under_line_two {
  1272. display: inline-block;
  1273. border-bottom: 1px solid #999;
  1274. text-align: left;
  1275. white-space: nowrap;
  1276. width: 50%;
  1277. }
  1278. .under_line_two::before {
  1279. content: "\00A0";
  1280. }
  1281. .under_line_two::after {
  1282. content: "\00A0";
  1283. }
  1284. .under_line {
  1285. display: inline-block;
  1286. border-bottom: 1px solid #999;
  1287. text-align: center;
  1288. white-space: nowrap;
  1289. width: 50%;
  1290. }
  1291. .under_line::before {
  1292. content: "\00A0";
  1293. }
  1294. .under_line::after {
  1295. content: "\00A0";
  1296. }
  1297. .flex {
  1298. display: -webkit-box;
  1299. display: -moz-box;
  1300. display: -ms-flexbox;
  1301. display: -webkit-flex;
  1302. display: flex;
  1303. align-items: center;
  1304. -webkit-align-items: center;
  1305. box-align: center;
  1306. -moz-box-align: center;
  1307. -webkit-box-align: center;
  1308. text-align: center;
  1309. -webkit-justify-content: space-between;
  1310. justify-content: space-between;
  1311. -moz-box-pack: space-between;
  1312. -webkit--moz-box-pack: space-between;
  1313. box-pack: space-between;
  1314. }
  1315. .print_page_main_content .proj_table {
  1316. width: 100%;
  1317. border: 1px solid;
  1318. border-collapse: collapse;
  1319. padding: 2px;
  1320. }
  1321. .print_page_main_content .proj_table tbody tr td {
  1322. border: 1px solid;
  1323. /* text-align: center; */
  1324. font-size: 16px;
  1325. padding: 5px 8px;
  1326. line-height: 30px;
  1327. }
  1328. .print_page_main_content .proj_table .inside_table {
  1329. width: 100%;
  1330. border: hidden; /* 解决边框冲突 */
  1331. border-collapse: collapse;
  1332. }
  1333. .print_page_main_content .proj_table .inside_table tr td {
  1334. border: 1px solid;
  1335. text-align: center;
  1336. font-size: 14px;
  1337. padding: 6px 5px;
  1338. line-height: 16px;
  1339. }
  1340. .print-table-no {
  1341. width: 100%;
  1342. text-align: center;
  1343. border-collapse: collapse;
  1344. font-size: 14px;
  1345. }
  1346. .es-img {
  1347. height: 20px;
  1348. }
  1349. .advice-name {
  1350. text-align: left !important;
  1351. line-height: 16px !important;
  1352. }
  1353. .advice-children {
  1354. display: flex;
  1355. }
  1356. .margin-bottom-50 {
  1357. }
  1358. .margin-bottom-300 {
  1359. margin-bottom: 450px;
  1360. }
  1361. .margin-bottom-600 {
  1362. margin-bottom: 600px;
  1363. }
  1364. .margin-bottom-900 {
  1365. margin-bottom: 900px;
  1366. }
  1367. .print-yema {
  1368. position: absolute;
  1369. left: 50%;
  1370. }
  1371. .print-yema2 {
  1372. position: absolute;
  1373. left: 50%;
  1374. }
  1375. .print-yema3 {
  1376. position: absolute;
  1377. left: 50%;
  1378. }
  1379. .print-yema4 {
  1380. position: absolute;
  1381. left: 50%;
  1382. }
  1383. .check_box_panel .did_checke::after {
  1384. font-size: 8px;
  1385. margin-left: 2px;
  1386. margin-top: 2px;
  1387. position: absolute;
  1388. }
  1389. </style>