Merge branch 'dev'
Showing
2 changed files
with
21 additions
and
20 deletions
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-09-06 15:32:50 | 4 | * @LastEditTime: 2023-10-25 13:49:56 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <div> | 7 | <div> |
... | @@ -67,6 +67,7 @@ | ... | @@ -67,6 +67,7 @@ |
67 | import { getPrintTemplateByCode } from "@/api/print"; | 67 | import { getPrintTemplateByCode } from "@/api/print"; |
68 | import { getLodop } from "@/utils/LodopFuncs" | 68 | import { getLodop } from "@/utils/LodopFuncs" |
69 | import { readYsxlh, certificate, getBdcqzDetail, invalidCertificate } from "@/api/bdcqz.js"; | 69 | import { readYsxlh, certificate, getBdcqzDetail, invalidCertificate } from "@/api/bdcqz.js"; |
70 | import { log } from 'bpmn-js-token-simulation'; | ||
70 | export default { | 71 | export default { |
71 | props: { | 72 | props: { |
72 | formData: { | 73 | formData: { |
... | @@ -239,7 +240,7 @@ | ... | @@ -239,7 +240,7 @@ |
239 | context.fillText(this.bdcqz.qlxz ? this.bdcqz.qlxz : '', 129, 303); | 240 | context.fillText(this.bdcqz.qlxz ? this.bdcqz.qlxz : '', 129, 303); |
240 | context.fillText(this.bdcqz.yt ? this.bdcqz.yt : '', 129, 346); | 241 | context.fillText(this.bdcqz.yt ? this.bdcqz.yt : '', 129, 346); |
241 | let lines6 = this.bdcqz.mj ? this.bdcqz.mj.split(' ') : []; | 242 | let lines6 = this.bdcqz.mj ? this.bdcqz.mj.split(' ') : []; |
242 | if (getByteLen(this.bdcqz.mj) > 41) { | 243 | if (getByteLen(this.bdcqz.mj) > 37) { |
243 | lines6.forEach((line, index) => { | 244 | lines6.forEach((line, index) => { |
244 | const y = 378 + (index * 27); // 每行文本的垂直位置 | 245 | const y = 378 + (index * 27); // 每行文本的垂直位置 |
245 | let currentLine = ''; | 246 | let currentLine = ''; |
... | @@ -247,7 +248,7 @@ | ... | @@ -247,7 +248,7 @@ |
247 | for (let word of line) { | 248 | for (let word of line) { |
248 | const testLine = currentLine + word; | 249 | const testLine = currentLine + word; |
249 | const lineWidth = context.measureText(testLine).width; | 250 | const lineWidth = context.measureText(testLine).width; |
250 | if (lineWidth <= 330) { | 251 | if (lineWidth <= 336) { |
251 | currentLine = testLine; | 252 | currentLine = testLine; |
252 | } else { | 253 | } else { |
253 | arr.push(currentLine); | 254 | arr.push(currentLine); |
... | @@ -267,7 +268,7 @@ | ... | @@ -267,7 +268,7 @@ |
267 | for (let word of line) { | 268 | for (let word of line) { |
268 | const testLine = currentLine + word; | 269 | const testLine = currentLine + word; |
269 | const lineWidth = context.measureText(testLine).width; | 270 | const lineWidth = context.measureText(testLine).width; |
270 | if (lineWidth <= 330) { | 271 | if (lineWidth <= 336) { |
271 | currentLine = testLine; | 272 | currentLine = testLine; |
272 | } else { | 273 | } else { |
273 | arr.push(currentLine); | 274 | arr.push(currentLine); |
... | @@ -284,8 +285,8 @@ | ... | @@ -284,8 +285,8 @@ |
284 | const maxWidth = 332; // 最大宽度限制 | 285 | const maxWidth = 332; // 最大宽度限制 |
285 | let lines = this.bdcqz.qlqtzk ? this.bdcqz.qlqtzk.split('\n') : []; | 286 | let lines = this.bdcqz.qlqtzk ? this.bdcqz.qlqtzk.split('\n') : []; |
286 | for (let i = 0; i < lines.length; i++) { | 287 | for (let i = 0; i < lines.length; i++) { |
287 | let num = Math.ceil(getByteLen(lines[i]) / 41) | 288 | let num = Math.ceil(getByteLen(lines[i]) / 37) |
288 | if (getByteLen(lines[i]) > 41) { | 289 | if (getByteLen(lines[i]) > 37) { |
289 | let currentLine = ''; | 290 | let currentLine = ''; |
290 | let arr = []; | 291 | let arr = []; |
291 | for (let word of lines[i]) { | 292 | for (let word of lines[i]) { |
... | @@ -301,18 +302,18 @@ | ... | @@ -301,18 +302,18 @@ |
301 | arr.push(currentLine); | 302 | arr.push(currentLine); |
302 | if (i > 0) { | 303 | if (i > 0) { |
303 | arr.forEach((line, index) => { | 304 | arr.forEach((line, index) => { |
304 | context.fillText(line, 129, 480 + (26 * (i - 1)) + 5 * num + (index * 13)); // 调整行高 | 305 | context.fillText(line, 129, 485 + (26 * (i - 1)) + 5 * num + (index * 15)); // 调整行高 |
305 | }) | 306 | }) |
306 | } else { | 307 | } else { |
307 | arr.forEach((line, index) => { | 308 | arr.forEach((line, index) => { |
308 | context.fillText(line, 129, 480 + (26 * (i - 1)) + (index * 13)); // 调整行高 | 309 | context.fillText(line, 129, 495 + (26 * (i - 1)) + (index * 13)); // 调整行高 |
309 | }) | 310 | }) |
310 | } | 311 | } |
311 | } else { | 312 | } else { |
312 | if (i > 0) { | 313 | if (i > 0) { |
313 | context.fillText(lines[i] ? lines[i] : '', 129, 490 + 4 * num + (24 * (i - 1))); | 314 | context.fillText(lines[i] ? lines[i] : '', 129, 495 + 4 * num + (24 * (i - 1))); |
314 | } else { | 315 | } else { |
315 | context.fillText(lines[i] ? lines[i] : '', 129, 490 + (24 * (i - 1))); | 316 | context.fillText(lines[i] ? lines[i] : '', 129, 500 + (24 * (i - 1))); |
316 | } | 317 | } |
317 | } | 318 | } |
318 | } | 319 | } |
... | @@ -338,7 +339,7 @@ | ... | @@ -338,7 +339,7 @@ |
338 | }) | 339 | }) |
339 | }) | 340 | }) |
340 | let lines3 = this.bdcqz.syqx ? this.bdcqz.syqx.split(' ') : []; | 341 | let lines3 = this.bdcqz.syqx ? this.bdcqz.syqx.split(' ') : []; |
341 | if (getByteLen(this.bdcqz.syqx) > 41) { | 342 | if (getByteLen(this.bdcqz.syqx) > 37) { |
342 | lines3.forEach((line, index) => { | 343 | lines3.forEach((line, index) => { |
343 | const y = 423 + (index * 27); // 每行文本的垂直位置 | 344 | const y = 423 + (index * 27); // 每行文本的垂直位置 |
344 | let currentLine = ''; | 345 | let currentLine = ''; |
... | @@ -381,7 +382,7 @@ | ... | @@ -381,7 +382,7 @@ |
381 | } | 382 | } |
382 | 383 | ||
383 | let lines2 = this.bdcqz.zl ? this.bdcqz.zl.split(' ') : []; | 384 | let lines2 = this.bdcqz.zl ? this.bdcqz.zl.split(' ') : []; |
384 | if (getByteLen(this.bdcqz.zl) > 41) { | 385 | if (getByteLen(this.bdcqz.zl) > 37) { |
385 | lines2.forEach((line, index) => { | 386 | lines2.forEach((line, index) => { |
386 | const y = 170 + (index * 20); // 每行文本的垂直位置 | 387 | const y = 170 + (index * 20); // 每行文本的垂直位置 |
387 | let currentLine = ''; | 388 | let currentLine = ''; |
... | @@ -469,7 +470,7 @@ | ... | @@ -469,7 +470,7 @@ |
469 | // 义务人 | 470 | // 义务人 |
470 | context.fillText(this.bdcqz.ywr ? this.bdcqz.ywr : '', 775, 275); | 471 | context.fillText(this.bdcqz.ywr ? this.bdcqz.ywr : '', 775, 275); |
471 | let lines2 = this.bdcqz.zl ? this.bdcqz.zl.split(' ') : []; | 472 | let lines2 = this.bdcqz.zl ? this.bdcqz.zl.split(' ') : []; |
472 | if (getByteLen(this.bdcqz.zl) > 41) { | 473 | if (getByteLen(this.bdcqz.zl) >= 39) { |
473 | lines2.forEach((line, index) => { | 474 | lines2.forEach((line, index) => { |
474 | const y = 315 + (index * 20); // 每行文本的垂直位置 | 475 | const y = 315 + (index * 20); // 每行文本的垂直位置 |
475 | let currentLine = ''; | 476 | let currentLine = ''; |
... | @@ -518,6 +519,7 @@ | ... | @@ -518,6 +519,7 @@ |
518 | const maxWidth = 290; // 最大宽度限制 | 519 | const maxWidth = 290; // 最大宽度限制 |
519 | let lines = this.bdcqz.qlqtzk ? this.bdcqz.qlqtzk.split('\n') : []; | 520 | let lines = this.bdcqz.qlqtzk ? this.bdcqz.qlqtzk.split('\n') : []; |
520 | for (let i = 0; i < lines.length; i++) { | 521 | for (let i = 0; i < lines.length; i++) { |
522 | console.log(getByteLen(lines[i])); | ||
521 | let num = Math.ceil(getByteLen(lines[i]) / 37) | 523 | let num = Math.ceil(getByteLen(lines[i]) / 37) |
522 | if (getByteLen(lines[i]) > 37) { | 524 | if (getByteLen(lines[i]) > 37) { |
523 | let currentLine = ''; | 525 | let currentLine = ''; |
... | @@ -588,7 +590,6 @@ | ... | @@ -588,7 +590,6 @@ |
588 | } | 590 | } |
589 | image.src = this.bdczmSrc; | 591 | image.src = this.bdczmSrc; |
590 | }, | 592 | }, |
591 | // 打印 | ||
592 | /** | 593 | /** |
593 | * @description: 打印 | 594 | * @description: 打印 |
594 | * @author: renchao | 595 | * @author: renchao | ... | ... |
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-10-19 10:00:27 | 4 | * @LastEditTime: 2023-10-25 13:50:43 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <div class="from-clues loadingtext" v-Loading="loading" element-loading-text="拼命加载中..." style="height:720px;text-align: center;"> | 7 | <div class="from-clues loadingtext" v-Loading="loading" element-loading-text="拼命加载中..." style="height:720px;text-align: center;"> |
... | @@ -163,7 +163,7 @@ | ... | @@ -163,7 +163,7 @@ |
163 | context.fillText(this.bdcqz.yt ? this.bdcqz.yt : '', 129, 346); | 163 | context.fillText(this.bdcqz.yt ? this.bdcqz.yt : '', 129, 346); |
164 | // context.fillText(this.bdcqz.mj ? this.bdcqz.mj : '', 129, 386); | 164 | // context.fillText(this.bdcqz.mj ? this.bdcqz.mj : '', 129, 386); |
165 | let lines6 = this.bdcqz.mj ? this.bdcqz.mj.split(' ') : []; | 165 | let lines6 = this.bdcqz.mj ? this.bdcqz.mj.split(' ') : []; |
166 | if (getByteLen(this.bdcqz.mj) > 41) { | 166 | if (getByteLen(this.bdcqz.mj) > 37) { |
167 | lines6.forEach((line, index) => { | 167 | lines6.forEach((line, index) => { |
168 | const y = 378 + (index * 27); // 每行文本的垂直位置 | 168 | const y = 378 + (index * 27); // 每行文本的垂直位置 |
169 | let currentLine = ''; | 169 | let currentLine = ''; |
... | @@ -207,8 +207,8 @@ | ... | @@ -207,8 +207,8 @@ |
207 | // 权利其他状态 | 207 | // 权利其他状态 |
208 | let lines = this.bdcqz.qlqtzk ? this.bdcqz.qlqtzk.split('\n') : []; | 208 | let lines = this.bdcqz.qlqtzk ? this.bdcqz.qlqtzk.split('\n') : []; |
209 | for (let i = 0; i < lines.length; i++) { | 209 | for (let i = 0; i < lines.length; i++) { |
210 | let num = Math.ceil(getByteLen(lines[i]) / 38) | 210 | let num = Math.ceil(getByteLen(lines[i]) / 37) |
211 | if (getByteLen(lines[i]) > 38) { | 211 | if (getByteLen(lines[i]) > 37) { |
212 | let currentLine = ''; | 212 | let currentLine = ''; |
213 | let arr = []; | 213 | let arr = []; |
214 | for (let word of lines[i]) { | 214 | for (let word of lines[i]) { |
... | @@ -261,7 +261,7 @@ | ... | @@ -261,7 +261,7 @@ |
261 | }) | 261 | }) |
262 | }) | 262 | }) |
263 | let lines3 = this.bdcqz.syqx ? this.bdcqz.syqx.split(' ') : []; | 263 | let lines3 = this.bdcqz.syqx ? this.bdcqz.syqx.split(' ') : []; |
264 | if (getByteLen(this.bdcqz.syqx) > 41) { | 264 | if (getByteLen(this.bdcqz.syqx) > 37) { |
265 | lines3.forEach((line, index) => { | 265 | lines3.forEach((line, index) => { |
266 | const y = 423 + (index * 27); // 每行文本的垂直位置 | 266 | const y = 423 + (index * 27); // 每行文本的垂直位置 |
267 | let currentLine = ''; | 267 | let currentLine = ''; |
... | @@ -304,7 +304,7 @@ | ... | @@ -304,7 +304,7 @@ |
304 | } | 304 | } |
305 | 305 | ||
306 | let lines2 = this.bdcqz.zl ? this.bdcqz.zl.split(' ') : []; | 306 | let lines2 = this.bdcqz.zl ? this.bdcqz.zl.split(' ') : []; |
307 | if (getByteLen(this.bdcqz.zl) > 41) { | 307 | if (getByteLen(this.bdcqz.zl) > 37) { |
308 | lines2.forEach((line, index) => { | 308 | lines2.forEach((line, index) => { |
309 | const y = 170 + (index * 20); // 每行文本的垂直位置 | 309 | const y = 170 + (index * 20); // 每行文本的垂直位置 |
310 | let currentLine = ''; | 310 | let currentLine = ''; | ... | ... |
-
Please register or sign in to post a comment