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,12 +525,11 @@ ...@@ -525,12 +525,11 @@
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) => {
531 let currentLine = ''; 530 let currentLine = '';
532 let arr = []; 531 let arr = [];
533 for (let word of line) { 532 for (let word of qlrlines) {
534 const testLine = currentLine + word; 533 const testLine = currentLine + word;
535 const lineWidth = context.measureText(testLine).width; 534 const lineWidth = context.measureText(testLine).width;
536 if (lineWidth <= 295) { 535 if (lineWidth <= 295) {
...@@ -540,16 +539,22 @@ ...@@ -540,16 +539,22 @@
540 currentLine = word; 539 currentLine = word;
541 } 540 }
542 } 541 }
543 arr.push(currentLine); 542 arr.push(currentLine); // 将最后一行添加到数组
544 arr.forEach((line, index) => { 543 // 绘制所有行
545 context.fillText(line, 775, 218 + (index * 20)); // 调整行高 544 for (let i = 0; i < arr.length; i++) {
546 }) 545 context.fillText(arr[i], 775, 218 + i * 20); // lineHeight 为行高
547 }) 546 }
548 } else { 547 } else {
549 qlrlines.forEach((line, index) => { 548 context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 775, 228);
549 }
550 // 义务人
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) {
550 let currentLine = ''; 555 let currentLine = '';
551 let arr = []; 556 let arr = [];
552 for (let word of line) { 557 for (let word of ywrlines) {
553 const testLine = currentLine + word; 558 const testLine = currentLine + word;
554 const lineWidth = context.measureText(testLine).width; 559 const lineWidth = context.measureText(testLine).width;
555 if (lineWidth <= 295) { 560 if (lineWidth <= 295) {
...@@ -559,14 +564,16 @@ ...@@ -559,14 +564,16 @@
559 currentLine = word; 564 currentLine = word;
560 } 565 }
561 } 566 }
562 arr.push(currentLine); 567 arr.push(currentLine); // 将最后一行添加到数组
563 arr.forEach((line, index) => { 568 // 绘制所有行
564 context.fillText(line, 775, 228 + (index * 20)); // 调整行高 569 for (let i = 0; i < arr.length; i++) {
565 }) 570 context.fillText(arr[i], 775, 268 + i * 20); // lineHeight 为行高
566 })
567 } 571 }
568 // 义务人 572 } else {
569 context.fillText(this.bdcqz.ywr ? this.bdcqz.ywr : '', 775, 275); 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,12 +450,11 @@ ...@@ -450,12 +450,11 @@
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) => {
456 let currentLine = ''; 455 let currentLine = '';
457 let arr = []; 456 let arr = [];
458 for (let word of line) { 457 for (let word of qlrlines) {
459 const testLine = currentLine + word; 458 const testLine = currentLine + word;
460 const lineWidth = context.measureText(testLine).width; 459 const lineWidth = context.measureText(testLine).width;
461 if (lineWidth <= 295) { 460 if (lineWidth <= 295) {
...@@ -465,16 +464,22 @@ ...@@ -465,16 +464,22 @@
465 currentLine = word; 464 currentLine = word;
466 } 465 }
467 } 466 }
468 arr.push(currentLine); 467 arr.push(currentLine); // 将最后一行添加到数组
469 arr.forEach((line, index) => { 468 // 绘制所有行
470 context.fillText(line, 775, 218 + (index * 20)); // 调整行高 469 for (let i = 0; i < arr.length; i++) {
471 }) 470 context.fillText(arr[i], 775, 218 + i * 20); // lineHeight 为行高
472 }) 471 }
473 } else { 472 } else {
474 qlrlines.forEach((line, index) => { 473 context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 775, 228);
474 }
475
476 // 义务人
477 // context.fillText(this.bdcqz.ywr ? this.bdcqz.ywr : '', 775, 275);
478 let ywrlines = this.bdcqz.ywr
479 if (getByteLen(this.bdcqz.ywr) > 36) {
475 let currentLine = ''; 480 let currentLine = '';
476 let arr = []; 481 let arr = [];
477 for (let word of line) { 482 for (let word of ywrlines) {
478 const testLine = currentLine + word; 483 const testLine = currentLine + word;
479 const lineWidth = context.measureText(testLine).width; 484 const lineWidth = context.measureText(testLine).width;
480 if (lineWidth <= 295) { 485 if (lineWidth <= 295) {
...@@ -484,15 +489,15 @@ ...@@ -484,15 +489,15 @@
484 currentLine = word; 489 currentLine = word;
485 } 490 }
486 } 491 }
487 arr.push(currentLine); 492 arr.push(currentLine); // 将最后一行添加到数组
488 arr.forEach((line, index) => { 493 // 绘制所有行
489 context.fillText(line, 775, 228 + (index * 20)); // 调整行高 494 for (let i = 0; i < arr.length; i++) {
490 }) 495 context.fillText(arr[i], 775, 268 + i * 20); // lineHeight 为行高
491 })
492 } 496 }
493 497 } else {
494 // 义务人
495 context.fillText(this.bdcqz.ywr ? this.bdcqz.ywr : '', 775, 275); 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(' ') : [];
......