|
@@ -41,8 +41,8 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div style="position:fixed;">
|
|
|
- <!-- top:-1200px;left:-1800px -->
|
|
|
+ <div style="position:fixed;top:-1200px;left:-1800px">
|
|
|
+ <!-- -->
|
|
|
<div id="pdfDomm" ref="posterWrap">
|
|
|
<!-- <div class="proBox">
|
|
|
<img class="proBox-img z01" :src="data.backurl">
|
|
@@ -90,7 +90,7 @@
|
|
|
<p class="foot-p-cert ">{{data.certId}}</p>
|
|
|
<p class="foot-p-date ">{{data.issueDate}}</p>
|
|
|
</div>
|
|
|
- <div class="content z10" style="position: absolute;left: 450px;width: 230px;top: 85px;font-size: 19px;line-height: 30px;text-indent: 2em;">
|
|
|
+ <div class="content z10" style="position: relative;left: 282px;width: 340px;top: 50px;font-size: 19px;line-height: 30px;text-indent: 2em;display:inline-block">
|
|
|
<p style="margin:0">
|
|
|
持证人参加了<span class="heiti" style="margin: 0 15px;font-size: 19px;">{{data.certName}}</span>,已修完教学计划规定的全部课程,合计<span class="heiti" style="margin: 0 15px;font-size: 20px;">{{data.courseHours}}</span>学时。
|
|
|
</p>
|
|
@@ -329,25 +329,28 @@ export default {
|
|
|
makeHtml() {
|
|
|
// js写html代码
|
|
|
const e = document.getElementById('pdfDomm')
|
|
|
- this.word = `<div class="proBox" >
|
|
|
+ this.word = `<div class="proBox" style="position: relative;width: 750px;height: 525px;">
|
|
|
<img class="proBox-img z01" src="${window.location.origin}${this.data.backurl}" />
|
|
|
<div class="con z10" style="width: 64px; height: 83px;overflow: hidden;text-indent: 0;padding-right: 0;top: 144px;left: 183px;">
|
|
|
<img src="${window.location.origin}${this.data.headurl}" style="height:100%;position: absolute;left: 50%;transform: translate(-50%, -50%);top: 50%;" />
|
|
|
</div>
|
|
|
- <div class="foot-pp z10">
|
|
|
- <p class="foot-p-name ">${this.data.uesrName}</p>
|
|
|
- <p class="foot-p-ID ">${this.data.userId}</p>
|
|
|
- <p class="foot-p-cert ">${this.data.certId}</p>
|
|
|
- <p class="foot-p-date ">${this.data.issueDate}</p>
|
|
|
+ <div class="foot-pp z10 f16">
|
|
|
+ <p class="foot-p-name kaiti">${this.data.uesrName}</p>
|
|
|
+ <p class="foot-p-ID kaiti">${this.data.userId}</p>
|
|
|
+ <p class="foot-p-cert kaiti">${this.data.certId}</p>
|
|
|
+ <p class="foot-p-date kaiti">${this.data.issueDate}</p>
|
|
|
</div>
|
|
|
- <div class="content z10" style="position: absolute;left: 525px;width: 355px;top: 185px;font-size: 19px;line-height: 30px;text-indent: 2em;">
|
|
|
- <p style="margin:0">
|
|
|
- 持证人参加了<span class="heiti" style="margin: 0 15px;font-size: 19px;">${this.data.certName}</span>,已修完教学计划规定的全部课程,合计<span class="heiti" style="margin: 0 15px;font-size: 20px;">${this.data.courseHours}</span>学时。
|
|
|
+ <div class="content z10" style="padding:0;position: relative;left: 455px;width: 330px;top: 110px;font-size: 19px;line-height: 32px;text-indent: 2em;display:inline-block">
|
|
|
+ <p style="margin:0" class="f19 kaiti">
|
|
|
+ 持证人参加了<span class="heiti" style="margin: 0 15px;font-size: 19px;">${this.data.certName}</span>,已修完教学计划规定的全部课程,合计<span class="heiti f20" style="margin: 0 15px;font-size: 20px;">${this.data.courseHours}</span>学时。
|
|
|
</p>
|
|
|
- <p style="margin:0">考核合格,准予结业,特发此证。</p>
|
|
|
+ <p style="margin:0" class="f19 kaiti">考核合格,准予结业,特发此证。</p>
|
|
|
</div>
|
|
|
</div>`
|
|
|
e.innerHTML = this.word
|
|
|
+ this.returnFont('.f20',20)
|
|
|
+ this.returnFont('.f19',19)
|
|
|
+ this.returnFont('.f16',16)
|
|
|
},
|
|
|
toIndex(){
|
|
|
this.$router.push('/certInquire')
|
|
@@ -377,6 +380,23 @@ export default {
|
|
|
this.userName= ''
|
|
|
this.certNumber=''
|
|
|
this.code= ''
|
|
|
+ },
|
|
|
+ returnFont(str,num){
|
|
|
+ const el = document.querySelectorAll(str)
|
|
|
+ const originRootFontSize = parseFloat(window.getComputedStyle(document.documentElement, null).getPropertyValue('font-size'));
|
|
|
+ let a;
|
|
|
+ if(originRootFontSize != 16){
|
|
|
+ a = (16/originRootFontSize)*num
|
|
|
+ }else{
|
|
|
+ a = num
|
|
|
+ }
|
|
|
+ // const realSize = num
|
|
|
+ // let scaleFactor = realSize / originRootFontSize;
|
|
|
+ // el.style.fontSize = originRootFontSize * scaleFactor + 'px';
|
|
|
+ console.log(a,originRootFontSize,1)
|
|
|
+ el.forEach(item=>{
|
|
|
+ item.style.fontSize = a + 'px';
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -499,7 +519,7 @@ export default {
|
|
|
margin: 0 auto;
|
|
|
position: relative;
|
|
|
color: #000;
|
|
|
- font-family: 楷体;
|
|
|
+ font-family: 'kaitizxc';
|
|
|
font-size: 16px;
|
|
|
}
|
|
|
|
|
@@ -510,7 +530,9 @@ export default {
|
|
|
top: 0;
|
|
|
left: 0;
|
|
|
}
|
|
|
-
|
|
|
+.kaiti{
|
|
|
+ font-family: 'kaitizxc';
|
|
|
+}
|
|
|
|
|
|
|
|
|
.tit {
|
|
@@ -521,7 +543,7 @@ export default {
|
|
|
top: -6px;
|
|
|
left: 8px;
|
|
|
letter-spacing: 2px;
|
|
|
- font-family: STHeiti;
|
|
|
+ font-family: 'heitizxc';
|
|
|
margin: 10px 0;
|
|
|
text-align: center;
|
|
|
}
|
|
@@ -549,7 +571,7 @@ export default {
|
|
|
font-size: 20px;
|
|
|
}
|
|
|
.heiti{
|
|
|
- font-family:黑体 ;
|
|
|
+ font-family:'heitizxc' ;
|
|
|
}
|
|
|
.con-unit {
|
|
|
font-size: 20px;
|