d78c0d2e by renchao@pashanhoo.com

style:证明

1 parent bf21b5a7
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2024-01-18 11:00:00
* @LastEditTime: 2024-01-24 17:31:21
-->
<template>
<div>
......@@ -525,48 +525,55 @@
context.fillText(this.bdcqz.zmqlhsx ? this.bdcqz.zmqlhsx : '', 775, 180);
// context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 775, 228);
// 权利人
let qlrlines = this.bdcqz.qlr ? this.bdcqz.qlr.split(' ') : [];
if (getByteLen(this.bdcqz.qlr) >= 34) {
qlrlines.forEach((line, index) => {
let currentLine = '';
let arr = [];
for (let word of line) {
const testLine = currentLine + word;
const lineWidth = context.measureText(testLine).width;
if (lineWidth <= 295) {
currentLine = testLine;
} else {
arr.push(currentLine);
currentLine = word;
}
let qlrlines = this.bdcqz.qlr
if (getByteLen(this.bdcqz.qlr) > 36) {
let currentLine = '';
let arr = [];
for (let word of qlrlines) {
const testLine = currentLine + word;
const lineWidth = context.measureText(testLine).width;
if (lineWidth <= 295) {
currentLine = testLine;
} else {
arr.push(currentLine);
currentLine = word;
}
arr.push(currentLine);
arr.forEach((line, index) => {
context.fillText(line, 775, 218 + (index * 20)); // 调整行高
})
})
}
arr.push(currentLine); // 将最后一行添加到数组
// 绘制所有行
for (let i = 0; i < arr.length; i++) {
context.fillText(arr[i], 775, 218 + i * 20); // lineHeight 为行高
}
} else {
qlrlines.forEach((line, index) => {
let currentLine = '';
let arr = [];
for (let word of line) {
const testLine = currentLine + word;
const lineWidth = context.measureText(testLine).width;
if (lineWidth <= 295) {
currentLine = testLine;
} else {
arr.push(currentLine);
currentLine = word;
}
}
arr.push(currentLine);
arr.forEach((line, index) => {
context.fillText(line, 775, 228 + (index * 20)); // 调整行高
})
})
context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 775, 228);
}
// 义务人
context.fillText(this.bdcqz.ywr ? this.bdcqz.ywr : '', 775, 275);
// context.fillText(this.bdcqz.ywr ? this.bdcqz.ywr : '', 775, 275);
let ywrlines = this.bdcqz.ywr
if (getByteLen(this.bdcqz.ywr) > 36) {
let currentLine = '';
let arr = [];
for (let word of ywrlines) {
const testLine = currentLine + word;
const lineWidth = context.measureText(testLine).width;
if (lineWidth <= 295) {
currentLine = testLine;
} else {
arr.push(currentLine);
currentLine = word;
}
}
arr.push(currentLine); // 将最后一行添加到数组
// 绘制所有行
for (let i = 0; i < arr.length; i++) {
context.fillText(arr[i], 775, 268 + i * 20); // lineHeight 为行高
}
} else {
context.fillText(this.bdcqz.ywr ? this.bdcqz.ywr : '', 775, 275);
}
let lines2 = this.bdcqz.zl ? this.bdcqz.zl.split(' ') : [];
if (getByteLen(this.bdcqz.zl) > 37) {
lines2.forEach((line, index) => {
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2024-01-23 11:07:58
* @LastEditTime: 2024-01-24 17:29:20
-->
<template>
<div class="from-clues loadingtext" v-Loading="loading" element-loading-text="拼命加载中..." style="text-align: center;">
......@@ -450,49 +450,54 @@
context.fillText(this.bdcqz.zmqlhsx ? this.bdcqz.zmqlhsx : '', 775, 180);
// context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 775, 228);
// 权利人
let qlrlines = this.bdcqz.qlr ? this.bdcqz.qlr.split(' ') : [];
if (getByteLen(this.bdcqz.qlr) >= 34) {
qlrlines.forEach((line, index) => {
let currentLine = '';
let arr = [];
for (let word of line) {
const testLine = currentLine + word;
const lineWidth = context.measureText(testLine).width;
if (lineWidth <= 295) {
currentLine = testLine;
} else {
arr.push(currentLine);
currentLine = word;
}
let qlrlines = this.bdcqz.qlr
if (getByteLen(this.bdcqz.qlr) > 36) {
let currentLine = '';
let arr = [];
for (let word of qlrlines) {
const testLine = currentLine + word;
const lineWidth = context.measureText(testLine).width;
if (lineWidth <= 295) {
currentLine = testLine;
} else {
arr.push(currentLine);
currentLine = word;
}
arr.push(currentLine);
arr.forEach((line, index) => {
context.fillText(line, 775, 218 + (index * 20)); // 调整行高
})
})
}
arr.push(currentLine); // 将最后一行添加到数组
// 绘制所有行
for (let i = 0; i < arr.length; i++) {
context.fillText(arr[i], 775, 218 + i * 20); // lineHeight 为行高
}
} else {
qlrlines.forEach((line, index) => {
let currentLine = '';
let arr = [];
for (let word of line) {
const testLine = currentLine + word;
const lineWidth = context.measureText(testLine).width;
if (lineWidth <= 295) {
currentLine = testLine;
} else {
arr.push(currentLine);
currentLine = word;
}
}
arr.push(currentLine);
arr.forEach((line, index) => {
context.fillText(line, 775, 228 + (index * 20)); // 调整行高
})
})
context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 775, 228);
}
// 义务人
context.fillText(this.bdcqz.ywr ? this.bdcqz.ywr : '', 775, 275);
// context.fillText(this.bdcqz.ywr ? this.bdcqz.ywr : '', 775, 275);
let ywrlines = this.bdcqz.ywr
if (getByteLen(this.bdcqz.ywr) > 36) {
let currentLine = '';
let arr = [];
for (let word of ywrlines) {
const testLine = currentLine + word;
const lineWidth = context.measureText(testLine).width;
if (lineWidth <= 295) {
currentLine = testLine;
} else {
arr.push(currentLine);
currentLine = word;
}
}
arr.push(currentLine); // 将最后一行添加到数组
// 绘制所有行
for (let i = 0; i < arr.length; i++) {
context.fillText(arr[i], 775, 268 + i * 20); // lineHeight 为行高
}
} else {
context.fillText(this.bdcqz.ywr ? this.bdcqz.ywr : '', 775, 275);
}
// context.fillText(this.bdcqz.zl ? this.bdcqz.zl : '', 775, 325);
let lines2 = this.bdcqz.zl ? this.bdcqz.zl.split(' ') : [];
......