血透系统PC前端

dialysisPrintOrder.vue 56KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs="crumbs"></bread-crumb>
  5. <template v-if="org_template_info.template_id == 1">
  6. <el-button
  7. :loading="loading"
  8. size="small"
  9. icon="el-icon-printer"
  10. @click="printThisPage"
  11. type="primary"
  12. >打印</el-button
  13. >
  14. </template>
  15. <template
  16. v-if="
  17. org_template_info.template_id == 2 ||
  18. org_template_info.template_id == 0
  19. "
  20. >
  21. <div>
  22. <el-button
  23. :loading="loading"
  24. size="small"
  25. icon="el-icon-printer"
  26. @click="printThisPage"
  27. type="primary"
  28. >打印全部</el-button
  29. >
  30. <el-button
  31. :loading="loading"
  32. size="small"
  33. icon="el-icon-printer"
  34. @click="printThisOnePage"
  35. type="primary"
  36. >打印纪录单</el-button
  37. >
  38. <el-button
  39. :loading="loading"
  40. size="small"
  41. icon="el-icon-printer"
  42. @click="printThisTwoPage"
  43. type="primary"
  44. >打印医嘱单</el-button
  45. >
  46. </div>
  47. </template>
  48. <template v-if="org_template_info.template_id == 3">
  49. <el-button
  50. :loading="loading"
  51. size="small"
  52. icon="el-icon-printer"
  53. @click="printThisPage"
  54. type="primary"
  55. >打印</el-button
  56. >
  57. </template>
  58. <template v-if="org_template_info.template_id == 4">
  59. <el-button
  60. :loading="loading"
  61. size="small"
  62. icon="el-icon-printer"
  63. @click="printThisPage"
  64. type="primary"
  65. >打印</el-button
  66. >
  67. </template>
  68. <template v-if="org_template_info.template_id == 5">
  69. <div>
  70. <el-button
  71. :loading="loading"
  72. size="small"
  73. icon="el-icon-printer"
  74. @click="printThisPage"
  75. type="primary"
  76. >打印全部</el-button
  77. >
  78. <el-button
  79. :loading="loading"
  80. size="small"
  81. icon="el-icon-printer"
  82. @click="printThisOnePage"
  83. type="primary"
  84. >打印纪录单</el-button
  85. >
  86. <el-button
  87. :loading="loading"
  88. size="small"
  89. icon="el-icon-printer"
  90. @click="printThisTwoPage"
  91. type="primary"
  92. >打印医嘱单</el-button
  93. >
  94. </div>
  95. </template>
  96. <template v-if="org_template_info.template_id == 6">
  97. <el-button
  98. :loading="loading"
  99. size="small"
  100. icon="el-icon-printer"
  101. @click="printThisPage"
  102. type="primary"
  103. >打印</el-button
  104. >
  105. </template>
  106. <template v-if="org_template_info.template_id == 7">
  107. <el-button
  108. :loading="loading"
  109. size="small"
  110. icon="el-icon-printer"
  111. @click="printThisPage"
  112. type="primary"
  113. >打印</el-button
  114. >
  115. </template>
  116. <template v-if="org_template_info.template_id == 8">
  117. <el-button
  118. :loading="loading"
  119. size="small"
  120. icon="el-icon-printer"
  121. @click="printThisPage"
  122. type="primary"
  123. >打印</el-button
  124. >
  125. </template>
  126. </div>
  127. <div class="app-container ">
  128. <!--<div class="order-print-btn"-->
  129. <!--v-loading="loading"-->
  130. <!--element-loading-text="加载中"-->
  131. <!--element-loading-spinner="el-icon-loading"-->
  132. <!--element-loading-background="rgba(0, 0, 0, 0.8)"-->
  133. <!--style="width: 100%;">-->
  134. <!--</div>-->
  135. <!--<dialysis-print-order-two :patientInfo="patientInfo" :receiverTreatmentAccess="receiverTreatmentAccess" :predialysis="predialysis"></dialysis-print-order-two>-->
  136. <DialysisPrintOrderOne
  137. v-bind:childResponse="childResponse"
  138. v-if="org_template_info.template_id == 1"
  139. >
  140. </DialysisPrintOrderOne>
  141. <DialysisPrintOrderTwo
  142. v-bind:childResponse="childResponse"
  143. v-if="
  144. org_template_info.template_id == 2 ||
  145. org_template_info.template_id == 0
  146. "
  147. ></DialysisPrintOrderTwo>
  148. <DialysisPrintOrderThree
  149. v-bind:childResponse="childResponse"
  150. v-if="org_template_info.template_id == 3"
  151. >
  152. </DialysisPrintOrderThree>
  153. <DialysisPrintOrderFour
  154. v-bind:childResponse="childResponse"
  155. v-if="org_template_info.template_id == 4"
  156. >
  157. </DialysisPrintOrderFour>
  158. <DialysisPrintOrderFive
  159. v-bind:childResponse="childResponse"
  160. v-if="org_template_info.template_id == 5"
  161. >
  162. </DialysisPrintOrderFive>
  163. <DialysisPrintOrderSix
  164. v-bind:childResponse="childResponse"
  165. v-if="org_template_info.template_id == 6"
  166. >
  167. </DialysisPrintOrderSix>
  168. <DialysisPrintOrderSeven
  169. v-bind:childResponse="childResponse"
  170. v-if="org_template_info.template_id == 7"
  171. >
  172. </DialysisPrintOrderSeven>
  173. <DialysisPrintOrderEight
  174. v-bind:childResponse="childResponse"
  175. v-if="org_template_info.template_id == 8"
  176. >
  177. </DialysisPrintOrderEight>
  178. </div>
  179. </div>
  180. </template>
  181. <script>
  182. import { getDialysisRecord } from "@/api/dialysis";
  183. import { getDataConfig } from "@/utils/data";
  184. import { jsGetAge, uParseTime } from "@/utils/tools";
  185. import LabelBox from "./printItem/LabelBox";
  186. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  187. import DialysisPrintOrderOne from "./template/dialysisPrintOrderOne";
  188. import DialysisPrintOrderTwo from "./template/dialysisPrintOrderTwo";
  189. import DialysisPrintOrderThree from "./template/dialysisPrintOrderThree";
  190. import DialysisPrintOrderFour from "./template/DialysisPrintOrderFour";
  191. import DialysisPrintOrderFive from "./template/DialysisPrintOrderFive";
  192. import DialysisPrintOrderSix from "./template/DialysisPrintOrderSix";
  193. import DialysisPrintOrderSeven from "./template/DialysisPrintOrderSeven";
  194. import DialysisPrintOrderEight from "./template/DialysisPrintOrderEight";
  195. import print from "print-js";
  196. export default {
  197. name: "dialysisPrintOrder",
  198. components: {
  199. DialysisPrintOrderOne,
  200. DialysisPrintOrderTwo,
  201. DialysisPrintOrderThree,
  202. DialysisPrintOrderFour,
  203. DialysisPrintOrderFive,
  204. DialysisPrintOrderSix,
  205. DialysisPrintOrderSeven,
  206. DialysisPrintOrderEight,
  207. LabelBox,
  208. BreadCrumb
  209. },
  210. data() {
  211. return {
  212. crumbs: [
  213. { path: false, name: "透析管理" },
  214. { path: false, name: "打印单" }
  215. ],
  216. childResponse: {},
  217. operators: [],
  218. adminUser: [],
  219. check: {},
  220. dialysisOrder: {
  221. DeviceNumber: []
  222. },
  223. operatorMaps: {},
  224. complications: [
  225. "低血压",
  226. "高血压",
  227. "心律失常",
  228. "头晕",
  229. "头痛",
  230. "呕吐",
  231. "抽搐",
  232. "出血",
  233. "心衰",
  234. "腹痛"
  235. ],
  236. jilurow: 0,
  237. advice_jilurow: 0,
  238. loading: false,
  239. orgname: "",
  240. patientInfo_gender_1: false,
  241. patientInfo_gender_2: false,
  242. patientInfo_source_2: false,
  243. patientInfo_source_1: false,
  244. modeOptions: {},
  245. replacementWays: [],
  246. perfusionApparatus: [],
  247. anticoagulantsConfit: {},
  248. bloodAccessParOpera: {},
  249. dialysateFormulationOptions: {},
  250. queryParams: {
  251. xtdate: "",
  252. xtno: ""
  253. },
  254. patientInfo: {
  255. birth: "",
  256. age: "",
  257. DialysisSchedule: {
  258. device_number: { number: "" },
  259. device_zone: { name: "" }
  260. },
  261. gender: 0
  262. },
  263. predialysis: {
  264. score: "",
  265. internal_fistula: "",
  266. internal_fistula_skin: "",
  267. catheter: "",
  268. blood_access_part_opera_name: ""
  269. },
  270. afterdialysis: {
  271. complications_index: ""
  272. },
  273. prescription: {
  274. dialysate_formulation_name: "",
  275. device: {}
  276. },
  277. advices: [],
  278. users: [],
  279. monitors: [],
  280. summary: {},
  281. receiverTreatmentAccess: {},
  282. org_template_info: {},
  283. doctor_advices: [],
  284. advice_groups: [],
  285. AlPanel: {
  286. id: 0,
  287. name: "",
  288. type: 1,
  289. shouji: 2,
  290. weichi: 2,
  291. zongliang: 2,
  292. gaimingcheng: -1,
  293. gaijiliang: -1,
  294. shouji_unit: "mg",
  295. weichi_unit: "mg/h",
  296. zongliang_unit: "mg",
  297. gaimingcheng_unit: "",
  298. gaijiliang_unit: ""
  299. }
  300. };
  301. },
  302. methods: {
  303. getAdminUser(id) {
  304. if (id == 0) {
  305. return "";
  306. }
  307. if (id == undefined) {
  308. return "";
  309. }
  310. for (let i = 0; i < this.adminUser.length; i++) {
  311. if (this.adminUser[i].id == id) {
  312. return this.adminUser[i].name;
  313. }
  314. }
  315. },
  316. getTime(value, temp) {
  317. if (value == 0) {
  318. return "";
  319. }
  320. if (value != undefined) {
  321. return uParseTime(value, temp);
  322. }
  323. return "";
  324. },
  325. printThisPage() {
  326. var ptime = Math.round(new Date().getTime() / 1000);
  327. this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
  328. const style =
  329. '@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 20px 20px 20px}.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:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.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;}';
  330. const style2 =
  331. '@media print {.option_panel { margin: 0 5px 0 0; } .option_panel .check_box_panel { white-space: nowrap; outline: none; display: inline-block; line-height: 1; position: relative; vertical-align: middle; } .dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px}.option_panel .check_box_panel .check_box { display: inline-block; position: relative; border: 1px solid #000; box-sizing: border-box; width: 14px; height: 12px; background-color: #fff; } .check_box_panel .did_checked::after { content: "√"; font-size: 15px; } .print_page_main_content {background-color: white;width: 960px;margin: 0 auto 50px;padding: 0 0 0 0; page-break-after: always;}.print_page_main_content .order-yy-name {margin: auto;text-align: center;font-size: 20px;letter-spacing: 5px;}.print_page_main_content .order_title {text-align: center;font-size: 23px; line-height: 50px;font-weight: 500;} .row {font-size: 14px;line-height: 20px;padding: 5px 0;}.inline_block { display: inline-block;}.under_line_two {display: inline-block;border-bottom: 1px solid #999;text-align: left;white-space: nowrap;width: 50%;}.under_line {display: inline-block;border-bottom: 1px solid #999;text-align: center;white-space: nowrap; width: 50%;}.flex {display: -webkit-box;display: -moz-box; display: -ms-flexbox; display: -webkit-flex;display: flex;align-items: center;-webkit-align-items: center;box-align: center;-moz-box-align: center;-webkit-box-align: center;text-align: center;-webkit-justify-content: space-between;justify-content: space-between;-moz-box-pack: space-between;-webkit--moz-box-pack: space-between;box-pack: space-between;}.print_page_main_content .proj_table {width: 100%;border: 1px solid;border-collapse: collapse;padding: 2px;}.print_page_main_content .proj_table tbody tr td {border: 1px solid;font-size: 16px;padding: 3px 8px;line-height: 30px;}.print_page_main_content .proj_table .inside_table {width: 100%;border: hidden; border-collapse: collapse;}.print_page_main_content .proj_table .inside_table tr td {border: 1px solid; text-align: center;font-size: 14px;padding: 6px 5px;line-height: 16px;}.print-table-no {width: 100%;text-align: center;border-collapse: collapse;font-size: 14px;}.es-img {height: 30px;}.advice-name {text-align: left !important;line-height: 16px !important;}.advice-children {display: flex;}}.margin-bottom-50{margin-bottom:50px;}.margin-bottom-300 {margin-bottom:450px;}.margin-bottom-600 {margin-bottom:600px;}.margin-bottom-900 {margin-bottom:900px;}.print-yema{ position: absolute;top: 920px;left: 50%;} .print-yema2{ position: absolute;top: 400px;left: 50%;}.print-yema3{position: absolute;top: 1230px;left: 50%;}.print-yema4{position: absolute;top: 1050px;left: 50%;}.check_box{width:15px !important;height:15px !important;}.did_checke::after {font-size: 8px;margin-left: 2px;margin-top: 12px !important;position: absolute;}';
  332. const style3 =
  333. '@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 20px 20px 20px}.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:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.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 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: 2px 5px;} .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;}';
  334. const style4 =
  335. '@media print {.option_panel { margin: 0 5px 0 0; } .option_panel .check_box_panel { white-space: nowrap; outline: none; display: inline-block; line-height: 1; position: relative; vertical-align: middle; } .dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px}.option_panel .check_box_panel .check_box { display: inline-block; position: relative; border: 1px solid #000; box-sizing: border-box; width: 14px; height: 12px; background-color: #fff; } .check_box_panel .did_checked::after { content: "√"; font-size: 15px; } .print_page_main_content {background-color: white;width: 960px;margin: 0 auto 50px;padding: 0 0 0 0; page-break-after: always;}.print_page_main_content .order-yy-name {margin: auto;text-align: center;font-size: 20px;letter-spacing: 5px;}.print_page_main_content .order_title {text-align: center;font-size: 23px; line-height: 50px;font-weight: 500;} .row {font-size: 16px;line-height: 20px;padding: 5px 0;}.inline_block { display: inline-block;}.under_line_two {display: inline-block;border-bottom: 1px solid #999;text-align: left;white-space: nowrap;width: 50%;}.under_line {display: inline-block;border-bottom: 1px solid #999;text-align: center;white-space: nowrap; width: 50%;}.flex {display: -webkit-box;display: -moz-box; display: -ms-flexbox; display: -webkit-flex;display: flex;align-items: center;-webkit-align-items: center;box-align: center;-moz-box-align: center;-webkit-box-align: center;text-align: center;-webkit-justify-content: space-between;justify-content: space-between;-moz-box-pack: space-between;-webkit--moz-box-pack: space-between;box-pack: space-between;}.print_page_main_content .proj_table {width: 100%;border: 1px solid;border-collapse: collapse;padding: 2px;}.print_page_main_content .proj_table tbody tr td {border: 1px solid;font-size: 16px;padding: 3px 8px;line-height: 30px;}.print_page_main_content .proj_table .inside_table {width: 100%;border: hidden; border-collapse: collapse;}.print_page_main_content .proj_table .inside_table tr td {border: 1px solid; text-align: center;font-size: 16px;padding: 6px 5px;line-height: 18px;}.print-table-no {width: 100%;text-align: center;border-collapse: collapse;font-size: 14px;}.es-img {height: 30px;}.advice-name {text-align: left !important;line-height: 16px !important;}.advice-children {display: flex;}}.margin-bottom-50{margin-bottom:50px;}.margin-bottom-300 {margin-bottom:450px;}.margin-bottom-600 {margin-bottom:600px;}.margin-bottom-900 {margin-bottom:900px;}.print-yema{ position: absolute;top: 920px;left: 50%;} .print-yema2{ position: absolute;top: 400px;left: 50%;}.print-yema3{position: absolute;top: 1230px;left: 50%;}.print-yema4{position: absolute;top: 1050px;left: 50%;}.check_box{width:15px !important;height:15px !important;}.did_checke::after {font-size: 8px;margin-left: 2px;margin-top: 12px !important;position: absolute;}';
  336. if (this.org_template_info.template_id == 1) {
  337. printJS({
  338. printable: "dialysis-print-box",
  339. type: "html",
  340. style: style,
  341. scanStyles: false
  342. });
  343. } else if (this.org_template_info.template_id == 0) {
  344. printJS({
  345. printable: "dialysis-print-box-1",
  346. type: "html",
  347. style: style2,
  348. scanStyles: false
  349. });
  350. } else if (this.org_template_info.template_id == 2) {
  351. printJS({
  352. printable: "dialysis-print-box-1",
  353. type: "html",
  354. style: style4,
  355. scanStyles: false
  356. });
  357. } else if (this.org_template_info.template_id == 3) {
  358. printJS({
  359. printable: "dialysis-print-box",
  360. type: "html",
  361. style: style,
  362. scanStyles: false
  363. });
  364. } else if (this.org_template_info.template_id == 4) {
  365. printJS({
  366. printable: "dialysis-print-box",
  367. type: "html",
  368. style: style,
  369. scanStyles: false
  370. });
  371. } else if (this.org_template_info.template_id == 5) {
  372. printJS({
  373. printable: "dialysis-print-box-1",
  374. type: "html",
  375. style: style2,
  376. scanStyles: false
  377. });
  378. } else if (this.org_template_info.template_id == 6) {
  379. printJS({
  380. printable: "dialysis-print-box-1",
  381. type: "html",
  382. style: style2,
  383. scanStyles: false
  384. });
  385. } else if (this.org_template_info.template_id == 7) {
  386. printJS({
  387. printable: "dialysis-print-box",
  388. type: "html",
  389. style: style,
  390. scanStyles: false
  391. });
  392. } else if (this.org_template_info.template_id == 8) {
  393. printJS({
  394. printable: "dialysis-print-box",
  395. type: "html",
  396. style: style3,
  397. scanStyles: false
  398. });
  399. }
  400. },
  401. printThisOnePage() {
  402. var ptime = Math.round(new Date().getTime() / 1000);
  403. this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
  404. const style =
  405. '@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 20px 20px 20px}.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:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.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;}';
  406. const style2 =
  407. '@media print {.option_panel { margin: 0 5px 0 0; } .option_panel .check_box_panel { white-space: nowrap; outline: none; display: inline-block; line-height: 1; position: relative; vertical-align: middle; } .dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px}.option_panel .check_box_panel .check_box { display: inline-block; position: relative; border: 1px solid #000; box-sizing: border-box; width: 14px; height: 12px; background-color: #fff; } .check_box_panel .did_checked::after { content: "√"; font-size: 15px; } .print_page_main_content {background-color: white;width: 960px;margin: 0 auto 50px;padding: 0 0 0 0; page-break-after: always;}.print_page_main_content .order-yy-name {margin: auto;text-align: center;font-size: 20px;letter-spacing: 5px;}.print_page_main_content .order_title {text-align: center;font-size: 23px; line-height: 50px;font-weight: 500;} .row {font-size: 14px;line-height: 20px;padding: 5px 0;}.inline_block { display: inline-block;}.under_line_two {display: inline-block;border-bottom: 1px solid #999;text-align: left;white-space: nowrap;width: 50%;}.under_line {display: inline-block;border-bottom: 1px solid #999;text-align: center;white-space: nowrap; width: 50%;}.flex {display: -webkit-box;display: -moz-box; display: -ms-flexbox; display: -webkit-flex;display: flex;align-items: center;-webkit-align-items: center;box-align: center;-moz-box-align: center;-webkit-box-align: center;text-align: center;-webkit-justify-content: space-between;justify-content: space-between;-moz-box-pack: space-between;-webkit--moz-box-pack: space-between;box-pack: space-between;}.print_page_main_content .proj_table {width: 100%;border: 1px solid;border-collapse: collapse;padding: 2px;}.print_page_main_content .proj_table tbody tr td {border: 1px solid;font-size: 16px;padding: 3px 8px;line-height: 30px;}.print_page_main_content .proj_table .inside_table {width: 100%;border: hidden; border-collapse: collapse;}.print_page_main_content .proj_table .inside_table tr td {border: 1px solid; text-align: center;font-size: 14px;padding: 6px 5px;line-height: 16px;}.print-table-no {width: 100%;text-align: center;border-collapse: collapse;font-size: 14px;}.es-img {height: 30px;}.advice-name {text-align: left !important;line-height: 16px !important;}.advice-children {display: flex;}}.margin-bottom-50{margin-bottom:50px;}.margin-bottom-300 {margin-bottom:450px;}.margin-bottom-600 {margin-bottom:600px;}.margin-bottom-900 {margin-bottom:200px;}.print-yema{ position: absolute;top: 920px;left: 50%;} .print-yema2{ position: absolute;top: 400px;left: 50%;}.print-yema3{position: absolute;top: 1230px;left: 50%;}.print-yema4{position: absolute;top: 1050px;left: 50%;}.check_box{width:15px !important;height:15px !important;}.did_checke::after {font-size: 8px;margin-left: 2px;margin-top: 12px !important;position: absolute;}';
  408. const style3 =
  409. '@media print {.option_panel { margin: 0 5px 0 0; } .option_panel .check_box_panel { white-space: nowrap; outline: none; display: inline-block; line-height: 1; position: relative; vertical-align: middle; } .dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px}.option_panel .check_box_panel .check_box { display: inline-block; position: relative; border: 1px solid #000; box-sizing: border-box; width: 14px; height: 12px; background-color: #fff; } .check_box_panel .did_checked::after { content: "√"; font-size: 15px; } .print_page_main_content {background-color: white;width: 960px;margin: 0 auto 50px;padding: 0 0 0 0; page-break-after: always;}.print_page_main_content .order-yy-name {margin: auto;text-align: center;font-size: 20px;letter-spacing: 5px;}.print_page_main_content .order_title {text-align: center;font-size: 23px; line-height: 50px;font-weight: 500;} .row {font-size: 16px;line-height: 20px;padding: 5px 0;}.inline_block { display: inline-block;}.under_line_two {display: inline-block;border-bottom: 1px solid #999;text-align: left;white-space: nowrap;width: 50%;}.under_line {display: inline-block;border-bottom: 1px solid #999;text-align: center;white-space: nowrap; width: 50%;}.flex {display: -webkit-box;display: -moz-box; display: -ms-flexbox; display: -webkit-flex;display: flex;align-items: center;-webkit-align-items: center;box-align: center;-moz-box-align: center;-webkit-box-align: center;text-align: center;-webkit-justify-content: space-between;justify-content: space-between;-moz-box-pack: space-between;-webkit--moz-box-pack: space-between;box-pack: space-between;}.print_page_main_content .proj_table {width: 100%;border: 1px solid;border-collapse: collapse;padding: 2px;}.print_page_main_content .proj_table tbody tr td {border: 1px solid;font-size: 16px;padding: 3px 8px;line-height: 30px;}.print_page_main_content .proj_table .inside_table {width: 100%;border: hidden; border-collapse: collapse;}.print_page_main_content .proj_table .inside_table tr td {border: 1px solid; text-align: center;font-size: 16px;padding: 6px 5px;line-height: 18px;}.print-table-no {width: 100%;text-align: center;border-collapse: collapse;font-size: 14px;}.es-img {height: 30px;}.advice-name {text-align: left !important;line-height: 16px !important;}.advice-children {display: flex;}}.margin-bottom-50{margin-bottom:50px;}.margin-bottom-300 {margin-bottom:450px;}.margin-bottom-600 {margin-bottom:600px;}.margin-bottom-900 {margin-bottom:200px;}.print-yema{ position: absolute;top: 920px;left: 50%;} .print-yema2{ position: absolute;top: 400px;left: 50%;}.print-yema3{position: absolute;top: 1230px;left: 50%;}.print-yema4{position: absolute;top: 1050px;left: 50%;}.check_box{width:15px !important;height:15px !important;}.did_checke::after {font-size: 8px;margin-left: 2px;margin-top: 12px !important;position: absolute;}';
  410. if (this.org_template_info.template_id == 1) {
  411. printJS({
  412. printable: "dialysis-print-box",
  413. type: "html",
  414. style: style,
  415. scanStyles: false
  416. });
  417. } else if (this.org_template_info.template_id == 2) {
  418. printJS({
  419. printable: "dialysis-print-box-1-1",
  420. type: "html",
  421. style: style3,
  422. scanStyles: false
  423. });
  424. } else if (
  425. this.org_template_info.template_id == 0 ||
  426. this.org_template_info.template_id == 5
  427. ) {
  428. printJS({
  429. printable: "dialysis-print-box-1-1",
  430. type: "html",
  431. style: style2,
  432. scanStyles: false
  433. });
  434. }
  435. },
  436. printThisTwoPage() {
  437. var ptime = Math.round(new Date().getTime() / 1000);
  438. this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
  439. const style =
  440. '@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 20px 20px 20px}.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:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.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;}';
  441. const style2 =
  442. '@media print {.option_panel { margin: 0 5px 0 0; } .option_panel .check_box_panel { white-space: nowrap; outline: none; display: inline-block; line-height: 1; position: relative; vertical-align: middle; } .dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px}.option_panel .check_box_panel .check_box { display: inline-block; position: relative; border: 1px solid #000; box-sizing: border-box; width: 14px; height: 12px; background-color: #fff; } .check_box_panel .did_checked::after { content: "√"; font-size: 15px; } .print_page_main_content {background-color: white;width: 960px;margin: 0 auto 50px;padding: 0 0 0 0; page-break-after: always;}.print_page_main_content .order-yy-name {margin: auto;text-align: center;font-size: 20px;letter-spacing: 5px;}.print_page_main_content .order_title {text-align: center;font-size: 23px; line-height: 50px;font-weight: 500;} .row {font-size: 14px;line-height: 20px;padding: 5px 0;}.inline_block { display: inline-block;}.under_line_two {display: inline-block;border-bottom: 1px solid #999;text-align: left;white-space: nowrap;width: 50%;}.under_line {display: inline-block;border-bottom: 1px solid #999;text-align: center;white-space: nowrap; width: 50%;}.flex {display: -webkit-box;display: -moz-box; display: -ms-flexbox; display: -webkit-flex;display: flex;align-items: center;-webkit-align-items: center;box-align: center;-moz-box-align: center;-webkit-box-align: center;text-align: center;-webkit-justify-content: space-between;justify-content: space-between;-moz-box-pack: space-between;-webkit--moz-box-pack: space-between;box-pack: space-between;}.print_page_main_content .proj_table {width: 100%;border: 1px solid;border-collapse: collapse;padding: 2px;}.print_page_main_content .proj_table tbody tr td {border: 1px solid;font-size: 16px;padding: 3px 8px;line-height: 30px;}.print_page_main_content .proj_table .inside_table {width: 100%;border: hidden; border-collapse: collapse;}.print_page_main_content .proj_table .inside_table tr td {border: 1px solid; text-align: center;font-size: 14px;padding: 6px 5px;line-height: 16px;}.print-table-no {width: 100%;text-align: center;border-collapse: collapse;font-size: 14px;}.es-img {height: 30px;}.advice-name {text-align: left !important;line-height: 16px !important;}.advice-children {display: flex;}}.margin-bottom-50{margin-bottom:50px;}.margin-bottom-300 {margin-bottom:450px;}.margin-bottom-600 {margin-bottom:600px;}.margin-bottom-900 {margin-bottom:900px;}.print-yema{ position: absolute;top: 920px;left: 50%;} .print-yema2{ position: absolute;top: 400px;left: 50%;}.print-yema3{position: absolute;top: 1230px;left: 50%;}.print-yema4{position: absolute;top: 1050px;left: 50%;}.check_box{width:15px !important;height:15px !important;}.did_checke::after {font-size: 8px;margin-left: 2px;margin-top: 12px !important;position: absolute;}';
  443. const style3 =
  444. '@media print {.option_panel { margin: 0 5px 0 0; } .option_panel .check_box_panel { white-space: nowrap; outline: none; display: inline-block; line-height: 1; position: relative; vertical-align: middle; } .dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px}.option_panel .check_box_panel .check_box { display: inline-block; position: relative; border: 1px solid #000; box-sizing: border-box; width: 14px; height: 12px; background-color: #fff; } .check_box_panel .did_checked::after { content: "√"; font-size: 15px; } .print_page_main_content {background-color: white;width: 960px;margin: 0 auto 50px;padding: 0 0 0 0; page-break-after: always;}.print_page_main_content .order-yy-name {margin: auto;text-align: center;font-size: 20px;letter-spacing: 5px;}.print_page_main_content .order_title {text-align: center;font-size: 23px; line-height: 50px;font-weight: 500;} .row {font-size: 16px;line-height: 20px;padding: 5px 0;}.inline_block { display: inline-block;}.under_line_two {display: inline-block;border-bottom: 1px solid #999;text-align: left;white-space: nowrap;width: 50%;}.under_line {display: inline-block;border-bottom: 1px solid #999;text-align: center;white-space: nowrap; width: 50%;}.flex {display: -webkit-box;display: -moz-box; display: -ms-flexbox; display: -webkit-flex;display: flex;align-items: center;-webkit-align-items: center;box-align: center;-moz-box-align: center;-webkit-box-align: center;text-align: center;-webkit-justify-content: space-between;justify-content: space-between;-moz-box-pack: space-between;-webkit--moz-box-pack: space-between;box-pack: space-between;}.print_page_main_content .proj_table {width: 100%;border: 1px solid;border-collapse: collapse;padding: 2px;}.print_page_main_content .proj_table tbody tr td {border: 1px solid;font-size: 16px;padding: 3px 8px;line-height: 30px;}.print_page_main_content .proj_table .inside_table {width: 100%;border: hidden; border-collapse: collapse;}.print_page_main_content .proj_table .inside_table tr td {border: 1px solid; text-align: center;font-size: 16px;padding: 6px 5px;line-height: 18px;}.print-table-no {width: 100%;text-align: center;border-collapse: collapse;font-size: 14px;}.es-img {height: 30px;}.advice-name {text-align: left !important;line-height: 16px !important;}.advice-children {display: flex;}}.margin-bottom-50{margin-bottom:50px;}.margin-bottom-300 {margin-bottom:450px;}.margin-bottom-600 {margin-bottom:600px;}.margin-bottom-900 {margin-bottom:200px;}.print-yema{ position: absolute;top: 920px;left: 50%;} .print-yema2{ position: absolute;top: 400px;left: 50%;}.print-yema3{position: absolute;top: 1230px;left: 50%;}.print-yema4{position: absolute;top: 1050px;left: 50%;}.check_box{width:15px !important;height:15px !important;}.did_checke::after {font-size: 8px;margin-left: 2px;margin-top: 12px !important;position: absolute;}';
  445. if (this.org_template_info.template_id == 1) {
  446. printJS({
  447. printable: "dialysis-print-box",
  448. type: "html",
  449. style: style,
  450. scanStyles: false
  451. });
  452. } else if (this.org_template_info.template_id == 2) {
  453. printJS({
  454. printable: "dialysis-print-box-1-2",
  455. type: "html",
  456. style: style3,
  457. scanStyles: false
  458. });
  459. } else if (
  460. this.org_template_info.template_id == 0 ||
  461. this.org_template_info.template_id == 5
  462. ) {
  463. printJS({
  464. printable: "dialysis-print-box-1-2",
  465. type: "html",
  466. style: style2,
  467. scanStyles: false
  468. });
  469. }
  470. },
  471. getNumber() {
  472. if (this.dialysisOrder != null) {
  473. return (
  474. this.patientInfo.DialysisSchedule.device_zone.name +
  475. this.dialysisOrder.DeviceNumber.number
  476. );
  477. } else {
  478. return (
  479. this.patientInfo.DialysisSchedule.device_zone.name +
  480. this.patientInfo.DialysisSchedule.device_number.number
  481. );
  482. }
  483. },
  484. getXuserName(id) {
  485. if (id <= 0) {
  486. return "";
  487. }
  488. var name = "";
  489. if (this.users == null || typeof this.users.length === "undefined") {
  490. return name;
  491. }
  492. var leng = this.users.length;
  493. if (leng == 0) {
  494. return name;
  495. }
  496. for (let index = 0; index < leng; index++) {
  497. if (this.users[index].id == id) {
  498. name = this.users[index].name;
  499. break;
  500. }
  501. }
  502. return name;
  503. },
  504. setAdminUserES(id) {
  505. console.log(id);
  506. if (id == 0) {
  507. return "";
  508. }
  509. if (id in this.operatorMaps) {
  510. return this.operatorMaps[id].url;
  511. } else {
  512. return "";
  513. }
  514. },
  515. modeName(mode_id) {
  516. return typeof this.modeOptions[mode_id] !== "undefined" &&
  517. typeof this.modeOptions[mode_id].name !== "undefined"
  518. ? this.modeOptions[mode_id].name
  519. : "";
  520. },
  521. getDialysisRecord() {
  522. this.loading = true;
  523. getDialysisRecord(this.queryParams).then(response => {
  524. if (response.data.state == 1) {
  525. this.childResponse = response;
  526. this.org_template_info = response.data.data.org_template_info;
  527. this.loading = false;
  528. // this.adminUser = response.data.data.users
  529. // this.users = response.data.data.users
  530. // this.patientInfo = response.data.data.patientInfo
  531. // this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
  532. // // this.patientInfo.age = jsGetAge(this.patientInfo.birth, '-')
  533. // if (response.data.data.patientInfo.first_dialysis_date != 0) {
  534. // this.patientInfo.first_dialysis_date = uParseTime(response.data.data.patientInfo.first_dialysis_date, '{y}-{m}-{d}')
  535. // } else {
  536. // this.patientInfo.first_dialysis_date = ''
  537. // }
  538. // this.check = response.data.data.check
  539. // this.predialysis = response.data.data.PredialysisEvaluation
  540. // this.predialysis.blood_access_part_opera_name = this.bloodAccessParOperaName(this.predialysis.blood_access_part_opera_id)
  541. // this.afterdialysis = response.data.data.AssessmentAfterDislysis
  542. // this.operators = response.data.data.operators
  543. // this.dialysisOrder = response.data.data.dialysisOrder === null ? null : response.data.data.dialysisOrder
  544. // if (this.operators.length > 0) {
  545. // var operatorsLen = this.operators.length
  546. // for (var index = 0; index < operatorsLen; index++) {
  547. // this.$set(this.operatorMaps, this.operators[index].creator, this.operators[index])
  548. // }
  549. // }
  550. // this.afterdialysis.txqnx = -1
  551. // if (this.afterdialysis.cruor.indexOf('0度') > -1) {
  552. // this.afterdialysis.txqnx = 0
  553. // }
  554. // if (this.afterdialysis.cruor.indexOf('Ⅰ度') > -1) {
  555. // this.afterdialysis.txqnx = 1
  556. // }
  557. // if (this.afterdialysis.cruor.indexOf('Ⅱ度') > -1) {
  558. // this.afterdialysis.txqnx = 2
  559. // }
  560. // if (this.afterdialysis.cruor.indexOf('Ⅲ度') > -1) {
  561. // this.afterdialysis.txqnx = 3
  562. // }
  563. // this.afterdialysis.complications = this.afterdialysis.complication.split(',')
  564. // this.afterdialysis.complications_other = []
  565. // this.afterdialysis.complications_index = []
  566. // var acllen = this.afterdialysis.complications.length
  567. // for (let index = 0; index < acllen; index++) {
  568. // if (this.complications.indexOf(this.afterdialysis.complications[index]) >= 0) {
  569. // this.afterdialysis.complications_index.push(this.afterdialysis.complications[index])
  570. // } else if (this.complications.indexOf(this.afterdialysis.complications[index]) < 0 && this.afterdialysis.complications_other.indexOf(this.afterdialysis.complications[index]) < 0) {
  571. // this.afterdialysis.complications_other.push(this.afterdialysis.complications[index])
  572. // }
  573. // }
  574. // this.afterdialysis.complications_other = this.afterdialysis.complications_other.join(',')
  575. // this.prescription = response.data.data.dialysisPrescription
  576. // this.receiverTreatmentAccess = response.data.data.receiverTreatmentAccess
  577. // this.prescription.mode = this.modeName(this.prescription.mode_id)
  578. // var rwLen = this.replacementWays.length
  579. // this.prescription.replacement = ''
  580. // for (let index = 0; index < rwLen; index++) {
  581. // if (this.replacementWays[index].id == this.prescription.replacement_way) {
  582. // this.prescription.replacement = this.replacementWays[index].name
  583. // break
  584. // }
  585. // }
  586. // this.prescription.dialysate_formulation_name = this.dialysateFormulationName(this.prescription.dialysate_formulation)
  587. // var paLen = this.perfusionApparatus.length
  588. // this.prescription.perfusion_apparatus_name = ''
  589. // for (let index = 0; index < paLen; index++) {
  590. // if (this.perfusionApparatus[index].id == this.prescription.perfusion_apparatus) {
  591. // this.prescription.perfusion_apparatus_name = this.perfusionApparatus[index].name
  592. // break
  593. // }
  594. // }
  595. // var acLen = this.anticoagulantsConfit.length
  596. // var thisALID = this.prescription.anticoagulant
  597. // this.prescription.anticoagulant_name = ''
  598. // if (typeof (this.anticoagulantsConfit[thisALID]) !== 'undefined' && this.anticoagulantsConfit[thisALID] != null) {
  599. // this.prescription.anticoagulant_name = this.anticoagulantsConfit[thisALID].name
  600. // this.AlPanel = this.anticoagulantsConfit[thisALID]
  601. // }
  602. // this.advices = response.data.data.advices
  603. // this.monitors = response.data.data.monitors
  604. // this.summary = response.data.data.summary
  605. // this.org_template_info = response.data.data.org_template_info
  606. // if (this.monitors.length < 8) {
  607. // var nl = 8 - this.monitors.length
  608. // for (let index = 0; index < nl; index++) {
  609. // this.monitors.push([])
  610. // }
  611. // }
  612. // this.jilurow = this.monitors.length + 1
  613. // this.advice_jilurow = this.advices.length + 1
  614. // var childMap = {}
  615. // for (const index in this.advices) {
  616. // if (this.advices[index].parent_id == 0) {
  617. // continue
  618. // }
  619. // if (!(this.advices[index].parent_id in childMap)) {
  620. // childMap[this.advices[index].parent_id] = []
  621. // }
  622. // childMap[this.advices[index].parent_id].push(this.advices[index])
  623. // }
  624. // var advices = []
  625. // for (const index in this.advices) {
  626. // if (this.advices[index].parent_id > 0) {
  627. // continue
  628. // }
  629. // var item = this.advices[index]
  630. // if (item.id in childMap) {
  631. // item.children = childMap[item.id]
  632. // } else {
  633. // item.children = []
  634. // }
  635. // advices.push(item)
  636. // }
  637. // var leftAdvice = []
  638. // var rightAdvice = []
  639. // var adlen = advices.length
  640. // var halfLen = adlen % 2 == 0 ? adlen / 2 : (adlen + 1) / 2
  641. // for (var i = 0; i < halfLen; i++) {
  642. // leftAdvice.push(advices[i])
  643. // rightAdvice.push(advices[i + halfLen])
  644. // }
  645. // if (halfLen < 5) {
  646. // var nl = 5 - leftAdvice.length
  647. // for (let index = 0; index < nl; index++) {
  648. // leftAdvice.push([])
  649. // }
  650. // var nl = 5 - rightAdvice.length
  651. // for (let index = 0; index < nl; index++) {
  652. // rightAdvice.push([])
  653. // }
  654. // }
  655. // this.advices = []
  656. // for (var i = 0; i < halfLen; i++) {
  657. // var item = []
  658. // item.push(leftAdvice[i])
  659. // item.push(rightAdvice[i])
  660. // this.advices.push(item)
  661. // }
  662. // this.loading = false
  663. // this.doctor_advices = response.data.data.advices == null ? [] : response.data.data.advices
  664. // for (let index = 0; index < this.doctor_advices.length; index++) {
  665. // this.doctor_advices[index]['isShow'] = 2
  666. // }
  667. // if (this.doctor_advices.length > 0) {
  668. // var group = this.newAdviceGroupObject()
  669. // var initGroupBlock = function(group, advice) {
  670. // group.group_no = advice.groupno
  671. // }
  672. // for (let index = this.doctor_advices.length - 1; index >= 0; index--) {
  673. // var new_advice_index = 0
  674. // if ('children' in this.doctor_advices[index] && this.doctor_advices[index].children.length > 0) {
  675. // new_advice_index = index + this.doctor_advices[index].children.length + 1
  676. // var doctor_advice = {
  677. // delivery_way: this.doctor_advices[index].delivery_way,
  678. // execution_frequency: this.doctor_advices[index].execution_frequency,
  679. // groupno: this.doctor_advices[index].groupno,
  680. // id: this.doctor_advices[index].id,
  681. // parent_id: this.doctor_advices[index].parent_id,
  682. // children: this.doctor_advices[index].children,
  683. // remark: this.doctor_advices[index].remark,
  684. // execution_staff: this.doctor_advices[index].execution_staff,
  685. // checker: this.doctor_advices[index].checker,
  686. // advice_doctor: this.doctor_advices[index].advice_doctor,
  687. // }
  688. // doctor_advice['isShow'] = 1
  689. // this.doctor_advices.splice(new_advice_index, 0, doctor_advice)
  690. // // this.doctor_advices.push(doctor_advice)
  691. // }
  692. // }
  693. // for (let index = 0; index < this.doctor_advices.length; index++) {
  694. // const advice = this.doctor_advices[index]
  695. // if (advice.groupno == 0) {
  696. // // 老版本的医嘱没有分组的概念,所以这一个 if 是解决这个问题的,将每个无分组的医嘱各自归为一组
  697. // if (advice.parent_id > 0) {
  698. // if (this.advice_groups.length > 0) {
  699. // var parent_group = this.advice_groups[
  700. // this.advice_groups.length - 1
  701. // ]
  702. // if (parent_group.advices.length > 0) {
  703. // if (parent_group.advices[0].id == advice.parent_id) {
  704. // parent_group.advices.push(advice)
  705. // }
  706. // }
  707. // }
  708. // continue
  709. // } else {
  710. // if (group.group_no > 0) {
  711. // this.advice_groups.push(group)
  712. // group = this.newAdviceGroupObject()
  713. // }
  714. // initGroupBlock(group, advice)
  715. // group.advices.push(advice)
  716. // this.advice_groups.push(group)
  717. // group = this.newAdviceGroupObject()
  718. // continue
  719. // }
  720. // }
  721. // if (group.group_no > 0 && group.group_no != advice.groupno) {
  722. // this.advice_groups.push(group)
  723. // group = this.newAdviceGroupObject()
  724. // }
  725. // if (group.group_no == 0) {
  726. // initGroupBlock(group, advice)
  727. // }
  728. // if (group.group_no == advice.groupno) {
  729. // group.advices.push(advice)
  730. // }
  731. // }
  732. // if (group.group_no > 0) {
  733. // // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
  734. // this.advice_groups.push(group)
  735. // }
  736. // }
  737. // console.log(this.advice_groups)
  738. } else {
  739. this.loading = false;
  740. this.$message.error("请求数据失败");
  741. return false;
  742. }
  743. });
  744. },
  745. bloodAccessParOperaName(id) {
  746. if (id in this.bloodAccessParOpera) {
  747. return this.bloodAccessParOpera[id].name;
  748. }
  749. return "";
  750. },
  751. dialysateFormulationName(id) {
  752. if (id in this.dialysateFormulationOptions) {
  753. return this.dialysateFormulationOptions[id].name;
  754. }
  755. return "";
  756. },
  757. getAge: function(val) {
  758. if (
  759. this.org_template_info.template_id == 2 ||
  760. this.org_template_info.template_id == 0
  761. ) {
  762. if (val.age == 0) {
  763. return jsGetAge(val.birth, "-");
  764. } else {
  765. return val.age;
  766. }
  767. } else {
  768. return jsGetAge(val.birth, "-");
  769. }
  770. },
  771. newAdviceGroupObject: function() {
  772. return Object.assign(
  773. {},
  774. {
  775. group_no: 0,
  776. // advice_doctor: 0,
  777. // start_time: 0,
  778. advices: []
  779. // exec_staff: 0,
  780. // exec_time: 0,
  781. // checker: 0,
  782. }
  783. );
  784. }
  785. },
  786. watch: {
  787. "patientInfo.gender": function() {
  788. if (this.patientInfo.gender == 1) {
  789. this.patientInfo_gender_1 = true;
  790. this.patientInfo_gender_2 = false;
  791. } else if (this.patientInfo.gender == 2) {
  792. this.patientInfo_gender_2 = true;
  793. this.patientInfo_gender_1 = false;
  794. } else {
  795. this.patientInfo_gender_2 = false;
  796. this.patientInfo_gender_1 = false;
  797. }
  798. },
  799. "patientInfo.source": function() {
  800. if (this.patientInfo.source == 1) {
  801. this.patientInfo_source_1 = true;
  802. this.patientInfo_source_2 = false;
  803. } else if (this.patientInfo.source == 2) {
  804. this.patientInfo_source_2 = true;
  805. this.patientInfo_source_1 = false;
  806. } else {
  807. this.patientInfo_source_2 = false;
  808. this.patientInfo_source_1 = false;
  809. }
  810. }
  811. },
  812. created() {
  813. var xtuser = this.$store.getters.xt_user;
  814. this.orgname = xtuser.org.org_name;
  815. // this.orgname = "遂溪方济医院";
  816. this.modeOptions = this.$store.getters.treatment_mode;
  817. this.replacementWays = this.$store.getters.replacement_ways;
  818. this.perfusionApparatus = this.$store.getters.perfusion_apparatus;
  819. this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit;
  820. // this.bloodAccessParOpera = getDataConfig('hemodialysis', 'vascular_access_desc')
  821. var bloodAccessParOpera = getDataConfig(
  822. "hemodialysis",
  823. "vascular_access_desc"
  824. );
  825. for (var key in bloodAccessParOpera) {
  826. this.bloodAccessParOpera[bloodAccessParOpera[key].id] =
  827. bloodAccessParOpera[key];
  828. }
  829. var dialysateFormulationOptions = getDataConfig(
  830. "hemodialysis",
  831. "dialysate_formulation"
  832. );
  833. for (var key in dialysateFormulationOptions) {
  834. this.dialysateFormulationOptions[dialysateFormulationOptions[key].id] =
  835. dialysateFormulationOptions[key];
  836. }
  837. const xtdate = this.$route.query && this.$route.query.xtdate;
  838. const xtno = this.$route.query && this.$route.query.xtno;
  839. if (
  840. typeof xtdate === "string" &&
  841. xtdate.length > 0 &&
  842. typeof xtno === "string" &&
  843. xtno.length > 0
  844. ) {
  845. this.queryParams.xtdate = xtdate;
  846. this.queryParams.xtno = xtno;
  847. this.getDialysisRecord();
  848. } else {
  849. this.$message.error("参数不齐");
  850. return false;
  851. }
  852. }
  853. };
  854. </script>
  855. <style>
  856. .dialysis-print-order {
  857. width: 960px;
  858. margin: 0 auto;
  859. }
  860. .dialysis-print-order .order-yy-name {
  861. margin: auto;
  862. text-align: center;
  863. font-size: 20px;
  864. letter-spacing: 5px;
  865. }
  866. .dialysis-print-order .order-title {
  867. margin: auto;
  868. font-weight: 600;
  869. text-align: center;
  870. font-size: 22px;
  871. padding: 10px;
  872. }
  873. .dialysis-print-order .table-box {
  874. width: 100%;
  875. line-height: 23px;
  876. font-size: 14px;
  877. }
  878. .dialysis-print-order .print-table {
  879. width: 100%;
  880. text-align: center;
  881. border-collapse: collapse;
  882. line-height: 40px;
  883. font-size: 14px;
  884. }
  885. .dialysis-print-order .print-table-no {
  886. width: 100%;
  887. text-align: center;
  888. border-collapse: collapse;
  889. font-size: 14px;
  890. }
  891. .dialysis-print-order .under-line {
  892. border-bottom: 1px solid #999;
  893. width: 95%;
  894. text-align: center;
  895. margin-left: 2px;
  896. }
  897. .dialysis-print-order .title-box {
  898. text-align: center;
  899. font-size: 16px;
  900. }
  901. .dialysis-print-order .radio-lebel-box {
  902. font-weight: 400;
  903. cursor: pointer;
  904. }
  905. .dialysis-print-order .radio-no {
  906. opacity: 0;
  907. outline: none;
  908. position: absolute;
  909. margin: 0;
  910. width: 0;
  911. height: 0;
  912. z-index: -1;
  913. }
  914. .dialysis-print-order .radio-inner {
  915. white-space: nowrap;
  916. cursor: pointer;
  917. outline: none;
  918. display: inline-block;
  919. line-height: 1;
  920. position: relative;
  921. vertical-align: middle;
  922. }
  923. .dialysis-print-order .radio-fang {
  924. display: inline-block;
  925. position: relative;
  926. border: 1px solid #000;
  927. box-sizing: border-box;
  928. width: 14px;
  929. height: 14px;
  930. background-color: #fff;
  931. z-index: 1;
  932. transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
  933. background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
  934. }
  935. .dialysis-print-order .is-checked-radio::after {
  936. content: "√";
  937. font-size: 15px;
  938. }
  939. .dialysis-print-order .print-table-no tr td {
  940. padding: 8px 5px;
  941. line-height: 25px;
  942. }
  943. .dialysis-print-order .print-table tr td {
  944. padding: 1px 1px;
  945. /*line-height: 25px;*/
  946. }
  947. .es-img {
  948. height: 30px;
  949. }
  950. .advice-name {
  951. text-align: left;
  952. }
  953. .advice-children {
  954. display: flex;
  955. }
  956. .title-box-pro {
  957. border: 0 #fff;
  958. line-height: 25px;
  959. height: 25px;
  960. text-align: left;
  961. padding-left: 10px !important;
  962. }
  963. .title-box-pro-tr {
  964. border: 0 #fff;
  965. }
  966. .text-align-left {
  967. text-align: left !important;
  968. padding-left: 10px !important;
  969. font-size: 14px !important;
  970. line-height: 25px;
  971. }
  972. .print-table-tr-new td {
  973. line-height: 20px !important;
  974. }
  975. .border-top-solid {
  976. border: solid 1px #000;
  977. }
  978. .print-template-two tr {
  979. line-height: 30px;
  980. }
  981. </style>