Merge branch 'dev'
Showing
2 changed files
with
49 additions
and
37 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Description: | 2 | * @Description: |
| 3 | * @Autor: renchao | 3 | * @Autor: renchao |
| 4 | * @LastEditTime: 2024-01-22 16:34:15 | 4 | * @LastEditTime: 2024-01-24 17:33:35 |
| 5 | --> | 5 | --> |
| 6 | <template> | 6 | <template> |
| 7 | <div> | 7 | <div> |
| ... | @@ -538,12 +538,11 @@ | ... | @@ -538,12 +538,11 @@ |
| 538 | context.fillText(this.bdcqz.zmqlhsx ? this.bdcqz.zmqlhsx : '', 775, 180); | 538 | context.fillText(this.bdcqz.zmqlhsx ? this.bdcqz.zmqlhsx : '', 775, 180); |
| 539 | // context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 775, 228); | 539 | // context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 775, 228); |
| 540 | // 权利人 | 540 | // 权利人 |
| 541 | let qlrlines = this.bdcqz.qlr ? this.bdcqz.qlr.split(' ') : []; | 541 | let qlrlines = this.bdcqz.qlr |
| 542 | if (getByteLen(this.bdcqz.qlr) >= 34) { | 542 | if (getByteLen(this.bdcqz.qlr) > 36) { |
| 543 | qlrlines.forEach((line, index) => { | ||
| 544 | let currentLine = ''; | 543 | let currentLine = ''; |
| 545 | let arr = []; | 544 | let arr = []; |
| 546 | for (let word of line) { | 545 | for (let word of qlrlines) { |
| 547 | const testLine = currentLine + word; | 546 | const testLine = currentLine + word; |
| 548 | const lineWidth = context.measureText(testLine).width; | 547 | const lineWidth = context.measureText(testLine).width; |
| 549 | if (lineWidth <= 295) { | 548 | if (lineWidth <= 295) { |
| ... | @@ -553,16 +552,22 @@ | ... | @@ -553,16 +552,22 @@ |
| 553 | currentLine = word; | 552 | currentLine = word; |
| 554 | } | 553 | } |
| 555 | } | 554 | } |
| 556 | arr.push(currentLine); | 555 | arr.push(currentLine); // 将最后一行添加到数组 |
| 557 | arr.forEach((line, index) => { | 556 | // 绘制所有行 |
| 558 | context.fillText(line, 775, 218 + (index * 20)); // 调整行高 | 557 | for (let i = 0; i < arr.length; i++) { |
| 559 | }) | 558 | context.fillText(arr[i], 775, 218 + i * 20); // lineHeight 为行高 |
| 560 | }) | 559 | } |
| 561 | } else { | 560 | } else { |
| 562 | qlrlines.forEach((line, index) => { | 561 | context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 775, 228); |
| 562 | } | ||
| 563 | // 义务人 | ||
| 564 | // context.fillText(this.bdcqz.ywr ? this.bdcqz.ywr : '', 775, 275); | ||
| 565 | |||
| 566 | let ywrlines = this.bdcqz.ywr | ||
| 567 | if (getByteLen(this.bdcqz.ywr) > 36) { | ||
| 563 | let currentLine = ''; | 568 | let currentLine = ''; |
| 564 | let arr = []; | 569 | let arr = []; |
| 565 | for (let word of line) { | 570 | for (let word of ywrlines) { |
| 566 | const testLine = currentLine + word; | 571 | const testLine = currentLine + word; |
| 567 | const lineWidth = context.measureText(testLine).width; | 572 | const lineWidth = context.measureText(testLine).width; |
| 568 | if (lineWidth <= 295) { | 573 | if (lineWidth <= 295) { |
| ... | @@ -572,14 +577,16 @@ | ... | @@ -572,14 +577,16 @@ |
| 572 | currentLine = word; | 577 | currentLine = word; |
| 573 | } | 578 | } |
| 574 | } | 579 | } |
| 575 | arr.push(currentLine); | 580 | arr.push(currentLine); // 将最后一行添加到数组 |
| 576 | arr.forEach((line, index) => { | 581 | // 绘制所有行 |
| 577 | context.fillText(line, 775, 228 + (index * 20)); // 调整行高 | 582 | for (let i = 0; i < arr.length; i++) { |
| 578 | }) | 583 | context.fillText(arr[i], 775, 268 + i * 20); // lineHeight 为行高 |
| 579 | }) | ||
| 580 | } | 584 | } |
| 581 | // 义务人 | 585 | } else { |
| 582 | context.fillText(this.bdcqz.ywr ? this.bdcqz.ywr : '', 775, 275); | 586 | context.fillText(this.bdcqz.ywr ? this.bdcqz.ywr : '', 775, 275); |
| 587 | } | ||
| 588 | |||
| 589 | |||
| 583 | let lines2 = this.bdcqz.zl ? this.bdcqz.zl.split(' ') : []; | 590 | let lines2 = this.bdcqz.zl ? this.bdcqz.zl.split(' ') : []; |
| 584 | if (getByteLen(this.bdcqz.zl) > 37) { | 591 | if (getByteLen(this.bdcqz.zl) > 37) { |
| 585 | lines2.forEach((line, index) => { | 592 | 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;"> |
| ... | @@ -460,12 +460,11 @@ | ... | @@ -460,12 +460,11 @@ |
| 460 | context.fillText(this.bdcqz.zmqlhsx ? this.bdcqz.zmqlhsx : '', 775, 180); | 460 | context.fillText(this.bdcqz.zmqlhsx ? this.bdcqz.zmqlhsx : '', 775, 180); |
| 461 | // context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 775, 228); | 461 | // context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 775, 228); |
| 462 | // 权利人 | 462 | // 权利人 |
| 463 | let qlrlines = this.bdcqz.qlr ? this.bdcqz.qlr.split(' ') : []; | 463 | let qlrlines = this.bdcqz.qlr |
| 464 | if (getByteLen(this.bdcqz.qlr) >= 34) { | 464 | if (getByteLen(this.bdcqz.qlr) > 36) { |
| 465 | qlrlines.forEach((line, index) => { | ||
| 466 | let currentLine = ''; | 465 | let currentLine = ''; |
| 467 | let arr = []; | 466 | let arr = []; |
| 468 | for (let word of line) { | 467 | for (let word of qlrlines) { |
| 469 | const testLine = currentLine + word; | 468 | const testLine = currentLine + word; |
| 470 | const lineWidth = context.measureText(testLine).width; | 469 | const lineWidth = context.measureText(testLine).width; |
| 471 | if (lineWidth <= 295) { | 470 | if (lineWidth <= 295) { |
| ... | @@ -475,16 +474,22 @@ | ... | @@ -475,16 +474,22 @@ |
| 475 | currentLine = word; | 474 | currentLine = word; |
| 476 | } | 475 | } |
| 477 | } | 476 | } |
| 478 | arr.push(currentLine); | 477 | arr.push(currentLine); // 将最后一行添加到数组 |
| 479 | arr.forEach((line, index) => { | 478 | // 绘制所有行 |
| 480 | context.fillText(line, 775, 218 + (index * 20)); // 调整行高 | 479 | for (let i = 0; i < arr.length; i++) { |
| 481 | }) | 480 | context.fillText(arr[i], 775, 218 + i * 20); // lineHeight 为行高 |
| 482 | }) | 481 | } |
| 483 | } else { | 482 | } else { |
| 484 | qlrlines.forEach((line, index) => { | 483 | context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 775, 228); |
| 484 | } | ||
| 485 | |||
| 486 | // 义务人 | ||
| 487 | // context.fillText(this.bdcqz.ywr ? this.bdcqz.ywr : '', 775, 275); | ||
| 488 | let ywrlines = this.bdcqz.ywr | ||
| 489 | if (getByteLen(this.bdcqz.ywr) > 36) { | ||
| 485 | let currentLine = ''; | 490 | let currentLine = ''; |
| 486 | let arr = []; | 491 | let arr = []; |
| 487 | for (let word of line) { | 492 | for (let word of ywrlines) { |
| 488 | const testLine = currentLine + word; | 493 | const testLine = currentLine + word; |
| 489 | const lineWidth = context.measureText(testLine).width; | 494 | const lineWidth = context.measureText(testLine).width; |
| 490 | if (lineWidth <= 295) { | 495 | if (lineWidth <= 295) { |
| ... | @@ -494,15 +499,15 @@ | ... | @@ -494,15 +499,15 @@ |
| 494 | currentLine = word; | 499 | currentLine = word; |
| 495 | } | 500 | } |
| 496 | } | 501 | } |
| 497 | arr.push(currentLine); | 502 | arr.push(currentLine); // 将最后一行添加到数组 |
| 498 | arr.forEach((line, index) => { | 503 | // 绘制所有行 |
| 499 | context.fillText(line, 775, 228 + (index * 20)); // 调整行高 | 504 | for (let i = 0; i < arr.length; i++) { |
| 500 | }) | 505 | context.fillText(arr[i], 775, 268 + i * 20); // lineHeight 为行高 |
| 501 | }) | ||
| 502 | } | 506 | } |
| 503 | 507 | } else { | |
| 504 | // 义务人 | ||
| 505 | context.fillText(this.bdcqz.ywr ? this.bdcqz.ywr : '', 775, 275); | 508 | context.fillText(this.bdcqz.ywr ? this.bdcqz.ywr : '', 775, 275); |
| 509 | } | ||
| 510 | |||
| 506 | // context.fillText(this.bdcqz.zl ? this.bdcqz.zl : '', 775, 325); | 511 | // context.fillText(this.bdcqz.zl ? this.bdcqz.zl : '', 775, 325); |
| 507 | 512 | ||
| 508 | let lines2 = this.bdcqz.zl ? this.bdcqz.zl.split(' ') : []; | 513 | let lines2 = this.bdcqz.zl ? this.bdcqz.zl.split(' ') : []; | ... | ... |
-
Please register or sign in to post a comment