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

coursePrint.vue 12KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs='crumbs'></bread-crumb>
  5. <el-button :loading="loading" size="small" icon="el-icon-printer" @click="printAction" type="primary">打印
  6. </el-button>
  7. </div>
  8. <div class="app-container">
  9. <div id="print_content">
  10. <div class="print_page_main_content">
  11. <div class="order-yy-name">{{orgname}}</div>
  12. <div class="order_title" style="padding-top:12px;"> 病程记录</div>
  13. <div class="row" style="border-bottom:1px solid #000; display: flex;padding-bottom: 10px;padding-top: 12px;">
  14. <div style="flex:1;text-align: center;">
  15. 姓名:
  16. <div style="width: 120px;text-align: left;display:inline-block;">{{patient.name }}</div>
  17. </div>
  18. <div style="flex:1;text-align: center;">
  19. 科别:
  20. <div style="width: 120px;text-align: left;display:inline-block;">{{"血透中心"}}</div>
  21. </div>
  22. <div style="flex:1;text-align: center;" v-if="org_id == 9671 || org_id == 10215" >
  23. 病案号:
  24. <div style="width: 120px;text-align: left;display:inline-block;">
  25. {{patient.dialysis_no?patient.dialysis_no:"/"}}
  26. </div>
  27. </div>
  28. <div style="flex:1;text-align: center;" v-if="org_id!=10215 && org_id!=9671" >
  29. 透析号:
  30. <div style="width: 120px;text-align: left;display:inline-block;">
  31. {{patient.dialysis_no?patient.dialysis_no:"/"}}
  32. </div>
  33. </div>
  34. <div style="flex:1;text-align: center;" v-if="org_id!=10215 && org_id!=9671">
  35. 住院号:
  36. <div style="width: 100px;text-align: left;display:inline-block;">
  37. {{patient.admission_number?patient.admission_number:"/"}}
  38. </div>
  39. </div>
  40. </div>
  41. <div class="row" style="padding: 2px 0;line-height:24px;margin-top:10px;" v-for="(item,index) in this.record" :key="index">
  42. <div class="inline_block">
  43. <div>{{getTime(item.record_time,'{y}-{m}-{d} {h}:{i}')}}</div>
  44. </div>
  45. <div class="inline_block" style="margin-left: 30px">
  46. <div>{{item.title}}</div>
  47. </div>
  48. <div class="inline_block" style="width:100%; word-wrap: break-word; word-break: break-all;">
  49. <div v-html="item.content" class="printP">
  50. </div>
  51. </div>
  52. <div class="row" style="padding: 2px 0;line-height:24px;margin-top:10px;float:right" v-if="org_id == 0||org_id ==9671 || org_id == 10440 || org_id == 10131 || org_id==9970">
  53.  医生签名:
  54. <span v-if="setAdminUserES(item.recorder?item.recorder:item.recorder) == ''">
  55. {{getName(item.recorder)}}
  56. </span>
  57. <span v-else>
  58. <img style="height:30px;" :src="setAdminUserES(item.recorder?item.recorder:item.recorder)" alt="" srcset="">
  59. </span>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. </template>
  67. <script>
  68. import { jsGetAge, uParseTime } from '@/utils/tools'
  69. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  70. import { GetCoursePrintData } from '@/api/patient'
  71. export default {
  72. name: 'coursePrint',
  73. components: {
  74. BreadCrumb
  75. },
  76. data() {
  77. return {
  78. crumbs: [
  79. { path: false, name: '病人管理' },
  80. { path: false, name: '病程打印' }
  81. ],
  82. loading: false,
  83. orgname: '',
  84. record:[],
  85. patient: {},
  86. org_id:0,
  87. adminUserList:[],
  88. operators:[],
  89. operatorMaps: {},
  90. }
  91. },
  92. created() {
  93. var xtuser = this.$store.getters.xt_user
  94. this.org_id = this.$store.getters.xt_user.org_id
  95. this.orgname = xtuser.org.org_name
  96. },
  97. mounted() {
  98. this.loading = true
  99. var ids = this.$route.query.ids
  100. var patient_id = parseInt(this.$route.query.patient_id)
  101. var params = {
  102. ids:ids,
  103. patient_id:patient_id,
  104. }
  105. GetCoursePrintData(params).then(rs => {
  106. var resp = rs.data
  107. if (resp.state == 1) {
  108. this.record = resp.data.record
  109. this.patient = resp.data.patient
  110. this.adminUserList = resp.data.adminUser
  111. this.operators = resp.data.operators
  112. console.log("GetCoursePrintData",this.operators)
  113. if (this.operators.length > 0) {
  114. var operatorsLen = this.operators.length
  115. for (var index = 0; index < operatorsLen; index++) {
  116. this.$set(
  117. this.operatorMaps,
  118. this.operators[index].creator,
  119. this.operators[index]
  120. )
  121. }
  122. }
  123. console.log("operatorMaps",this.operatorMaps)
  124. this.loading = false
  125. } else {
  126. this.loading = false
  127. this.$message.error(resp.msg)
  128. }
  129. }).catch(err => {
  130. this.$message.error(err)
  131. })
  132. },
  133. methods: {
  134. printAction: function() {
  135. const style = '@media print {.printP div{margin-bottom:5px;} .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: 20px;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: 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-300 {margin-bottom:450px;}.margin-bottom-600 {margin-bottom:600px;}.margin-bottom-900 {margin-bottom:1000px;}.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;}'
  136. printJS({
  137. printable: 'print_content',
  138. type: 'html',
  139. documentTitle: ' ',
  140. style: style,
  141. scanStyles: false
  142. })
  143. },
  144. getTime(value, temp) {
  145. if (value != undefined) {
  146. return uParseTime(value, temp)
  147. }
  148. return ''
  149. },
  150. getName(admin_user_id){
  151. var name = ""
  152. for(let i=0;i<this.adminUserList.length;i++){
  153. if(this.adminUserList[i].id == admin_user_id){
  154. name = this.adminUserList[i].name
  155. }
  156. }
  157. return name
  158. },
  159. setAdminUserES(id) {
  160. if (id === 0) {
  161. return ''
  162. }
  163. if (id in this.operatorMaps) {
  164. return this.operatorMaps[id].url
  165. } else {
  166. return ''
  167. }
  168. },
  169. }
  170. }
  171. </script>
  172. <style scoped>
  173. .print_page_main_content {
  174. background-color: white;
  175. width: 960px;
  176. margin: 0 auto 50px;
  177. padding: 0 0 0 0;
  178. page-break-after: always;
  179. }
  180. .print_page_main_content .order-yy-name {
  181. margin: auto;
  182. text-align: center;
  183. font-size: 20px;
  184. letter-spacing: 5px;
  185. }
  186. .print_page_main_content .order_title {
  187. text-align: center;
  188. font-size: 23px;
  189. line-height: 40px;
  190. font-weight: 500;
  191. }
  192. .row {
  193. font-size: 14px;
  194. line-height: 20px;
  195. padding: 5px 0;
  196. }
  197. .inline_block {
  198. display: inline-block;
  199. }
  200. .under_line {
  201. display: inline-block;
  202. border-bottom: 1px solid #999;
  203. text-align: center;
  204. white-space: nowrap;
  205. width: 50%;
  206. }
  207. .under_line::before {
  208. content: "\00A0";
  209. }
  210. .under_line::after {
  211. content: "\00A0";
  212. }
  213. .under_line_two {
  214. display: inline-block;
  215. border-bottom: 1px solid #999;
  216. text-align: left;
  217. white-space: nowrap;
  218. width: 50%;
  219. }
  220. .under_line_two::before {
  221. content: "\00A0";
  222. }
  223. .under_line_two::after {
  224. content: "\00A0";
  225. }
  226. .flex {
  227. display: -webkit-box;
  228. display: -moz-box;
  229. display: -ms-flexbox;
  230. display: -webkit-flex;
  231. display: flex;
  232. align-items: center;
  233. -webkit-align-items: center;
  234. box-align: center;
  235. -moz-box-align: center;
  236. -webkit-box-align: center;
  237. text-align: center;
  238. -webkit-justify-content: space-between;
  239. justify-content: space-between;
  240. -moz-box-pack: space-between;
  241. -webkit--moz-box-pack: space-between;
  242. box-pack: space-between;
  243. }
  244. .print_page_main_content .proj_table {
  245. width: 100%;
  246. border: 1px solid;
  247. border-collapse: collapse;
  248. padding: 2px;
  249. }
  250. .print_page_main_content .proj_table tbody tr td {
  251. border: 1px solid;
  252. /* text-align: center; */
  253. font-size: 16px;
  254. padding: 6px 8px;
  255. line-height: 30px;
  256. }
  257. .print_page_main_content .proj_table .inside_table {
  258. width: 100%;
  259. border: hidden; /* 解决边框冲突 */
  260. border-collapse: collapse;
  261. }
  262. .print_page_main_content .proj_table .inside_table tr td {
  263. border: 1px solid;
  264. text-align: center;
  265. font-size: 14px;
  266. padding: 8px 5px;
  267. line-height: 16px;
  268. }
  269. .print-table-no {
  270. width: 100%;
  271. text-align: center;
  272. border-collapse: collapse;
  273. font-size: 14px;
  274. }
  275. .es-img {
  276. height: 30px;
  277. }
  278. .advice-name {
  279. text-align: left !important;
  280. line-height: 16px !important;
  281. }
  282. .advice-children {
  283. display: flex;
  284. }
  285. .margin-bottom-300 {
  286. margin-bottom:450px;
  287. }
  288. .margin-bottom-600 {
  289. margin-bottom:600px;
  290. }
  291. .margin-bottom-900 {
  292. margin-bottom:900px;
  293. }
  294. .print-yema{
  295. position: absolute;
  296. left: 50%;
  297. }
  298. .print-yema2{
  299. position: absolute;
  300. left: 50%;
  301. }
  302. .print-yema3{
  303. position: absolute;
  304. left: 50%;
  305. }
  306. .print-yema4{
  307. position: absolute;
  308. left: 50%;
  309. }
  310. .print-yema5{
  311. position: absolute;
  312. left: 50%;
  313. }
  314. .did_checke::after {content: "\221A";font-size: 8px;margin-left: 2px;margin-top: 2px;position: absolute;}
  315. .printP{
  316. line-height: 20px;
  317. font-weight: bold;
  318. }
  319. </style>