|
@@ -746,19 +746,41 @@ export default {
|
|
|
this.$nextTick(()=>{
|
|
|
this.$message.info("正在下载,请稍等...")
|
|
|
let elementList = this.$refs.myChild.$refs.pdfShow.querySelectorAll('.downImage')
|
|
|
+ let fontSize = [];
|
|
|
+ let fontType = {
|
|
|
+ '1':"13pt",
|
|
|
+ '2':"16.9pt",
|
|
|
+ '3':"20.9pt",
|
|
|
+ '4':"23.5pt",
|
|
|
+ '5':"31.3pt",
|
|
|
+ '6':"41.8pt",
|
|
|
+ '7':"62.6pt"
|
|
|
+ }
|
|
|
elementList.forEach(el => {
|
|
|
let img = el.getElementsByTagName('img');
|
|
|
for(let i=0;i<img.length;i++){
|
|
|
img[i].setAttribute("crossOrigin","*");
|
|
|
}
|
|
|
+ let font = el.getElementsByTagName('font');
|
|
|
+ for(let i=0;i<font.length;i++){
|
|
|
+ fontSize.push(font[i].getAttribute("size"))
|
|
|
+ font[i].removeAttribute("size")
|
|
|
+ font[i].setAttribute("style",`font-size:${fontType[fontSize[i]]}`)
|
|
|
+ // font[i].setAttribute("size",fontType[fontSize[i]])
|
|
|
+ }
|
|
|
})
|
|
|
-
|
|
|
- getWord2({...this.downWordData,signData:this.signData,elementList}).then(_=>{
|
|
|
+ let newData = JSON.parse(JSON.stringify(this.downWordData))
|
|
|
+ getWord2({...newData,signData:this.signData,elementList}).then(_=>{
|
|
|
elementList.forEach(el => {
|
|
|
let img = el.getElementsByTagName('img');
|
|
|
for(let i=0;i<img.length;i++){
|
|
|
img[i].removeAttribute('crossOrigin')
|
|
|
}
|
|
|
+ let font = el.getElementsByTagName('font');
|
|
|
+ for(let i=0;i<font.length;i++){
|
|
|
+ font[i].removeAttribute("style")
|
|
|
+ font[i].setAttribute("size",fontSize[i])
|
|
|
+ }
|
|
|
})
|
|
|
this.downloadWordDig = false;
|
|
|
this.loading = false;
|