dialysisPrintOrder.vue 52KB

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