|
|
|
|
@ -3,7 +3,7 @@
|
|
|
|
|
<div class="box" ref="box">
|
|
|
|
|
<div class="container" ref="container" :style="transform">
|
|
|
|
|
<div class="no">
|
|
|
|
|
序列号:{{ info.bianma }}
|
|
|
|
|
序列号:{{ info.shouquanshubianhao }}
|
|
|
|
|
</div>
|
|
|
|
|
<div class="qrcode">
|
|
|
|
|
<div ref="qrcode"></div>
|
|
|
|
|
@ -15,7 +15,10 @@
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="text">
|
|
|
|
|
兹有 <span>{{ info.name }}</span> (身份证号: <span>{{ info.idcard }}</span> )经苏州州市总工会审核评定为{{ new Date().getFullYear() }}年度苏州市总工会 <span>{{ type.get(info.kunnanleixing) }}家庭</span> 。
|
|
|
|
|
兹有<span>{{ info.name }}</span>(身份证号:<span>{{ info.idcard }}</span>)经苏州州市总工会审核评定为{{ new Date().getFullYear() }}年度苏州市总工会<span>{{ info.kunnanleixing }}家庭</span> 。
|
|
|
|
|
<template v-if="showChild">
|
|
|
|
|
<span>{{ printChild.name }}</span>(身份证号码:<span>{{ printChild.idcard }}</span>)系其家庭成员。
|
|
|
|
|
</template>
|
|
|
|
|
<br>
|
|
|
|
|
<p>特此证明!</p>
|
|
|
|
|
|
|
|
|
|
@ -23,6 +26,8 @@
|
|
|
|
|
<p>苏州市总工会权益保障部</p>
|
|
|
|
|
<p>{{ $moment(new Date()).format('YYYY年M月DD日') }}</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<img class="seal" :src="require('@/assets/seal.png')" alt="">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@ -47,6 +52,7 @@ export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
info: {},
|
|
|
|
|
printChild: {},
|
|
|
|
|
container: {
|
|
|
|
|
w: 0,
|
|
|
|
|
h: 0,
|
|
|
|
|
@ -144,7 +150,7 @@ export default {
|
|
|
|
|
download () {
|
|
|
|
|
this.isToImg = true;
|
|
|
|
|
html2canvas(this.$refs['container'],{
|
|
|
|
|
backgroundColor: null,
|
|
|
|
|
backgroundColor: '#ffffff',
|
|
|
|
|
allowTaint: false,
|
|
|
|
|
taintTest: false,
|
|
|
|
|
logging: false,
|
|
|
|
|
@ -176,7 +182,14 @@ export default {
|
|
|
|
|
// delete page;
|
|
|
|
|
}
|
|
|
|
|
// 保存文件
|
|
|
|
|
pdf.save(`困难职工证明-${this.info.name}.pdf`);
|
|
|
|
|
//pdf.save(`困难职工证明-${this.info.name}.pdf`);
|
|
|
|
|
let file = pdf.output('blob',{
|
|
|
|
|
filename: `困难职工证明-${this.info.name}.pdf`
|
|
|
|
|
})
|
|
|
|
|
let a = document.createElement('a');
|
|
|
|
|
a.href = URL.createObjectURL(file);
|
|
|
|
|
a.download = `困难职工证明-${this.info.name}.pdf`;
|
|
|
|
|
a.click();
|
|
|
|
|
}).catch(err => {
|
|
|
|
|
this.isToImg = false;
|
|
|
|
|
})
|
|
|
|
|
@ -204,6 +217,11 @@ export default {
|
|
|
|
|
type: window.atob(this.$route.query.isChild) == 0 ? 1 : 2
|
|
|
|
|
})
|
|
|
|
|
}).catch(err => this.isToImg = true)
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
getPrintChild (childrens) {
|
|
|
|
|
const childId = window.atob(this.$route.query.isChild);
|
|
|
|
|
this.printChild = childrens.find(i => i.id == childId);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
|
|
|
|
@ -213,6 +231,9 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
isReduction () {
|
|
|
|
|
return this.container.offsetX !== 0 || this.container.offsetY !== 0 || this.container.scale !== 1
|
|
|
|
|
},
|
|
|
|
|
showChild () {
|
|
|
|
|
return window.atob(this.$route.query.isChild) != 0
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
@ -231,6 +252,7 @@ export default {
|
|
|
|
|
console.log(res)
|
|
|
|
|
this.info = res.user;
|
|
|
|
|
|
|
|
|
|
this.getPrintChild(res.childrens);
|
|
|
|
|
this.init();
|
|
|
|
|
this.creatQrCode();
|
|
|
|
|
})
|
|
|
|
|
@ -253,7 +275,7 @@ export default {
|
|
|
|
|
height: 100vh;
|
|
|
|
|
max-width: 600px;
|
|
|
|
|
max-height: 800px;
|
|
|
|
|
background: #fff;
|
|
|
|
|
background: #eee;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
|
|
margin: auto;
|
|
|
|
|
@ -261,6 +283,7 @@ export default {
|
|
|
|
|
.container {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
background: #fff;
|
|
|
|
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
|
|
@ -305,7 +328,8 @@ export default {
|
|
|
|
|
top: 36%;
|
|
|
|
|
padding: 0 5em;
|
|
|
|
|
text-indent: 2em;
|
|
|
|
|
line-height: 3;
|
|
|
|
|
line-height: 2.8;
|
|
|
|
|
word-break: keep-all;
|
|
|
|
|
|
|
|
|
|
& > span {
|
|
|
|
|
text-decoration: underline;
|
|
|
|
|
@ -319,6 +343,15 @@ export default {
|
|
|
|
|
padding-top: 2em;
|
|
|
|
|
padding-right: 1em;
|
|
|
|
|
}
|
|
|
|
|
.seal {
|
|
|
|
|
right: 14%;
|
|
|
|
|
width: 9vw;
|
|
|
|
|
min-width: 55px;
|
|
|
|
|
object-fit: cover;
|
|
|
|
|
filter: saturate(5);
|
|
|
|
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.reduction {
|
|
|
|
|
|