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

coursePrint.vue 10.0KB

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