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

coursePrint.vue 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  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;">
  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;">
  29. 住院号:
  30. <div style="width: 100px;text-align: left;display:inline-block;">
  31. {{patient.admission_number?patient.admission_number:"/"}}
  32. </div>
  33. </div>
  34. </div>
  35. <div class="row" style="padding: 2px 0;line-height:24px;margin-top:10px;" v-for="(item,index) in this.record" :key="index">
  36. <div class="inline_block">
  37. <div>{{getTime(item.record_time,'{y}-{m}-{d} {h}:{i}')}}</div>
  38. </div>
  39. <div class="inline_block" style="margin-left: 30px">
  40. <div>{{item.title}}</div>
  41. </div>
  42. <div class="inline_block" style="width:100%;">
  43. <div v-html="item.content" class="printP">{{item.content}}</div>
  44. </div>
  45. </div>
  46. <!-- <div class="row" style="padding: 2px 0;line-height:24px;">
  47. <div class="inline_block" style="width:100%;">
  48. <div v-html="item.content" class="printP">{{item.content}}</div>
  49. </div>
  50. </div> -->
  51. </div>
  52. </div>
  53. </div>
  54. </div>
  55. </template>
  56. <script>
  57. import { jsGetAge, uParseTime } from '@/utils/tools'
  58. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  59. import { GetCoursePrintData } from '@/api/patient'
  60. export default {
  61. name: 'coursePrint',
  62. components: {
  63. BreadCrumb
  64. },
  65. data() {
  66. return {
  67. crumbs: [
  68. { path: false, name: '病人管理' },
  69. { path: false, name: '病程打印' }
  70. ],
  71. loading: false,
  72. orgname: '',
  73. record:[],
  74. patient: {}
  75. }
  76. },
  77. created() {
  78. var xtuser = this.$store.getters.xt_user
  79. this.orgname = xtuser.org.org_name
  80. },
  81. mounted() {
  82. this.loading = true
  83. var ids = this.$route.query.ids
  84. var patient_id = parseInt(this.$route.query.patient_id)
  85. var params = {
  86. ids:ids,
  87. patient_id:patient_id,
  88. }
  89. console.log("para2333223233223",params)
  90. GetCoursePrintData(params).then(rs => {
  91. var resp = rs.data
  92. if (resp.state == 1) {
  93. this.record = resp.data.record
  94. console.log("h2232323223",this.record)
  95. // for(let i=0;i<this.record.length;i++){
  96. // this.record[i].content = this.record[i].content.replace(new RegExp('<p>','g'),"<div>").replace(new RegExp('</p>','g'),"</div>")
  97. // }
  98. console.log("h2232323223",this.record)
  99. this.patient = resp.data.patient
  100. this.loading = false
  101. } else {
  102. this.loading = false
  103. this.$message.error(resp.msg)
  104. }
  105. }).catch(err => {
  106. this.$message.error(err)
  107. })
  108. },
  109. methods: {
  110. printAction: function() {
  111. 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;}'
  112. printJS({
  113. printable: 'print_content',
  114. type: 'html',
  115. documentTitle: ' ',
  116. style: style,
  117. scanStyles: false
  118. })
  119. }, getTime(value, temp) {
  120. if (value != undefined) {
  121. return uParseTime(value, temp)
  122. }
  123. return ''
  124. }
  125. }
  126. }
  127. </script>
  128. <style scoped>
  129. .print_page_main_content {
  130. background-color: white;
  131. width: 960px;
  132. margin: 0 auto 50px;
  133. padding: 0 0 0 0;
  134. page-break-after: always;
  135. }
  136. .print_page_main_content .order-yy-name {
  137. margin: auto;
  138. text-align: center;
  139. font-size: 20px;
  140. letter-spacing: 5px;
  141. }
  142. .print_page_main_content .order_title {
  143. text-align: center;
  144. font-size: 23px;
  145. line-height: 40px;
  146. font-weight: 500;
  147. }
  148. .row {
  149. font-size: 14px;
  150. line-height: 20px;
  151. padding: 5px 0;
  152. }
  153. .inline_block {
  154. display: inline-block;
  155. }
  156. .under_line {
  157. display: inline-block;
  158. border-bottom: 1px solid #999;
  159. text-align: center;
  160. white-space: nowrap;
  161. width: 50%;
  162. }
  163. .under_line::before {
  164. content: "\00A0";
  165. }
  166. .under_line::after {
  167. content: "\00A0";
  168. }
  169. .under_line_two {
  170. display: inline-block;
  171. border-bottom: 1px solid #999;
  172. text-align: left;
  173. white-space: nowrap;
  174. width: 50%;
  175. }
  176. .under_line_two::before {
  177. content: "\00A0";
  178. }
  179. .under_line_two::after {
  180. content: "\00A0";
  181. }
  182. .flex {
  183. display: -webkit-box;
  184. display: -moz-box;
  185. display: -ms-flexbox;
  186. display: -webkit-flex;
  187. display: flex;
  188. align-items: center;
  189. -webkit-align-items: center;
  190. box-align: center;
  191. -moz-box-align: center;
  192. -webkit-box-align: center;
  193. text-align: center;
  194. -webkit-justify-content: space-between;
  195. justify-content: space-between;
  196. -moz-box-pack: space-between;
  197. -webkit--moz-box-pack: space-between;
  198. box-pack: space-between;
  199. }
  200. .print_page_main_content .proj_table {
  201. width: 100%;
  202. border: 1px solid;
  203. border-collapse: collapse;
  204. padding: 2px;
  205. }
  206. .print_page_main_content .proj_table tbody tr td {
  207. border: 1px solid;
  208. /* text-align: center; */
  209. font-size: 16px;
  210. padding: 6px 8px;
  211. line-height: 30px;
  212. }
  213. .print_page_main_content .proj_table .inside_table {
  214. width: 100%;
  215. border: hidden; /* 解决边框冲突 */
  216. border-collapse: collapse;
  217. }
  218. .print_page_main_content .proj_table .inside_table tr td {
  219. border: 1px solid;
  220. text-align: center;
  221. font-size: 14px;
  222. padding: 8px 5px;
  223. line-height: 16px;
  224. }
  225. .print-table-no {
  226. width: 100%;
  227. text-align: center;
  228. border-collapse: collapse;
  229. font-size: 14px;
  230. }
  231. .es-img {
  232. height: 30px;
  233. }
  234. .advice-name {
  235. text-align: left !important;
  236. line-height: 16px !important;
  237. }
  238. .advice-children {
  239. display: flex;
  240. }
  241. .margin-bottom-300 {
  242. margin-bottom:450px;
  243. }
  244. .margin-bottom-600 {
  245. margin-bottom:600px;
  246. }
  247. .margin-bottom-900 {
  248. margin-bottom:900px;
  249. }
  250. .print-yema{
  251. position: absolute;
  252. left: 50%;
  253. }
  254. .print-yema2{
  255. position: absolute;
  256. left: 50%;
  257. }
  258. .print-yema3{
  259. position: absolute;
  260. left: 50%;
  261. }
  262. .print-yema4{
  263. position: absolute;
  264. left: 50%;
  265. }
  266. .print-yema5{
  267. position: absolute;
  268. left: 50%;
  269. }
  270. .did_checke::after {content: "\221A";font-size: 8px;margin-left: 2px;margin-top: 2px;position: absolute;}
  271. .printP{
  272. line-height: 20px;
  273. font-weight: bold;
  274. }
  275. </style>