XMLWAN 3 лет назад
Родитель
Сommit
52bf4d49dc
1 измененных файлов: 554 добавлений и 0 удалений
  1. 554 0
      src/xt_pages/user/hospitalSummaryPrint.vue

+ 554 - 0
src/xt_pages/user/hospitalSummaryPrint.vue Просмотреть файл

@@ -0,0 +1,554 @@
1
+<template>
2
+<div>
3
+  <div style="float:right">
4
+    <el-button type="primary" size="small" @click="printThisPage">打印</el-button> 
5
+  </div>
6
+  <div id="dialysis-print-box">
7
+    <div class="dialysis-print-order">
8
+      <div class="order-yy-name"></div>
9
+      <div class="order-title">{{ orgname }}出院小结</div>
10
+      <div>
11
+        <table class="print-table" border="1" style="margin-top: 10px;">
12
+          <tr>
13
+            <td style="text-align:center;width:170px" colspan="1">
14
+              姓名:
15
+            </td>
16
+             <td style="text-align:center;width:170px" colspan="1">
17
+              <span style="display:inline-block;margin-left:10px;">
18
+               {{patient.name}}
19
+              </span>
20
+            </td>
21
+            <td style="text-align:center;" colspan="1">
22
+              性别:
23
+            </td>
24
+             <td style="text-align:center;" colspan="1">
25
+              <span style="display:inline-block;margin-left:10px;">
26
+                <span v-if="patient.gender == 1">男</span>
27
+                <span v-if="patient.gender == 2">女</span>
28
+              </span>
29
+            </td>
30
+            <td style="text-align:center;" colspan="1">
31
+              年龄:
32
+            </td>
33
+            <td style="text-align:center;" colspan="1">
34
+              <span style="display:inline-block;margin-left:10px;">
35
+               
36
+              </span>
37
+            </td>
38
+            <td style="text-align:center;" colspan="1">
39
+              婚姻:
40
+            </td>
41
+             <td style="text-align:center;" colspan="1">
42
+              <span style="display:inline-block;margin-left:10px;">
43
+               
44
+              </span>
45
+            </td>
46
+             <td style="text-align:center;" colspan="1">
47
+              职业:
48
+            </td>
49
+             <td style="text-align:center;" colspan="1">
50
+              <span style="display:inline-block;margin-left:10px;">
51
+               
52
+              </span>
53
+            </td>
54
+             <td style="text-align:center;" colspan="1">
55
+              电话:
56
+            </td>
57
+             <td style="text-align:center;" colspan="1">
58
+              <span style="display:inline-block;margin-left:10px;">
59
+               
60
+              </span>
61
+            </td>
62
+          </tr>
63
+          <tr>
64
+            <td style="text-align:center;" colspan="1">
65
+              入院时间:
66
+            </td>   
67
+            <td style="text-align:center;" colspan="11">
68
+            
69
+              <span style="display:inline-block;margin-left:10px;">
70
+               
71
+              </span>
72
+            </td>   
73
+          </tr>
74
+          <tr>
75
+            <td style="text-align:center;width:170px" colspan="2">
76
+              出院时间:
77
+            </td>
78
+            <td style="text-align:center;width:170px" colspan="2">
79
+              <span style="display:inline-block;margin-left:10px;">
80
+               
81
+              </span>
82
+            </td>
83
+            <td style="text-align:center;" colspan="2">
84
+              住院天数:
85
+            </td>
86
+            <td style="text-align:center;" colspan="2">
87
+              <span style="display:inline-block;margin-left:10px;">
88
+              
89
+              </span>
90
+            </td>
91
+            <td style="text-align:center;" colspan="2">
92
+              转归:
93
+            
94
+            </td>
95
+            <td style="text-align:center;" colspan="2">
96
+              <span style="display:inline-block;margin-left:10px;">
97
+               
98
+              </span>
99
+            </td>
100
+            
101
+          </tr>
102
+          <tr>
103
+            <td style="text-align:center;width:170px" colspan="1">
104
+              检查号:
105
+            </td>
106
+             <td style="text-align:center;" colspan="1">
107
+              <span style="display:inline-block;margin-left:10px;">
108
+              
109
+              </span>
110
+            </td>
111
+            <td style="text-align:center;" colspan="1">
112
+              X线:
113
+            </td>
114
+            <td style="text-align:center;" colspan="1">
115
+              <span style="display:inline-block;margin-left:10px;">
116
+              
117
+              </span>
118
+            </td>
119
+            <td style="text-align:center;" colspan="1">
120
+              CT:
121
+            </td>
122
+            <td style="text-align:center;" colspan="1">
123
+              <span style="display:inline-block;margin-left:10px;">
124
+               
125
+              </span>
126
+            </td>
127
+            <td style="text-align:center;" colspan="1">
128
+              MRI:
129
+            </td>
130
+             <td style="text-align:center;" colspan="1">
131
+              <span style="display:inline-block;margin-left:10px;">
132
+               
133
+              </span>
134
+            </td>
135
+             <td style="text-align:center;" colspan="1">
136
+              超声:
137
+            </td>
138
+             <td style="text-align:center;" colspan="1">
139
+              <span style="display:inline-block;margin-left:10px;">
140
+               
141
+              </span>
142
+            </td>
143
+             <td style="text-align:center;" colspan="1">
144
+              病理:
145
+            </td>
146
+             <td style="text-align:center;" colspan="1">
147
+              <span style="display:inline-block;margin-left:10px;">
148
+               
149
+              </span>
150
+            </td>
151
+          </tr>
152
+          <tr>
153
+            <td style="text-align:center;" colspan="1">
154
+              入院时间:
155
+              <span style="display:inline-block;margin-left:10px;">
156
+               
157
+              </span>
158
+            </td>   
159
+            <td style="text-align:center;" colspan="11">
160
+              <span style="display:inline-block;margin-left:10px;">
161
+               
162
+              </span>
163
+            </td>   
164
+          </tr>
165
+          <tr>
166
+            <td style="text-align:center;width:170px" colspan="1">
167
+              入院诊断:
168
+              <span style="display:inline-block;margin-left:10px;">
169
+               
170
+              </span>
171
+            </td>
172
+             <td style="text-align:center;width:170px" colspan="11">
173
+              入院诊断:
174
+              <span style="display:inline-block;margin-left:10px;">
175
+               
176
+              </span>
177
+            </td>
178
+            
179
+          </tr>
180
+           <tr>
181
+            <td style="text-align:center;width:170px" colspan="1">
182
+              出院诊断:
183
+            </td>
184
+           <td style="text-align:center;width:170px" colspan="11">
185
+            
186
+              <span style="display:inline-block;margin-left:10px;">
187
+               
188
+              </span>
189
+            </td>
190
+            
191
+          </tr>
192
+           <tr>
193
+            <td style="text-align:center;width:170px" colspan="1">
194
+              入院时病情:
195
+             
196
+            </td>
197
+            <td style="text-align:center;width:170px" colspan="11">
198
+              <span style="display:inline-block;margin-left:10px;">
199
+               
200
+              </span>
201
+            </td>
202
+            
203
+          </tr>
204
+          <tr>
205
+            <td style="text-align:center;width:170px" colspan="1">
206
+              诊断经过:
207
+           
208
+            </td>
209
+            <td style="text-align:center;width:170px" colspan="11">
210
+              <span style="display:inline-block;margin-left:10px;">
211
+               
212
+              </span>
213
+            </td>
214
+            
215
+          </tr>
216
+          <tr>
217
+            <td style="text-align:center;width:170px" colspan="1">
218
+              出院时病情:
219
+              <span style="display:inline-block;margin-left:10px;">
220
+               
221
+              </span>
222
+            </td>
223
+            <td style="text-align:center;width:170px" colspan="11">
224
+            
225
+              <span style="display:inline-block;margin-left:10px;">
226
+               
227
+              </span>
228
+            </td>
229
+          
230
+            
231
+          </tr>
232
+          <tr>
233
+            <td style="text-align:center;width:170px" colspan="1">
234
+              出院医嘱:
235
+              <span style="display:inline-block;margin-left:10px;">
236
+               
237
+              </span>
238
+            </td>
239
+            <td style="text-align:center;width:170px" colspan="11">
240
+              出院医嘱:
241
+              <span style="display:inline-block;margin-left:10px;">
242
+               
243
+              </span>
244
+            </td>
245
+            
246
+          </tr>
247
+          <tr>
248
+            <td style="text-align:center;width:170px" colspan="4">
249
+              <span style="display:inline-block;margin-left:10px;">
250
+               
251
+              </span>
252
+            </td>
253
+            <td style="text-align:center;width:170px" colspan="2">
254
+              上级签名:
255
+              <span style="display:inline-block;margin-left:10px;">
256
+               
257
+              </span>
258
+            </td>
259
+            <td style="text-align:center;width:170px" colspan="2">
260
+              <span style="display:inline-block;margin-left:10px;">
261
+               
262
+              </span>
263
+            </td>
264
+           <td style="text-align:center;width:170px" colspan="2">
265
+              住院医师签名:
266
+            </td>
267
+             <td style="text-align:center;width:170px" colspan="2">
268
+             
269
+              <span style="display:inline-block;margin-left:10px;">
270
+               
271
+              </span>
272
+            </td>
273
+          </tr>
274
+        </table>
275
+     </div>
276
+     
277
+    
278
+  
279
+   
280
+    </div>
281
+    </div>
282
+</div>
283
+</template>
284
+
285
+<script>
286
+import { jsGetAge, uParseTime } from '@/utils/tools'
287
+import LabelBox from '../dialysis/printItem/LabelBox'
288
+import CheckBox from '../dialysis/batch_print/option_check_box'
289
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
290
+import {getHospitalSummaryDetail} from "@/api/patient"
291
+  import { getAllDoctorList } from "@/api/device"
292
+export default {
293
+  name: 'dialysisPrintOrderOne',
294
+  components: {
295
+    LabelBox,
296
+    BreadCrumb,
297
+    CheckBox
298
+  },
299
+  data() {
300
+    return {
301
+      crumbs: [
302
+        { path: false, name: '透析管理' },
303
+        { path: false, name: '打印单' }
304
+      ],
305
+     hosDetail:{},
306
+     patient:{},
307
+     doctorList:[],
308
+    }
309
+  },
310
+  methods: {
311
+    getDatge(value) {
312
+      var times = Date.parse(value) / 1000
313
+      var timestr = uParseTime(times, '{y}年{m}月{d}日')
314
+      return timestr
315
+    },
316
+    getTime(value, temp) {
317
+      if (value == 0) {
318
+        return ''
319
+      }
320
+      if (value != undefined) {
321
+        return uParseTime(value, temp)
322
+      }
323
+      return ''
324
+    },
325
+   
326
+    printThisPage() {
327
+        var ptime = Math.round(new Date().getTime() / 1000)
328
+        this.print_time = uParseTime(ptime, '{y}-{m}-{d} {h}:{i}')
329
+        const style ='@media print {.dialysis-print-order{width:960px;margin:0 auto;letter-spacing:5px} .dialysis-print-order p{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;font-weight: bold;margin: 10px 0;}'
330
+        printJS({
331
+            printable: 'dialysis-print-box',
332
+            type: 'html',
333
+            style: style,
334
+            scanStyles: false
335
+        })
336
+      
337
+    },
338
+  
339
+    getAge: function(val) {
340
+      if (val.birthday != 0) {
341
+        return jsGetAge(val.birth, '-')
342
+      } else {
343
+        return ''
344
+      }
345
+    },
346
+  
347
+    getNewAge(UUserCard) {
348
+      if (UUserCard != null && UUserCard != '') {
349
+        // 获取年龄
350
+        var myDate = new Date()
351
+        var month = myDate.getMonth() + 1
352
+        var day = myDate.getDate()
353
+        var age = myDate.getFullYear() - UUserCard.substring(6, 10) - 1
354
+        if (UUserCard.substring(10, 12) < month || UUserCard.substring(10, 12) == month && UUserCard.substring(12, 14) <= day) {
355
+          age++
356
+        }
357
+        return age
358
+      }
359
+    },
360
+    getHospitalSummaryDetail(id){
361
+        getHospitalSummaryDetail(id).then(response=>{
362
+           if(response.data.state == 1){
363
+             var detail = response.data.data.detail
364
+             this.hosDetail = detail
365
+           }
366
+        })
367
+    },
368
+    getlist(){
369
+       var params = {
370
+         patient_id:parseInt(this.$route.query.patient_id),
371
+       }
372
+       console.log("param223322322323",params)
373
+      getPatientInfo(params).then(response=>{
374
+         if(response.data.state == 1){
375
+           var patient = response.data.data.patient
376
+           this.patient = patient
377
+         }
378
+      })
379
+    },
380
+    getAllDoctorList(){
381
+      getAllDoctorList().then(response=>{
382
+        if(response.data.state == 1){
383
+        var list = response.data.data.list
384
+        this.doctorList = list
385
+        }
386
+       })
387
+     },
388
+  },
389
+ 
390
+  created() {
391
+    var xtuser = this.$store.getters.xt_user
392
+    this.orgname = xtuser.org.org_name
393
+    var id = this.$route.query.id
394
+    this.getlist()
395
+    this.getHospitalSummaryDetail(id)
396
+    this.getAllDoctorList()
397
+    
398
+  }
399
+}
400
+</script>
401
+
402
+<style>
403
+.borderBox  p{
404
+  font-weight: bold;
405
+  margin: 10px 0;
406
+}
407
+.dialysis-print-order {
408
+  width: 960px;
409
+  margin: 0 auto;
410
+}
411
+
412
+.dialysis-print-order .order-yy-name {
413
+  margin: auto;
414
+  text-align: center;
415
+  font-size: 20px;
416
+  letter-spacing: 5px;
417
+}
418
+
419
+.dialysis-print-order .order-title {
420
+  margin: auto;
421
+  font-weight: 600;
422
+  text-align: center;
423
+  font-size: 22px;
424
+  padding: 10px 20px 20px 20px;
425
+}
426
+
427
+.dialysis-print-order .table-box {
428
+  width: 100%;
429
+  line-height: 23px;
430
+  font-size: 14px;
431
+}
432
+
433
+.dialysis-print-order .print-table {
434
+  width: 100%;
435
+  text-align: center;
436
+  border-collapse: collapse;
437
+  line-height: 40px;
438
+  font-size: 14px;
439
+}
440
+
441
+.dialysis-print-order .print-table-no {
442
+  width: 100%;
443
+  text-align: center;
444
+  border-collapse: collapse;
445
+  font-size: 14px;
446
+}
447
+
448
+.dialysis-print-order .under-line {
449
+  border-bottom: 1px solid #999;
450
+  width: 95%;
451
+  text-align: center;
452
+  margin-left: 2px;
453
+}
454
+
455
+.dialysis-print-order .title-box {
456
+  text-align: center;
457
+  font-size: 16px;
458
+}
459
+
460
+.dialysis-print-order .radio-lebel-box {
461
+  font-weight: 400;
462
+  cursor: pointer;
463
+}
464
+
465
+.dialysis-print-order .radio-no {
466
+  opacity: 0;
467
+  outline: none;
468
+  position: absolute;
469
+  margin: 0;
470
+  width: 0;
471
+  height: 0;
472
+  z-index: -1;
473
+}
474
+
475
+.dialysis-print-order .radio-inner {
476
+  white-space: nowrap;
477
+  cursor: pointer;
478
+  outline: none;
479
+  display: inline-block;
480
+  line-height: 1;
481
+  position: relative;
482
+  vertical-align: middle;
483
+}
484
+
485
+.dialysis-print-order .radio-fang {
486
+  display: inline-block;
487
+  position: relative;
488
+  border: 1px solid #000;
489
+  box-sizing: border-box;
490
+  width: 14px;
491
+  height: 14px;
492
+  background-color: #fff;
493
+  z-index: 1;
494
+  transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
495
+    background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
496
+}
497
+
498
+.dialysis-print-order .is-checked-radio::after {
499
+  content: "√";
500
+  font-size: 15px;
501
+}
502
+
503
+.dialysis-print-order .print-table-no tr td {
504
+  padding: 8px 5px;
505
+  line-height: 25px;
506
+}
507
+
508
+.dialysis-print-order .print-table tr td {
509
+  padding: 1px 1px;
510
+  /*line-height: 25px;*/
511
+}
512
+
513
+.es-img {
514
+  height: 25px;
515
+}
516
+
517
+.advice-name {
518
+  text-align: left;
519
+}
520
+
521
+.advice-children {
522
+  display: flex;
523
+}
524
+
525
+.title-box-pro {
526
+  border: 0 #fff;
527
+  line-height: 25px;
528
+  height: 25px;
529
+  text-align: left;
530
+  padding-left: 10px !important;
531
+}
532
+.title-box-pro-tr {
533
+  border: 0 #fff;
534
+}
535
+.text-align-left {
536
+  text-align: left !important;
537
+  padding-left: 10px !important;
538
+  font-size: 14px !important;
539
+  line-height: 25px;
540
+}
541
+.print-table-tr-new td {
542
+  line-height: 20px !important;
543
+}
544
+.border-top-solid {
545
+  border: solid 1px #000;
546
+}
547
+.print-template-two tr {
548
+  line-height: 30px;
549
+}
550
+.parent {
551
+  text-align: left;
552
+  padding-left: 20px !important;
553
+}
554
+</style>