|
@@ -245,9 +245,23 @@
|
245
|
245
|
title="打印"
|
246
|
246
|
:visible.sync="innerVisible"
|
247
|
247
|
append-to-body>
|
248
|
|
- <print ref="print" v-if="selecting_schs1.length > 0" :paramsObj='paramsObj'></print>
|
249
|
|
- <treatPrint ref="treatPrint" v-if="selecting_schs2.length > 0" :paramsObj='paramsObj2'></treatPrint>
|
250
|
|
- <checkPrint ref="checkPrint" v-if="selecting_schs3.length > 0" :paramsObj='paramsObj3'></checkPrint>
|
|
248
|
+ <template>
|
|
249
|
+ <el-button
|
|
250
|
+ style="float:right;"
|
|
251
|
+ :loading="loading"
|
|
252
|
+ size="small"
|
|
253
|
+ icon="el-icon-printer"
|
|
254
|
+ @click="printThisPage"
|
|
255
|
+ type="primary"
|
|
256
|
+ >打印</el-button
|
|
257
|
+ >
|
|
258
|
+ </template>
|
|
259
|
+ <div id='printMain'>
|
|
260
|
+ <print ref="print" v-if="selecting_schs1.length > 0" :paramsObj='paramsObj'></print>
|
|
261
|
+ <treatPrint ref="treatPrint" v-if="selecting_schs2.length > 0" :paramsObj='paramsObj2'></treatPrint>
|
|
262
|
+ <checkPrint ref="checkPrint" v-if="selecting_schs3.length > 0" :paramsObj='paramsObj3'></checkPrint>
|
|
263
|
+ </div>
|
|
264
|
+
|
251
|
265
|
</el-dialog>
|
252
|
266
|
<span slot="footer" class="dialog-footer">
|
253
|
267
|
<el-button @click="centerDialogVisible = false">取 消</el-button>
|
|
@@ -383,11 +397,20 @@
|
383
|
397
|
this.getPrescriptionList(this.patientInfo.id)
|
384
|
398
|
},
|
385
|
399
|
printThisPage(){
|
386
|
|
- this.$nextTick(() => {
|
387
|
|
- this.$refs.print.printThisPage()
|
388
|
|
- this.$refs.treatPrint.printThisPage()
|
389
|
|
- this.$refs.checkPrint.printThisPage()
|
390
|
|
- })
|
|
400
|
+ const style =
|
|
401
|
+ '@media print {#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;margin-top:10px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:350px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}@media print {html {zoom: 90%;}}#prescription-print{font-size:14px;border:1px solid white}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;margin-top:10px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:350px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}@media print {html {zoom: 90%;}}}';
|
|
402
|
+ printJS({
|
|
403
|
+ printable: "printMain",
|
|
404
|
+ type: "html",
|
|
405
|
+ style: style,
|
|
406
|
+ scanStyles: false
|
|
407
|
+ });
|
|
408
|
+ this.innerVisible = false
|
|
409
|
+ // this.$nextTick(() => {
|
|
410
|
+ // this.$refs.print.printThisPage()
|
|
411
|
+ // this.$refs.treatPrint.printThisPage()
|
|
412
|
+ // this.$refs.checkPrint.printThisPage()
|
|
413
|
+ // })
|
391
|
414
|
},
|
392
|
415
|
changeOther(patient_id){
|
393
|
416
|
this.radio = 2;
|