d78c0d2e by renchao@pashanhoo.com

style:证明

1 parent bf21b5a7
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2024-01-18 11:00:00 4 * @LastEditTime: 2024-01-24 17:31:21
5 --> 5 -->
6 <template> 6 <template>
7 <div> 7 <div>
...@@ -525,48 +525,55 @@ ...@@ -525,48 +525,55 @@
525 context.fillText(this.bdcqz.zmqlhsx ? this.bdcqz.zmqlhsx : '', 775, 180); 525 context.fillText(this.bdcqz.zmqlhsx ? this.bdcqz.zmqlhsx : '', 775, 180);
526 // context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 775, 228); 526 // context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 775, 228);
527 // 权利人 527 // 权利人
528 let qlrlines = this.bdcqz.qlr ? this.bdcqz.qlr.split(' ') : []; 528 let qlrlines = this.bdcqz.qlr
529 if (getByteLen(this.bdcqz.qlr) >= 34) { 529 if (getByteLen(this.bdcqz.qlr) > 36) {
530 qlrlines.forEach((line, index) => { 530 let currentLine = '';
531 let currentLine = ''; 531 let arr = [];
532 let arr = []; 532 for (let word of qlrlines) {
533 for (let word of line) { 533 const testLine = currentLine + word;
534 const testLine = currentLine + word; 534 const lineWidth = context.measureText(testLine).width;
535 const lineWidth = context.measureText(testLine).width; 535 if (lineWidth <= 295) {
536 if (lineWidth <= 295) { 536 currentLine = testLine;
537 currentLine = testLine; 537 } else {
538 } else { 538 arr.push(currentLine);
539 arr.push(currentLine); 539 currentLine = word;
540 currentLine = word;
541 }
542 } 540 }
543 arr.push(currentLine); 541 }
544 arr.forEach((line, index) => { 542 arr.push(currentLine); // 将最后一行添加到数组
545 context.fillText(line, 775, 218 + (index * 20)); // 调整行高 543 // 绘制所有行
546 }) 544 for (let i = 0; i < arr.length; i++) {
547 }) 545 context.fillText(arr[i], 775, 218 + i * 20); // lineHeight 为行高
546 }
548 } else { 547 } else {
549 qlrlines.forEach((line, index) => { 548 context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 775, 228);
550 let currentLine = '';
551 let arr = [];
552 for (let word of line) {
553 const testLine = currentLine + word;
554 const lineWidth = context.measureText(testLine).width;
555 if (lineWidth <= 295) {
556 currentLine = testLine;
557 } else {
558 arr.push(currentLine);
559 currentLine = word;
560 }
561 }
562 arr.push(currentLine);
563 arr.forEach((line, index) => {
564 context.fillText(line, 775, 228 + (index * 20)); // 调整行高
565 })
566 })
567 } 549 }
568 // 义务人 550 // 义务人
569 context.fillText(this.bdcqz.ywr ? this.bdcqz.ywr : '', 775, 275); 551 // context.fillText(this.bdcqz.ywr ? this.bdcqz.ywr : '', 775, 275);
552
553 let ywrlines = this.bdcqz.ywr
554 if (getByteLen(this.bdcqz.ywr) > 36) {
555 let currentLine = '';
556 let arr = [];
557 for (let word of ywrlines) {
558 const testLine = currentLine + word;
559 const lineWidth = context.measureText(testLine).width;
560 if (lineWidth <= 295) {
561 currentLine = testLine;
562 } else {
563 arr.push(currentLine);
564 currentLine = word;
565 }
566 }
567 arr.push(currentLine); // 将最后一行添加到数组
568 // 绘制所有行
569 for (let i = 0; i < arr.length; i++) {
570 context.fillText(arr[i], 775, 268 + i * 20); // lineHeight 为行高
571 }
572 } else {
573 context.fillText(this.bdcqz.ywr ? this.bdcqz.ywr : '', 775, 275);
574 }
575
576
570 let lines2 = this.bdcqz.zl ? this.bdcqz.zl.split(' ') : []; 577 let lines2 = this.bdcqz.zl ? this.bdcqz.zl.split(' ') : [];
571 if (getByteLen(this.bdcqz.zl) > 37) { 578 if (getByteLen(this.bdcqz.zl) > 37) {
572 lines2.forEach((line, index) => { 579 lines2.forEach((line, index) => {
......
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2024-01-23 11:07:58 4 * @LastEditTime: 2024-01-24 17:29:20
5 --> 5 -->
6 <template> 6 <template>
7 <div class="from-clues loadingtext" v-Loading="loading" element-loading-text="拼命加载中..." style="text-align: center;"> 7 <div class="from-clues loadingtext" v-Loading="loading" element-loading-text="拼命加载中..." style="text-align: center;">
...@@ -450,49 +450,54 @@ ...@@ -450,49 +450,54 @@
450 context.fillText(this.bdcqz.zmqlhsx ? this.bdcqz.zmqlhsx : '', 775, 180); 450 context.fillText(this.bdcqz.zmqlhsx ? this.bdcqz.zmqlhsx : '', 775, 180);
451 // context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 775, 228); 451 // context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 775, 228);
452 // 权利人 452 // 权利人
453 let qlrlines = this.bdcqz.qlr ? this.bdcqz.qlr.split(' ') : []; 453 let qlrlines = this.bdcqz.qlr
454 if (getByteLen(this.bdcqz.qlr) >= 34) { 454 if (getByteLen(this.bdcqz.qlr) > 36) {
455 qlrlines.forEach((line, index) => { 455 let currentLine = '';
456 let currentLine = ''; 456 let arr = [];
457 let arr = []; 457 for (let word of qlrlines) {
458 for (let word of line) { 458 const testLine = currentLine + word;
459 const testLine = currentLine + word; 459 const lineWidth = context.measureText(testLine).width;
460 const lineWidth = context.measureText(testLine).width; 460 if (lineWidth <= 295) {
461 if (lineWidth <= 295) { 461 currentLine = testLine;
462 currentLine = testLine; 462 } else {
463 } else { 463 arr.push(currentLine);
464 arr.push(currentLine); 464 currentLine = word;
465 currentLine = word;
466 }
467 } 465 }
468 arr.push(currentLine); 466 }
469 arr.forEach((line, index) => { 467 arr.push(currentLine); // 将最后一行添加到数组
470 context.fillText(line, 775, 218 + (index * 20)); // 调整行高 468 // 绘制所有行
471 }) 469 for (let i = 0; i < arr.length; i++) {
472 }) 470 context.fillText(arr[i], 775, 218 + i * 20); // lineHeight 为行高
471 }
473 } else { 472 } else {
474 qlrlines.forEach((line, index) => { 473 context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 775, 228);
475 let currentLine = '';
476 let arr = [];
477 for (let word of line) {
478 const testLine = currentLine + word;
479 const lineWidth = context.measureText(testLine).width;
480 if (lineWidth <= 295) {
481 currentLine = testLine;
482 } else {
483 arr.push(currentLine);
484 currentLine = word;
485 }
486 }
487 arr.push(currentLine);
488 arr.forEach((line, index) => {
489 context.fillText(line, 775, 228 + (index * 20)); // 调整行高
490 })
491 })
492 } 474 }
493 475
494 // 义务人 476 // 义务人
495 context.fillText(this.bdcqz.ywr ? this.bdcqz.ywr : '', 775, 275); 477 // context.fillText(this.bdcqz.ywr ? this.bdcqz.ywr : '', 775, 275);
478 let ywrlines = this.bdcqz.ywr
479 if (getByteLen(this.bdcqz.ywr) > 36) {
480 let currentLine = '';
481 let arr = [];
482 for (let word of ywrlines) {
483 const testLine = currentLine + word;
484 const lineWidth = context.measureText(testLine).width;
485 if (lineWidth <= 295) {
486 currentLine = testLine;
487 } else {
488 arr.push(currentLine);
489 currentLine = word;
490 }
491 }
492 arr.push(currentLine); // 将最后一行添加到数组
493 // 绘制所有行
494 for (let i = 0; i < arr.length; i++) {
495 context.fillText(arr[i], 775, 268 + i * 20); // lineHeight 为行高
496 }
497 } else {
498 context.fillText(this.bdcqz.ywr ? this.bdcqz.ywr : '', 775, 275);
499 }
500
496 // context.fillText(this.bdcqz.zl ? this.bdcqz.zl : '', 775, 325); 501 // context.fillText(this.bdcqz.zl ? this.bdcqz.zl : '', 775, 325);
497 502
498 let lines2 = this.bdcqz.zl ? this.bdcqz.zl.split(' ') : []; 503 let lines2 = this.bdcqz.zl ? this.bdcqz.zl.split(' ') : [];
......