style:证书打印
Showing
8 changed files
with
357 additions
and
128 deletions
| ... | @@ -220,6 +220,18 @@ aside { | ... | @@ -220,6 +220,18 @@ aside { |
| 220 | margin: 0 auto; | 220 | margin: 0 auto; |
| 221 | } | 221 | } |
| 222 | 222 | ||
| 223 | .ellipsis-table { | ||
| 224 | display: inline-block; | ||
| 225 | word-break: break-all; | ||
| 226 | text-overflow: ellipsis; | ||
| 227 | display: -webkit-box; | ||
| 228 | -webkit-box-orient: vertical; | ||
| 229 | -webkit-line-clamp: 2; | ||
| 230 | /* 这里是超出几行省略 */ | ||
| 231 | overflow: hidden; | ||
| 232 | margin: 0 auto; | ||
| 233 | } | ||
| 234 | |||
| 223 | .tooltip-width { | 235 | .tooltip-width { |
| 224 | max-width: 300px; | 236 | max-width: 300px; |
| 225 | } | 237 | } | ... | ... |
| 1 | /* | 1 | /* |
| 2 | * @Description: | 2 | * @Description: |
| 3 | * @Autor: renchao | 3 | * @Autor: renchao |
| 4 | * @LastEditTime: 2023-07-17 13:31:39 | 4 | * @LastEditTime: 2023-08-28 15:31:31 |
| 5 | */ | 5 | */ |
| 6 | import store from '@/store' | 6 | import store from '@/store' |
| 7 | // table 内部过滤器 由于过滤器只能在模板中使用 所以 就有了 jsx内部方法过滤器 | 7 | // table 内部过滤器 由于过滤器只能在模板中使用 所以 就有了 jsx内部方法过滤器 | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Description: | 2 | * @Description: |
| 3 | * @Autor: renchao | 3 | * @Autor: renchao |
| 4 | * @LastEditTime: 2023-08-28 09:02:00 | 4 | * @LastEditTime: 2023-08-28 10:34:21 |
| 5 | --> | 5 | --> |
| 6 | <template> | 6 | <template> |
| 7 | <el-form ref="ruleForm" :model="ruleForm" label-width="100px" :rules="rules"> | 7 | <el-form ref="ruleForm" :model="ruleForm" label-width="100px" :rules="rules"> |
| ... | @@ -183,11 +183,13 @@ | ... | @@ -183,11 +183,13 @@ |
| 183 | ); | 183 | ); |
| 184 | setTimeout(() => { | 184 | setTimeout(() => { |
| 185 | that.ruleForm.tmpcontent = document.getElementById("S1").value; | 185 | that.ruleForm.tmpcontent = document.getElementById("S1").value; |
| 186 | debugger | ||
| 187 | if (that.ruleForm.tmpno == 'zsdy') { | 186 | if (that.ruleForm.tmpno == 'zsdy') { |
| 188 | LODOP.ADD_PRINT_SETUP_BKIMG("<img border='0' src='http://192.168.2.38:9000/bdcdj/zhengshu_image/bdcqzs2.jpg'>"); | 187 | LODOP.ADD_PRINT_SETUP_BKIMG("<img border='0' src='http://192.168.2.38:9000/bdcdj/zhengshu_image/bdcqzs2.jpg'>"); |
| 189 | LODOP.SET_SHOW_MODE("BKIMG_PRINT", 1);//打印包含背景图 | 188 | LODOP.SET_SHOW_MODE("BKIMG_PRINT", 1);//打印包含背景图 |
| 190 | LODOP.SET_PRINT_PAGESIZE(1, 0, 0, "B4"); | 189 | LODOP.SET_PRINT_PAGESIZE(1, 0, 0, "B4"); |
| 190 | } else if (that.ruleForm.tmpno == 'zmdy') { | ||
| 191 | LODOP.ADD_PRINT_SETUP_BKIMG("<img border='0' src='http://192.168.2.38:9000/bdcdj/zhengshu_image/bdcdjzm.jpg'>"); | ||
| 192 | LODOP.SET_SHOW_MODE("BKIMG_PRINT", 1);//打印包含背景图 | ||
| 191 | } | 193 | } |
| 192 | that.loadStatus = '2'; | 194 | that.loadStatus = '2'; |
| 193 | }, 1000); | 195 | }, 1000); | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Description: | 2 | * @Description: |
| 3 | * @Autor: renchao | 3 | * @Autor: renchao |
| 4 | * @LastEditTime: 2023-08-25 16:25:57 | 4 | * @LastEditTime: 2023-08-28 14:14:09 |
| 5 | --> | 5 | --> |
| 6 | <template> | 6 | <template> |
| 7 | <div> | 7 | <div> |
| ... | @@ -22,8 +22,17 @@ | ... | @@ -22,8 +22,17 @@ |
| 22 | </el-select> | 22 | </el-select> |
| 23 | </el-form-item> | 23 | </el-form-item> |
| 24 | </el-form> | 24 | </el-form> |
| 25 | <div class="zs-content"> | 25 | |
| 26 | <canvas ref="zs" width="1000" class="zsyl" height="700"></canvas> | 26 | <el-tabs v-model="activeName" @tab-click="handleClick" v-if="headTabBdcqz.length >1"> |
| 27 | <el-tab-pane :label="item.qlr + (item.bdcqzh !== null ? '(' + item.bdcqzh + ')' : '')" :name="item.bsmBdcqz" | ||
| 28 | v-for="(item, index) in headTabBdcqz" :key="index"> | ||
| 29 | </el-tab-pane> | ||
| 30 | </el-tabs> | ||
| 31 | <el-empty description="暂无数据" v-if="headTabBdcqz.length == 0 && noData"></el-empty> | ||
| 32 | |||
| 33 | <div class="zs-content" style="width:1180px;"> | ||
| 34 | <canvas ref="zs" width="1000" v-show="headTabBdcqz[0]&&headTabBdcqz[0].bdcqzlx==1" height="700"></canvas> | ||
| 35 | <canvas ref="zm" width="1180" v-show="headTabBdcqz[0]&&headTabBdcqz[0].bdcqzlx!=1" height="780"></canvas> | ||
| 27 | </div> | 36 | </div> |
| 28 | </div> | 37 | </div> |
| 29 | <!-- 打印模板需要此模块 --> | 38 | <!-- 打印模板需要此模块 --> |
| ... | @@ -54,14 +63,21 @@ | ... | @@ -54,14 +63,21 @@ |
| 54 | }, | 63 | }, |
| 55 | data () { | 64 | data () { |
| 56 | return { | 65 | return { |
| 66 | key: 0, | ||
| 57 | // 不动产证书图片地址 | 67 | // 不动产证书图片地址 |
| 68 | noData: false, | ||
| 58 | imgSrc: require('@/image/bdcqz/bdcqzs2.jpg'), | 69 | imgSrc: require('@/image/bdcqz/bdcqzs2.jpg'), |
| 70 | bdczmSrc: require('@/image/bdcqz/bdczm.jpg'), | ||
| 59 | loading: false, | 71 | loading: false, |
| 60 | bdcqz: [], | 72 | bdcqz: [], |
| 61 | //印刷序列号集合 | 73 | //印刷序列号集合 |
| 62 | ysxlh: [], | 74 | ysxlh: [], |
| 63 | //列名称对象 | 75 | //列名称对象 |
| 64 | columns: [], | 76 | columns: [], |
| 77 | //tab切换栏数组 | ||
| 78 | headTabBdcqz: [], | ||
| 79 | //tab选择绑定值 | ||
| 80 | activeName: '', | ||
| 65 | ruleForm: { | 81 | ruleForm: { |
| 66 | bsmBdcqz: "", | 82 | bsmBdcqz: "", |
| 67 | szmc: "不动产权证书", | 83 | szmc: "不动产权证书", |
| ... | @@ -83,7 +99,6 @@ | ... | @@ -83,7 +99,6 @@ |
| 83 | this.getHeadTabBdcqz() | 99 | this.getHeadTabBdcqz() |
| 84 | }, | 100 | }, |
| 85 | methods: { | 101 | methods: { |
| 86 | //获取印刷序列号列表 | ||
| 87 | /** | 102 | /** |
| 88 | * @description: 获取印刷序列号列表 | 103 | * @description: 获取印刷序列号列表 |
| 89 | * @author: renchao | 104 | * @author: renchao |
| ... | @@ -103,15 +118,36 @@ | ... | @@ -103,15 +118,36 @@ |
| 103 | this.loading = true | 118 | this.loading = true |
| 104 | getSlsqBdcqzList({ bsmSlsq: this.formData.bsmSlsq }).then(res => { | 119 | getSlsqBdcqzList({ bsmSlsq: this.formData.bsmSlsq }).then(res => { |
| 105 | if (res.code == 200) { | 120 | if (res.code == 200) { |
| 121 | this.noData = true | ||
| 106 | if (res.result && res.result.length > 0) { | 122 | if (res.result && res.result.length > 0) { |
| 123 | this.activeName = res.result[0].bsmBdcqz | ||
| 107 | this.bdcqz = res.result[0] | 124 | this.bdcqz = res.result[0] |
| 108 | this.drawTextOnImage() | 125 | this.headTabBdcqz = res.result |
| 126 | if (res.result[0].bdcqzlx == 1) { | ||
| 127 | this.drawTextOnImage() | ||
| 128 | } else { | ||
| 129 | this.drawTextzmImage() | ||
| 130 | } | ||
| 109 | } | 131 | } |
| 110 | } | 132 | } |
| 111 | this.loading = false | 133 | this.loading = false |
| 112 | }) | 134 | }) |
| 113 | }, | 135 | }, |
| 114 | /** | 136 | /** |
| 137 | * @description: tab表头切换方法 | ||
| 138 | * @param {*} e | ||
| 139 | * @author: renchao | ||
| 140 | */ | ||
| 141 | handleClick (e) { | ||
| 142 | this.bdcqz = this.headTabBdcqz[e.index - 0] | ||
| 143 | this.activeName = this.headTabBdcqz.bsmBdcqz | ||
| 144 | if (this.bdcqz.bdcqzlx == 1) { | ||
| 145 | this.drawTextOnImage() | ||
| 146 | } else { | ||
| 147 | this.drawTextzmImage() | ||
| 148 | } | ||
| 149 | }, | ||
| 150 | /** | ||
| 115 | * @description: 不动产证书 | 151 | * @description: 不动产证书 |
| 116 | * @author: renchao | 152 | * @author: renchao |
| 117 | */ | 153 | */ |
| ... | @@ -198,6 +234,7 @@ | ... | @@ -198,6 +234,7 @@ |
| 198 | const maxWidth = 332; // 最大宽度限制 | 234 | const maxWidth = 332; // 最大宽度限制 |
| 199 | let lines = this.bdcqz.qlqtzk ? this.bdcqz.qlqtzk.split('\n') : []; | 235 | let lines = this.bdcqz.qlqtzk ? this.bdcqz.qlqtzk.split('\n') : []; |
| 200 | for (let i = 0; i < lines.length; i++) { | 236 | for (let i = 0; i < lines.length; i++) { |
| 237 | let num = Math.ceil(getByteLen(lines[i]) / 41) | ||
| 201 | if (getByteLen(lines[i]) > 41) { | 238 | if (getByteLen(lines[i]) > 41) { |
| 202 | let currentLine = ''; | 239 | let currentLine = ''; |
| 203 | let arr = []; | 240 | let arr = []; |
| ... | @@ -212,11 +249,21 @@ | ... | @@ -212,11 +249,21 @@ |
| 212 | } | 249 | } |
| 213 | } | 250 | } |
| 214 | arr.push(currentLine); | 251 | arr.push(currentLine); |
| 215 | arr.forEach((line, index) => { | 252 | if (i > 0) { |
| 216 | context.fillText(line, 129, 490 + (28 * (i - 1)) + (index * 14)); // 调整行高 | 253 | arr.forEach((line, index) => { |
| 217 | }) | 254 | context.fillText(line, 129, 490 + (28 * (i - 1)) + 5 * num + (index * 14)); // 调整行高 |
| 255 | }) | ||
| 256 | } else { | ||
| 257 | arr.forEach((line, index) => { | ||
| 258 | context.fillText(line, 129, 490 + (28 * (i - 1)) + (index * 14)); // 调整行高 | ||
| 259 | }) | ||
| 260 | } | ||
| 218 | } else { | 261 | } else { |
| 219 | context.fillText(lines[i] ? lines[i] : '', 129, 495 + (30 * (i - 1))); | 262 | if (i > 0) { |
| 263 | context.fillText(lines[i] ? lines[i] : '', 129, 495 + 5 * num + (30 * (i - 1))); | ||
| 264 | } else { | ||
| 265 | context.fillText(lines[i] ? lines[i] : '', 129, 495 + (30 * (i - 1))); | ||
| 266 | } | ||
| 220 | } | 267 | } |
| 221 | } | 268 | } |
| 222 | 269 | ||
| ... | @@ -329,6 +376,128 @@ | ... | @@ -329,6 +376,128 @@ |
| 329 | image.src = this.imgSrc | 376 | image.src = this.imgSrc |
| 330 | }, | 377 | }, |
| 331 | /** | 378 | /** |
| 379 | * @description: 不动产证明 | ||
| 380 | * @author: renchao | ||
| 381 | */ | ||
| 382 | drawTextzmImage () { | ||
| 383 | function getByteLen (val) { | ||
| 384 | var len = 0; | ||
| 385 | for (var i = 0; i < val.length; i++) { | ||
| 386 | var length = val.charCodeAt(i); | ||
| 387 | if (length >= 0 && length <= 128) { | ||
| 388 | len += 1; | ||
| 389 | } else { | ||
| 390 | len += 2; | ||
| 391 | } | ||
| 392 | } | ||
| 393 | return len; | ||
| 394 | } | ||
| 395 | |||
| 396 | const canvas = this.$refs.zm; | ||
| 397 | const context = canvas.getContext('2d'); | ||
| 398 | const image = new Image(); | ||
| 399 | image.onload = () => { | ||
| 400 | context.drawImage(image, 0, 0); | ||
| 401 | context.font = '16px 楷体'; | ||
| 402 | context.fillStyle = '#000000'; | ||
| 403 | // ysxlh | ||
| 404 | context.fillText(this.bdcqz.ysxlh ? this.bdcqz.ysxlh : '', 280, 712); | ||
| 405 | // djsj | ||
| 406 | if (this.bdcqz.djsj) { | ||
| 407 | let djsjList = this.bdcqz.djsj.split(' ')[0].split('/') | ||
| 408 | context.fillText(djsjList[0] ? djsjList[0] : '', 327, 580); | ||
| 409 | context.fillText(djsjList[1] ? djsjList[1] : '', 393, 580); | ||
| 410 | context.fillText(djsjList[2] ? djsjList[2] : '', 443, 580); | ||
| 411 | } | ||
| 412 | context.fillText(this.bdcqz.sjjc ? this.bdcqz.sjjc : '', 620, 125); | ||
| 413 | context.fillText(this.bdcqz.djnd ? this.bdcqz.djnd : '', 665, 125); | ||
| 414 | context.fillText(this.bdcqz.sxqc ? this.bdcqz.sxqc : '', 750, 125); | ||
| 415 | context.fillText(this.bdcqz.sxh ? this.bdcqz.sxh : '', 960, 123); | ||
| 416 | context.fillText(this.bdcqz.zmqlhsx ? this.bdcqz.zmqlhsx : '', 775, 180); | ||
| 417 | context.fillText(this.bdcqz.qlr ? this.bdcqz.qlr : '', 775, 228); | ||
| 418 | // 义务人 | ||
| 419 | context.fillText(this.bdcqz.ywr ? this.bdcqz.ywr : '', 775, 275); | ||
| 420 | context.fillText(this.bdcqz.zl ? this.bdcqz.zl : '', 775, 325); | ||
| 421 | // bdcdyh | ||
| 422 | this.bdcdyh = this.bdcqz.bdcdyh.slice(0, 6) + ' ' + this.bdcqz.bdcdyh.slice(6, 12) + ' ' + | ||
| 423 | this.bdcqz.bdcdyh.slice(12, 19) + ' ' + this.bdcqz.bdcdyh.slice(19, this.bdcqz.bdcdyh.length) | ||
| 424 | context.fillText(this.bdcdyh ? this.bdcdyh : '', 775, 373); | ||
| 425 | // qlqtzk | ||
| 426 | const maxWidth = 295; // 最大宽度限制 | ||
| 427 | let lines = this.bdcqz.qlqtzk ? this.bdcqz.qlqtzk.split('\n') : []; | ||
| 428 | for (let i = 0; i < lines.length; i++) { | ||
| 429 | let num = Math.ceil(getByteLen(lines[i]) / 41) | ||
| 430 | if (getByteLen(lines[i]) > 41) { | ||
| 431 | let currentLine = ''; | ||
| 432 | let arr = []; | ||
| 433 | for (let word of lines[i]) { | ||
| 434 | const testLine = currentLine + word; | ||
| 435 | const lineWidth = context.measureText(testLine).width; | ||
| 436 | if (lineWidth <= maxWidth) { | ||
| 437 | currentLine = testLine; | ||
| 438 | } else { | ||
| 439 | arr.push(currentLine); | ||
| 440 | currentLine = word; | ||
| 441 | } | ||
| 442 | } | ||
| 443 | arr.push(currentLine); | ||
| 444 | if (i > 0) { | ||
| 445 | arr.forEach((line, index) => { | ||
| 446 | context.fillText(line, 770, 438 + (23 * (i - 1)) + 5 * num + (index * 16)); // 调整行高 | ||
| 447 | }) | ||
| 448 | } else { | ||
| 449 | arr.forEach((line, index) => { | ||
| 450 | context.fillText(line, 770, 438 + (23 * (i - 1)) + (index * 16)); // 调整行高 | ||
| 451 | }) | ||
| 452 | } | ||
| 453 | } else { | ||
| 454 | if (i > 0) { | ||
| 455 | context.fillText(lines[i] ? lines[i] : '', 770, 450 + 5 * num + (23 * (i - 1))); | ||
| 456 | } else { | ||
| 457 | context.fillText(lines[i] ? lines[i] : '', 770, 450 + (23 * (i - 1))); | ||
| 458 | } | ||
| 459 | } | ||
| 460 | } | ||
| 461 | // fj | ||
| 462 | let lines1 = this.bdcqz.fj ? this.bdcqz.fj.split('\n') : []; | ||
| 463 | for (let i = 0; i < lines1.length; i++) { | ||
| 464 | let num = Math.ceil(getByteLen(lines1[i]) / 41) | ||
| 465 | if (getByteLen(lines1[i]) > 41) { | ||
| 466 | let currentLine = ''; | ||
| 467 | let arr = []; | ||
| 468 | for (let word of lines1[i]) { | ||
| 469 | const testLine = currentLine + word; | ||
| 470 | const lineWidth = context.measureText(testLine).width; | ||
| 471 | if (lineWidth <= maxWidth) { | ||
| 472 | currentLine = testLine; | ||
| 473 | } else { | ||
| 474 | arr.push(currentLine); | ||
| 475 | currentLine = word; | ||
| 476 | } | ||
| 477 | } | ||
| 478 | arr.push(currentLine); | ||
| 479 | if (i > 0) { | ||
| 480 | arr.forEach((line, index) => { | ||
| 481 | context.fillText(line, 770, 610 + (25 * (i - 1)) + 5 * num + (index * 15)); // 调整行高 | ||
| 482 | }) | ||
| 483 | } else { | ||
| 484 | arr.forEach((line, index) => { | ||
| 485 | context.fillText(line, 770, 610 + (25 * (i - 1)) + (index * 15)); // 调整行高 | ||
| 486 | }) | ||
| 487 | } | ||
| 488 | } else { | ||
| 489 | if (i > 0) { | ||
| 490 | context.fillText(lines1[i] ? lines1[i] : '', 770, 610 + 5 * num + (23 * (i - 1))); | ||
| 491 | } else { | ||
| 492 | context.fillText(lines1[i] ? lines1[i] : '', 770, 610 + (23 * (i - 1))); | ||
| 493 | } | ||
| 494 | } | ||
| 495 | } | ||
| 496 | } | ||
| 497 | |||
| 498 | image.src = this.bdczmSrc; | ||
| 499 | }, | ||
| 500 | /** | ||
| 332 | * @description: handleSubmit | 501 | * @description: handleSubmit |
| 333 | * @author: renchao | 502 | * @author: renchao |
| 334 | */ | 503 | */ |
| ... | @@ -347,31 +516,61 @@ | ... | @@ -347,31 +516,61 @@ |
| 347 | certificate(this.ruleForm).then((res) => { | 516 | certificate(this.ruleForm).then((res) => { |
| 348 | if (res.code === 200) { | 517 | if (res.code === 200) { |
| 349 | that.$popupCacel() | 518 | that.$popupCacel() |
| 350 | // this.$message.success("提交成功") | 519 | if (this.bdcqz.bdcqzlx == 1) { |
| 351 | getPrintTemplateByCode({ tmpno: 'zsdy' }).then(res => { | 520 | getPrintTemplateByCode({ tmpno: 'zsdy' }).then(res => { |
| 352 | if (res.code == 200) { | 521 | if (res.code == 200) { |
| 353 | getSlsqBdcqzList({ bsmSlsq: this.formData.bsmSlsq }).then(infoRes => { | 522 | getSlsqBdcqzList({ bsmSlsq: this.formData.bsmSlsq }).then(infoRes => { |
| 354 | if (infoRes.code == 200) { | 523 | if (infoRes.code == 200) { |
| 355 | if (infoRes.result && infoRes.result.length > 0) { | 524 | if (infoRes.result && infoRes.result.length > 0) { |
| 356 | //打开模板设计 | 525 | //打开模板设计 |
| 357 | let LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM')); | 526 | let LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM')); |
| 358 | LODOP.ADD_PRINT_DATA("ProgramData", res.result.tmpcontent); //装载模板 | 527 | LODOP.ADD_PRINT_DATA("ProgramData", res.result.tmpcontent); //装载模板 |
| 359 | 528 | ||
| 360 | infoRes.result[0].bdcdyh1 = infoRes.result[0].bdcdyh.slice(0, 6) + ' ' + infoRes.result[0].bdcdyh.slice(6, 12) + ' ' + | 529 | infoRes.result[0].bdcdyh1 = infoRes.result[0].bdcdyh.slice(0, 6) + ' ' + infoRes.result[0].bdcdyh.slice(6, 12) + ' ' + |
| 361 | infoRes.result[0].bdcdyh.slice(12, 19) + ' ' + infoRes.result[0].bdcdyh.slice(19, infoRes.result[0].bdcdyh.length) | 530 | infoRes.result[0].bdcdyh.slice(12, 19) + ' ' + infoRes.result[0].bdcdyh.slice(19, infoRes.result[0].bdcdyh.length) |
| 362 | //todo 调取后端接口获取数据 循环set | 531 | //todo 调取后端接口获取数据 循环set |
| 363 | for (let key in infoRes.result[0]) { | 532 | for (let key in infoRes.result[0]) { |
| 364 | LODOP.SET_PRINT_STYLEA(key, "CONTENT", infoRes.result[0][key]); | 533 | LODOP.SET_PRINT_STYLEA(key, "CONTENT", infoRes.result[0][key]); |
| 534 | } | ||
| 535 | LODOP.PREVIEW(); | ||
| 536 | that.$popupCacel() | ||
| 365 | } | 537 | } |
| 366 | LODOP.PREVIEW(); | ||
| 367 | that.$popupCacel() | ||
| 368 | } | 538 | } |
| 369 | } | 539 | }) |
| 370 | }) | 540 | } else { |
| 371 | } else { | 541 | this.$message.error(res.message) |
| 372 | this.$message.error(res.message) | 542 | } |
| 373 | } | 543 | }) |
| 374 | }) | 544 | } else { |
| 545 | getPrintTemplateByCode({ tmpno: 'zmdy' }).then(res => { | ||
| 546 | if (res.code == 200) { | ||
| 547 | getSlsqBdcqzList({ bsmSlsq: this.formData.bsmSlsq }).then(infoRes => { | ||
| 548 | if (infoRes.code == 200) { | ||
| 549 | if (infoRes.result && infoRes.result.length > 0) { | ||
| 550 | //打开模板设计 | ||
| 551 | let LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM')); | ||
| 552 | LODOP.ADD_PRINT_DATA("ProgramData", res.result.tmpcontent); //装载模板 | ||
| 553 | |||
| 554 | // 年月日 | ||
| 555 | infoRes.result[0].nian = infoRes.result[0].djsj.split(' ')[0].split('/')[0] | ||
| 556 | infoRes.result[0].yue = infoRes.result[0].djsj.split(' ')[0].split('/')[1] | ||
| 557 | infoRes.result[0].ri = infoRes.result[0].djsj.split(' ')[0].split('/')[1] | ||
| 558 | infoRes.result[0].bdcdyh1 = infoRes.result[0].bdcdyh.slice(0, 6) + ' ' + infoRes.result[0].bdcdyh.slice(6, 12) + ' ' + | ||
| 559 | infoRes.result[0].bdcdyh.slice(12, 19) + ' ' + infoRes.result[0].bdcdyh.slice(19, infoRes.result[0].bdcdyh.length) | ||
| 560 | //todo 调取后端接口获取数据 循环set | ||
| 561 | for (let key in infoRes.result[0]) { | ||
| 562 | LODOP.SET_PRINT_STYLEA(key, "CONTENT", infoRes.result[0][key]); | ||
| 563 | } | ||
| 564 | LODOP.PREVIEW(); | ||
| 565 | that.$popupCacel() | ||
| 566 | } | ||
| 567 | } | ||
| 568 | }) | ||
| 569 | } else { | ||
| 570 | this.$message.error(res.message) | ||
| 571 | } | ||
| 572 | }) | ||
| 573 | } | ||
| 375 | 574 | ||
| 376 | //刷新列表 | 575 | //刷新列表 |
| 377 | store.dispatch('user/reWorkFresh', true) | 576 | store.dispatch('user/reWorkFresh', true) | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Description: | 2 | * @Description: |
| 3 | * @Autor: renchao | 3 | * @Autor: renchao |
| 4 | * @LastEditTime: 2023-08-22 16:58:24 | 4 | * @LastEditTime: 2023-08-28 12:53:50 |
| 5 | --> | 5 | --> |
| 6 | <template> | 6 | <template> |
| 7 | <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px"> | 7 | <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px"> | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Description: | 2 | * @Description: |
| 3 | * @Autor: renchao | 3 | * @Autor: renchao |
| 4 | * @LastEditTime: 2023-08-25 14:10:54 | 4 | * @LastEditTime: 2023-08-28 13:57:58 |
| 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;"> |
| ... | @@ -204,26 +204,8 @@ | ... | @@ -204,26 +204,8 @@ |
| 204 | // 权利其他状态 | 204 | // 权利其他状态 |
| 205 | const maxWidth = 332; // 最大宽度限制 | 205 | const maxWidth = 332; // 最大宽度限制 |
| 206 | let lines = this.bdcqz.qlqtzk ? this.bdcqz.qlqtzk.split('\n') : []; | 206 | let lines = this.bdcqz.qlqtzk ? this.bdcqz.qlqtzk.split('\n') : []; |
| 207 | // lines.forEach((line, index) => { | ||
| 208 | // const y = 463 + (index * 33); // 每行文本的垂直位置 | ||
| 209 | // let currentLine = ''; | ||
| 210 | // let arr = []; | ||
| 211 | // for (let word of line) { | ||
| 212 | // const testLine = currentLine + word; | ||
| 213 | // const lineWidth = context.measureText(testLine).width; | ||
| 214 | // if (lineWidth <= maxWidth) { | ||
| 215 | // currentLine = testLine; | ||
| 216 | // } else { | ||
| 217 | // arr.push(currentLine); | ||
| 218 | // currentLine = word; | ||
| 219 | // } | ||
| 220 | // } | ||
| 221 | // arr.push(currentLine); | ||
| 222 | // arr.forEach((line, index) => { | ||
| 223 | // context.fillText(line, 129, y + (index * 17)); // 调整行高 | ||
| 224 | // }) | ||
| 225 | // }) | ||
| 226 | for (let i = 0; i < lines.length; i++) { | 207 | for (let i = 0; i < lines.length; i++) { |
| 208 | let num = Math.ceil(getByteLen(lines[i]) / 41) | ||
| 227 | if (getByteLen(lines[i]) > 41) { | 209 | if (getByteLen(lines[i]) > 41) { |
| 228 | let currentLine = ''; | 210 | let currentLine = ''; |
| 229 | let arr = []; | 211 | let arr = []; |
| ... | @@ -238,11 +220,21 @@ | ... | @@ -238,11 +220,21 @@ |
| 238 | } | 220 | } |
| 239 | } | 221 | } |
| 240 | arr.push(currentLine); | 222 | arr.push(currentLine); |
| 241 | arr.forEach((line, index) => { | 223 | if (i > 0) { |
| 242 | context.fillText(line, 129, 485 + (28 * (i - 1)) + (index * 14)); // 调整行高 | 224 | arr.forEach((line, index) => { |
| 243 | }) | 225 | context.fillText(line, 129, 485 + (28 * (i - 1)) + 5 * num + (index * 14)); // 调整行高 |
| 226 | }) | ||
| 227 | } else { | ||
| 228 | arr.forEach((line, index) => { | ||
| 229 | context.fillText(line, 129, 485 + (28 * (i - 1)) + (index * 14)); // 调整行高 | ||
| 230 | }) | ||
| 231 | } | ||
| 244 | } else { | 232 | } else { |
| 245 | context.fillText(lines[i] ? lines[i] : '', 129, 495 + (25 * (i - 1))); | 233 | if (i > 0) { |
| 234 | context.fillText(lines[i] ? lines[i] : '', 129, 495 + 5 * num + (25 * (i - 1))); | ||
| 235 | } else { | ||
| 236 | context.fillText(lines[i] ? lines[i] : '', 129, 495 + (25 * (i - 1))); | ||
| 237 | } | ||
| 246 | } | 238 | } |
| 247 | } | 239 | } |
| 248 | 240 | ||
| ... | @@ -404,12 +396,12 @@ | ... | @@ -404,12 +396,12 @@ |
| 404 | // qlqtzk | 396 | // qlqtzk |
| 405 | const maxWidth = 295; // 最大宽度限制 | 397 | const maxWidth = 295; // 最大宽度限制 |
| 406 | let lines = this.bdcqz.qlqtzk ? this.bdcqz.qlqtzk.split('\n') : []; | 398 | let lines = this.bdcqz.qlqtzk ? this.bdcqz.qlqtzk.split('\n') : []; |
| 407 | if (lines[0]) { | 399 | for (let i = 0; i < lines.length; i++) { |
| 408 | lines[0].split(' ').forEach((line, index) => { | 400 | let num = Math.ceil(getByteLen(lines[i]) / 41) |
| 409 | const y = 415 + (index * 30); // 每行文本的垂直位置 | 401 | if (getByteLen(lines[i]) > 41) { |
| 410 | let currentLine = ''; | 402 | let currentLine = ''; |
| 411 | let arr = []; | 403 | let arr = []; |
| 412 | for (let word of line) { | 404 | for (let word of lines[i]) { |
| 413 | const testLine = currentLine + word; | 405 | const testLine = currentLine + word; |
| 414 | const lineWidth = context.measureText(testLine).width; | 406 | const lineWidth = context.measureText(testLine).width; |
| 415 | if (lineWidth <= maxWidth) { | 407 | if (lineWidth <= maxWidth) { |
| ... | @@ -420,52 +412,58 @@ | ... | @@ -420,52 +412,58 @@ |
| 420 | } | 412 | } |
| 421 | } | 413 | } |
| 422 | arr.push(currentLine); | 414 | arr.push(currentLine); |
| 423 | arr.forEach((line, index) => { | 415 | if (i > 0) { |
| 424 | context.fillText(line, 775, y + (index * 14)); // 调整行高 | 416 | arr.forEach((line, index) => { |
| 425 | }); | 417 | context.fillText(line, 770, 438 + (23 * (i - 1)) + 5 * num + (index * 16)); // 调整行高 |
| 426 | }); | 418 | }) |
| 427 | } | ||
| 428 | |||
| 429 | lines.slice(1).forEach((line, index) => { | ||
| 430 | const y = ((parseInt(lines[0].length) / 19) * 22) + 415 + (index * 20); // 每行文本的垂直位置 | ||
| 431 | let currentLine = ''; | ||
| 432 | let arr = []; | ||
| 433 | for (let word of line) { | ||
| 434 | const testLine = currentLine + word; | ||
| 435 | const lineWidth = context.measureText(testLine).width; | ||
| 436 | if (lineWidth <= maxWidth) { | ||
| 437 | currentLine = testLine; | ||
| 438 | } else { | 419 | } else { |
| 439 | arr.push(currentLine); | 420 | arr.forEach((line, index) => { |
| 440 | currentLine = word; | 421 | context.fillText(line, 770, 438 + (23 * (i - 1)) + (index * 16)); // 调整行高 |
| 422 | }) | ||
| 423 | } | ||
| 424 | } else { | ||
| 425 | if (i > 0) { | ||
| 426 | context.fillText(lines[i] ? lines[i] : '', 770, 450 + 5 * num + (23 * (i - 1))); | ||
| 427 | } else { | ||
| 428 | context.fillText(lines[i] ? lines[i] : '', 770, 450 + (23 * (i - 1))); | ||
| 441 | } | 429 | } |
| 442 | } | 430 | } |
| 443 | arr.push(currentLine); | 431 | } |
| 444 | arr.forEach((line, index) => { | ||
| 445 | context.fillText(line, 775, y + (index * 16)); // 调整行高 | ||
| 446 | }) | ||
| 447 | }) | ||
| 448 | // fj | 432 | // fj |
| 449 | let lines1 = this.bdcqz.fj ? this.bdcqz.fj.split('\n') : []; | 433 | let lines1 = this.bdcqz.fj ? this.bdcqz.fj.split('\n') : []; |
| 450 | lines1.forEach((line, index) => { | 434 | for (let i = 0; i < lines1.length; i++) { |
| 451 | const y = 590 + (index * 27); // 每行文本的垂直位置 | 435 | let num = Math.ceil(getByteLen(lines1[i]) / 41) |
| 452 | let currentLine = ''; | 436 | if (getByteLen(lines1[i]) > 41) { |
| 453 | let arr = []; | 437 | let currentLine = ''; |
| 454 | for (let word of line) { | 438 | let arr = []; |
| 455 | const testLine = currentLine + word; | 439 | for (let word of lines1[i]) { |
| 456 | const lineWidth = context.measureText(testLine).width; | 440 | const testLine = currentLine + word; |
| 457 | if (lineWidth <= maxWidth) { | 441 | const lineWidth = context.measureText(testLine).width; |
| 458 | currentLine = testLine; | 442 | if (lineWidth <= maxWidth) { |
| 443 | currentLine = testLine; | ||
| 444 | } else { | ||
| 445 | arr.push(currentLine); | ||
| 446 | currentLine = word; | ||
| 447 | } | ||
| 448 | } | ||
| 449 | arr.push(currentLine); | ||
| 450 | if (i > 0) { | ||
| 451 | arr.forEach((line, index) => { | ||
| 452 | context.fillText(line, 770, 610 + (25 * (i - 1)) + 5 * num + (index * 15)); // 调整行高 | ||
| 453 | }) | ||
| 459 | } else { | 454 | } else { |
| 460 | arr.push(currentLine); | 455 | arr.forEach((line, index) => { |
| 461 | currentLine = word; | 456 | context.fillText(line, 770, 610 + (25 * (i - 1)) + (index * 15)); // 调整行高 |
| 457 | }) | ||
| 458 | } | ||
| 459 | } else { | ||
| 460 | if (i > 0) { | ||
| 461 | context.fillText(lines1[i] ? lines1[i] : '', 770, 610 + 5 * num + (23 * (i - 1))); | ||
| 462 | } else { | ||
| 463 | context.fillText(lines1[i] ? lines1[i] : '', 770, 610 + (23 * (i - 1))); | ||
| 462 | } | 464 | } |
| 463 | } | 465 | } |
| 464 | arr.push(currentLine); | 466 | } |
| 465 | arr.forEach((line, index) => { | ||
| 466 | context.fillText(line, 775, y + (index * 20)); // 调整行高 | ||
| 467 | }) | ||
| 468 | }) | ||
| 469 | } | 467 | } |
| 470 | 468 | ||
| 471 | image.src = this.bdczmSrc; | 469 | image.src = this.bdczmSrc; | ... | ... |
| 1 | /* | 1 | /* |
| 2 | * @Description: | 2 | * @Description: |
| 3 | * @Autor: renchao | 3 | * @Autor: renchao |
| 4 | * @LastEditTime: 2023-08-23 15:06:21 | 4 | * @LastEditTime: 2023-08-28 15:33:05 |
| 5 | */ | 5 | */ |
| 6 | import filter from '@/utils/filter.js' | 6 | import filter from '@/utils/filter.js' |
| 7 | let vm = null | 7 | let vm = null |
| ... | @@ -30,11 +30,11 @@ class data extends filter { | ... | @@ -30,11 +30,11 @@ class data extends filter { |
| 30 | { | 30 | { |
| 31 | prop: "ywlymc", | 31 | prop: "ywlymc", |
| 32 | label: "业务来源", | 32 | label: "业务来源", |
| 33 | width: '100' | 33 | minWidth: '100' |
| 34 | }, | 34 | }, |
| 35 | { | 35 | { |
| 36 | label: "流程状态", | 36 | label: "流程状态", |
| 37 | width: '80', | 37 | minWidth: '80', |
| 38 | render: (h, scope) => { | 38 | render: (h, scope) => { |
| 39 | if (scope.row.cfgqzt == '1') { | 39 | if (scope.row.cfgqzt == '1') { |
| 40 | return <div class='suspend'>查封挂起</div> | 40 | return <div class='suspend'>查封挂起</div> |
| ... | @@ -48,12 +48,12 @@ class data extends filter { | ... | @@ -48,12 +48,12 @@ class data extends filter { |
| 48 | { | 48 | { |
| 49 | prop: "zbhj", | 49 | prop: "zbhj", |
| 50 | label: "在办环节", | 50 | label: "在办环节", |
| 51 | width: '80' | 51 | minWidth: '80' |
| 52 | }, | 52 | }, |
| 53 | { | 53 | { |
| 54 | label: '业务号', | 54 | label: '业务号', |
| 55 | align: 'center', | 55 | align: 'center', |
| 56 | width: '100', | 56 | minWidth: '100', |
| 57 | render: (h, scope) => { | 57 | render: (h, scope) => { |
| 58 | return <el-button type="text" onClick={() => { vm.ywhClick(scope.row) }}>{scope.row.ywh}</el-button> | 58 | return <el-button type="text" onClick={() => { vm.ywhClick(scope.row) }}>{scope.row.ywh}</el-button> |
| 59 | } | 59 | } |
| ... | @@ -61,30 +61,49 @@ class data extends filter { | ... | @@ -61,30 +61,49 @@ class data extends filter { |
| 61 | { | 61 | { |
| 62 | prop: "sqywmc", | 62 | prop: "sqywmc", |
| 63 | label: "申请业务名称", | 63 | label: "申请业务名称", |
| 64 | width: '220' | 64 | minWidth: '220' |
| 65 | }, | 65 | }, |
| 66 | { | 66 | { |
| 67 | prop: "bdcdyh", | 67 | prop: "bdcdyh", |
| 68 | label: "不动产单元号", | 68 | label: "不动产单元号", |
| 69 | width: '170', | 69 | minWidth: '170', |
| 70 | }, | 70 | }, |
| 71 | { | 71 | { |
| 72 | prop: "qlrmc", | ||
| 73 | label: "权利人", | 72 | label: "权利人", |
| 74 | width: '120', | 73 | width: '120', |
| 75 | showOverflowTooltip: true | 74 | render: (h, scope) => { |
| 75 | return ( | ||
| 76 | <div> | ||
| 77 | <el-tooltip effect="dark" content={scope.row.qlrmc} placement="top" popper-class="tooltip-width "> | ||
| 78 | <span class="ellipsis-table"> {scope.row.qlrmc}</span> | ||
| 79 | </el-tooltip> | ||
| 80 | </div> | ||
| 81 | ) | ||
| 82 | } | ||
| 76 | }, | 83 | }, |
| 77 | { | 84 | { |
| 78 | prop: "ywrmc", | ||
| 79 | label: "义务人", | 85 | label: "义务人", |
| 80 | width: '120', | 86 | width: '120', |
| 81 | showOverflowTooltip: true | 87 | render: (h, scope) => { |
| 88 | return ( | ||
| 89 | <div> | ||
| 90 | <el-tooltip effect="dark" content={scope.row.ywrmc} placement="top" popper-class="tooltip-width "> | ||
| 91 | <span class="ellipsis-table"> {scope.row.ywrmc}</span> | ||
| 92 | </el-tooltip> | ||
| 93 | </div> | ||
| 94 | ) | ||
| 95 | } | ||
| 82 | }, | 96 | }, |
| 83 | { | 97 | { |
| 84 | prop: "zl", | ||
| 85 | label: "坐落", | 98 | label: "坐落", |
| 86 | width: '150', | 99 | width: '150', |
| 87 | showOverflowTooltip: true, | 100 | render: (h, scope) => { |
| 101 | return ( | ||
| 102 | <el-tooltip effect="dark" content={scope.row.zl} placement="top" popper-class="tooltip-width "> | ||
| 103 | <span class="ellipsis-table"> {scope.row.zl}</span> | ||
| 104 | </el-tooltip> | ||
| 105 | ) | ||
| 106 | } | ||
| 88 | }, | 107 | }, |
| 89 | { | 108 | { |
| 90 | prop: "slsj", | 109 | prop: "slsj", |
| ... | @@ -95,21 +114,14 @@ class data extends filter { | ... | @@ -95,21 +114,14 @@ class data extends filter { |
| 95 | { | 114 | { |
| 96 | prop: "slry", | 115 | prop: "slry", |
| 97 | label: "受理人员", | 116 | label: "受理人员", |
| 98 | minWidth: '80' | 117 | width: '80' |
| 99 | }, | 118 | }, |
| 100 | { | 119 | { |
| 101 | label: "转入时间", | 120 | label: "转入时间", |
| 102 | sortable: 'custom', | 121 | sortable: 'custom', |
| 103 | prop: 'fromstepdate', | 122 | prop: 'fromstepdate', |
| 104 | width: '140' | 123 | width: '140' |
| 105 | }, | 124 | } |
| 106 | // { | ||
| 107 | // label: '操作', | ||
| 108 | // width: '80', | ||
| 109 | // render: (h, scope) => { | ||
| 110 | // return <el-button type="text" icon="el-icon-delete" onClick={() => { vm.del(scope.row) }}>删除</el-button> | ||
| 111 | // } | ||
| 112 | // } | ||
| 113 | ] | 125 | ] |
| 114 | } | 126 | } |
| 115 | } | 127 | } | ... | ... |
| 1 | /* | 1 | /* |
| 2 | * @Description: | 2 | * @Description: |
| 3 | * @Autor: renchao | 3 | * @Autor: renchao |
| 4 | * @LastEditTime: 2023-08-23 15:04:35 | 4 | * @LastEditTime: 2023-08-28 15:33:57 |
| 5 | */ | 5 | */ |
| 6 | import filter from '@/utils/filter.js' | 6 | import filter from '@/utils/filter.js' |
| 7 | let vm = null | 7 | let vm = null |
| ... | @@ -73,10 +73,15 @@ class data extends filter { | ... | @@ -73,10 +73,15 @@ class data extends filter { |
| 73 | label: "义务人", | 73 | label: "义务人", |
| 74 | }, | 74 | }, |
| 75 | { | 75 | { |
| 76 | prop: "zl", | ||
| 77 | label: "坐落", | 76 | label: "坐落", |
| 78 | showOverflowTooltip: true, | 77 | width: '150', |
| 79 | minWidth: '130' | 78 | render: (h, scope) => { |
| 79 | return ( | ||
| 80 | <el-tooltip effect="dark" content={scope.row.zl} placement="top" popper-class="tooltip-width "> | ||
| 81 | <span class="ellipsis-table"> {scope.row.zl}</span> | ||
| 82 | </el-tooltip> | ||
| 83 | ) | ||
| 84 | } | ||
| 80 | }, | 85 | }, |
| 81 | { | 86 | { |
| 82 | prop: "slsj", | 87 | prop: "slsj", |
| ... | @@ -87,6 +92,7 @@ class data extends filter { | ... | @@ -87,6 +92,7 @@ class data extends filter { |
| 87 | { | 92 | { |
| 88 | prop: "slry", | 93 | prop: "slry", |
| 89 | label: "受理人员", | 94 | label: "受理人员", |
| 95 | width: '80' | ||
| 90 | }, | 96 | }, |
| 91 | { | 97 | { |
| 92 | label: "转出时间", | 98 | label: "转出时间", | ... | ... |
-
Please register or sign in to post a comment