6d14f05e by renchao@pashanhoo.com

Merge branch 'dev'

2 parents 5121589e d78c0d2e
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2024-01-22 16:34:15
* @LastEditTime: 2024-01-24 17:33:35
-->
<template>
<div>
......@@ -538,12 +538,11 @@
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 qlrlines = this.bdcqz.qlr
if (getByteLen(this.bdcqz.qlr) > 36) {
let currentLine = '';
let arr = [];
for (let word of line) {
for (let word of qlrlines) {
const testLine = currentLine + word;
const lineWidth = context.measureText(testLine).width;
if (lineWidth <= 295) {
......@@ -553,16 +552,22 @@
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) => {
context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 775, 228);
}
// 义务人
// 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 line) {
for (let word of ywrlines) {
const testLine = currentLine + word;
const lineWidth = context.measureText(testLine).width;
if (lineWidth <= 295) {
......@@ -572,14 +577,16 @@
currentLine = word;
}
}
arr.push(currentLine);
arr.forEach((line, index) => {
context.fillText(line, 775, 228 + (index * 20)); // 调整行高
})
})
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;">
......@@ -460,12 +460,11 @@
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 qlrlines = this.bdcqz.qlr
if (getByteLen(this.bdcqz.qlr) > 36) {
let currentLine = '';
let arr = [];
for (let word of line) {
for (let word of qlrlines) {
const testLine = currentLine + word;
const lineWidth = context.measureText(testLine).width;
if (lineWidth <= 295) {
......@@ -475,16 +474,22 @@
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) => {
context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 775, 228);
}
// 义务人
// 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 line) {
for (let word of ywrlines) {
const testLine = currentLine + word;
const lineWidth = context.measureText(testLine).width;
if (lineWidth <= 295) {
......@@ -494,15 +499,15 @@
currentLine = word;
}
}
arr.push(currentLine);
arr.forEach((line, index) => {
context.fillText(line, 775, 228 + (index * 20)); // 调整行高
})
})
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(' ') : [];
......