|
@@ -0,0 +1,85 @@
|
|
1
|
+<template>
|
|
2
|
+ <div class="main-contain">
|
|
3
|
+ <div class="position">
|
|
4
|
+ <bread-crumb :crumbs="crumbs"></bread-crumb>
|
|
5
|
+ <el-row style="float:right;">
|
|
6
|
+ <el-col :span="24">
|
|
7
|
+ <el-button size="small" icon="el-icon-printer" type="primary" @click="printAction">打印</el-button>
|
|
8
|
+ </el-col>
|
|
9
|
+ </el-row>
|
|
10
|
+ </div>
|
|
11
|
+ <div class="app-container" style="background-color: white;" v-show="show">
|
|
12
|
+ <div id="sign" class="signPrint">
|
|
13
|
+ <div style="display:flex;margin-bottom:10px;">
|
|
14
|
+ <div style="margin-left:15px;">
|
|
15
|
+ <div>C</div>
|
|
16
|
+ <div>09-15</div>
|
|
17
|
+ <div>09-15</div>
|
|
18
|
+ </div>
|
|
19
|
+ <div style="width:100px;">
|
|
20
|
+ <img src="" alt="">
|
|
21
|
+ </div>
|
|
22
|
+ </div>
|
|
23
|
+ <div>6821737912312983</div>
|
|
24
|
+ <div style="display:flex;">
|
|
25
|
+ <div style="padding-left:20px;">哈顺利到家啦收到了空间</div>
|
|
26
|
+ <div style="font-size:24px;">哈顺</div>
|
|
27
|
+ </div>
|
|
28
|
+ </div>
|
|
29
|
+ </div>
|
|
30
|
+ </div>
|
|
31
|
+</template>
|
|
32
|
+<script>
|
|
33
|
+import BreadCrumb from '@/xt_pages/components/bread-crumb'
|
|
34
|
+import { getSchedualDoctors } from '@/api/advice'
|
|
35
|
+import { parseTime } from '@/utils'
|
|
36
|
+import print from 'print-js'
|
|
37
|
+const moment = require('moment')
|
|
38
|
+export default {
|
|
39
|
+ components:{
|
|
40
|
+ BreadCrumb
|
|
41
|
+ },
|
|
42
|
+ data(){
|
|
43
|
+ return{
|
|
44
|
+ crumbs: [
|
|
45
|
+ { path: false, name: '标签打印' },
|
|
46
|
+ { path: false, name: '打印' }
|
|
47
|
+ ],
|
|
48
|
+ }
|
|
49
|
+ },
|
|
50
|
+ methods:{
|
|
51
|
+ printAction: function() {
|
|
52
|
+ const style = '@media print { .sign{width:960px;margin: 0 auto;text-align: center;border-collapse: collapse;}.order_title_panl {text-align: center;.main_title {font-size: 18px;line-height: 40px;font-weight: 500;}}.dialysisTable tr{padding: 10px 0;}.dialysisTable th {color: #000;padding: 0;margin: 0;height: 30px;}.dialysisTable tr td {padding: 12px 0;}.subadvice_content {text-align: left;padding-left: 25px !important;padding-right: 5px !important;}.advice_content {text-align: left;padding-left: 5px !important;padding-right: 5px !important;padding: 15px 5px !important;} }'
|
|
53
|
+
|
|
54
|
+ printJS({
|
|
55
|
+ printable: 'sign',
|
|
56
|
+ type: 'html',
|
|
57
|
+ documentTitle: ' ',
|
|
58
|
+ style: style,
|
|
59
|
+ scanStyles: false
|
|
60
|
+ })
|
|
61
|
+ },
|
|
62
|
+
|
|
63
|
+ },
|
|
64
|
+ created(){
|
|
65
|
+ }
|
|
66
|
+}
|
|
67
|
+</script>
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+<style rel="stylesheet/scss" lang="scss" scoped>
|
|
71
|
+.signPrint{
|
|
72
|
+ -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
|
|
73
|
+ -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
|
|
74
|
+ box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
|
|
75
|
+ margin-bottom: 20px;
|
|
76
|
+ padding: 20px 10px;
|
|
77
|
+}
|
|
78
|
+.sign{
|
|
79
|
+ width:960px;
|
|
80
|
+ margin: 0 auto;
|
|
81
|
+ text-align: center;
|
|
82
|
+ border-collapse: collapse;
|
|
83
|
+}
|
|
84
|
+</style>
|
|
85
|
+
|