ProjectPrintModal.vue
1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<template>
<a-modal
:visible="visible"
:confirm-loading="confirmLoading"
@cancel="handleCancel"
width="50%"
>
<div>
<a-row>
<div class="noprint container" style="text-align:right; padding: 20px;float: right">
<a-button v-print="'#content2'" ghost type="primary" >打印</a-button>
</div>
</a-row>
<div id="content2" ref="orderForm1" style="text-align: center" >
<h1 class="center">{{projectName}}</h1>
<vue-qr :text="id" :size="650" :margin="0"></vue-qr>
</div>
</div>
<template slot="footer">
<a-button @click="handleCancel" v-show="false"></a-button>
</template>
</a-modal>
</template>
<script>
import VueQr from 'vue-qr'
import QRCode from "qrcodejs2";
export default {
name: 'ProjectPrintModal',
components: {
VueQr,
'barcode': QRCode
},
data() {
return {
confirmLoading: false,
visible: false,
loading: false,
dataSource: [],
titleSource:[],
id:'',
projectName:'',
ids: [],
}
},
methods: {
handleCancel(e) {
this.visible = false
},
open(id,projectName) {
this.visible = true
this.id=id;
this.projectName=projectName;
},
print() {
window.print()
},
doPrint() { //方法
},
}
}
</script>
<style scoped>
</style>