血透系统PC前端

dialysisPrintOrder.vue 44KB

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