Merge branch 'dev' of http://yun.pashanhoo.com:9090/bdc/bdcdj-web into dev
Showing
5 changed files
with
107 additions
and
52 deletions
public/bdcqzs2.jpg
0 → 100644
201 KB
... | @@ -142,7 +142,7 @@ | ... | @@ -142,7 +142,7 @@ |
142 | this.defaultNode = getNode( | 142 | this.defaultNode = getNode( |
143 | this.formData.qllx, | 143 | this.formData.qllx, |
144 | { linShi: 0, xianShi: 0, liShi: 0 }, | 144 | { linShi: 0, xianShi: 0, liShi: 0 }, |
145 | this.formData.bdcdylx || "" | 145 | res.result.bdcdylx|| "" |
146 | ); | 146 | ); |
147 | this.sfqdata[0].children.forEach((item, index) => { | 147 | this.sfqdata[0].children.forEach((item, index) => { |
148 | if (item.id == this.defaultNode.id) { | 148 | if (item.id == this.defaultNode.id) { |
... | @@ -229,7 +229,6 @@ | ... | @@ -229,7 +229,6 @@ |
229 | * @author: renchao | 229 | * @author: renchao |
230 | */ | 230 | */ |
231 | loadComponent (form) { | 231 | loadComponent (form) { |
232 | console.log(form, 'form'); | ||
233 | this.componentTag = (r) => | 232 | this.componentTag = (r) => |
234 | require.ensure([], () => r(require("@/views/registerBook/" + form))); | 233 | require.ensure([], () => r(require("@/views/registerBook/" + form))); |
235 | }, | 234 | }, | ... | ... |
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-08-25 10:34:46 | 4 | * @LastEditTime: 2023-08-25 14:43:39 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <div> | 7 | <div> |
... | @@ -26,6 +26,10 @@ | ... | @@ -26,6 +26,10 @@ |
26 | <canvas ref="zs" width="1000" class="zsyl" height="700"></canvas> | 26 | <canvas ref="zs" width="1000" class="zsyl" height="700"></canvas> |
27 | </div> | 27 | </div> |
28 | </div> | 28 | </div> |
29 | <!-- 打印模板需要此模块 --> | ||
30 | <object id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" v-show="false"> | ||
31 | <embed id="LODOP_EM" type="application/x-print-lodop" width="1180" height="720" pluginspage="install_lodop32.exe" /> | ||
32 | </object> | ||
29 | <div class="text-center pt-10"> | 33 | <div class="text-center pt-10"> |
30 | <el-button @click="$popupCacel">取消</el-button> | 34 | <el-button @click="$popupCacel">取消</el-button> |
31 | <el-button type="primary" @click="handleSubmit">确定</el-button> | 35 | <el-button type="primary" @click="handleSubmit">确定</el-button> |
... | @@ -36,6 +40,8 @@ | ... | @@ -36,6 +40,8 @@ |
36 | <script> | 40 | <script> |
37 | import store from '@/store/index.js' | 41 | import store from '@/store/index.js' |
38 | import { datas } from "../../javascript/zsyl.js"; | 42 | import { datas } from "../../javascript/zsyl.js"; |
43 | import { getPrintTemplateByCode } from "@/api/print"; | ||
44 | import { getLodop } from "@/utils/LodopFuncs" | ||
39 | import { readYsxlh, certificate, getSlsqBdcqzList } from "@/api/bdcqz.js"; | 45 | import { readYsxlh, certificate, getSlsqBdcqzList } from "@/api/bdcqz.js"; |
40 | export default { | 46 | export default { |
41 | props: { | 47 | props: { |
... | @@ -89,7 +95,6 @@ | ... | @@ -89,7 +95,6 @@ |
89 | } | 95 | } |
90 | }) | 96 | }) |
91 | }, | 97 | }, |
92 | //获取受理申请下全部不动产权证 | ||
93 | /** | 98 | /** |
94 | * @description: 获取受理申请下全部不动产权证 | 99 | * @description: 获取受理申请下全部不动产权证 |
95 | * @author: renchao | 100 | * @author: renchao |
... | @@ -189,30 +194,32 @@ | ... | @@ -189,30 +194,32 @@ |
189 | }) | 194 | }) |
190 | }) | 195 | }) |
191 | } | 196 | } |
192 | 197 | // 权利其他状态 | |
193 | // context.fillText(this.bdcqz.syqx ? this.bdcqz.syqx : '', 129, 429); | 198 | const maxWidth = 332; // 最大宽度限制 |
194 | // qlqtzk | ||
195 | const maxWidth = 330; // 最大宽度限制 | ||
196 | let lines = this.bdcqz.qlqtzk ? this.bdcqz.qlqtzk.split('\n') : []; | 199 | let lines = this.bdcqz.qlqtzk ? this.bdcqz.qlqtzk.split('\n') : []; |
197 | lines.forEach((line, index) => { | 200 | for (let i = 0; i < lines.length; i++) { |
198 | const y = 463 + (index * 40); // 每行文本的垂直位置 | 201 | if (getByteLen(lines[i]) > 41) { |
199 | let currentLine = ''; | 202 | let currentLine = ''; |
200 | let arr = []; | 203 | let arr = []; |
201 | for (let word of line) { | 204 | for (let word of lines[i]) { |
202 | const testLine = currentLine + word; | 205 | const testLine = currentLine + word; |
203 | const lineWidth = context.measureText(testLine).width; | 206 | const lineWidth = context.measureText(testLine).width; |
204 | if (lineWidth <= maxWidth) { | 207 | if (lineWidth <= maxWidth) { |
205 | currentLine = testLine; | 208 | currentLine = testLine; |
206 | } else { | 209 | } else { |
207 | arr.push(currentLine); | 210 | arr.push(currentLine); |
208 | currentLine = word; | 211 | currentLine = word; |
212 | } | ||
209 | } | 213 | } |
214 | arr.push(currentLine); | ||
215 | arr.forEach((line, index) => { | ||
216 | context.fillText(line, 129, 490 + (28 * (i - 1)) + (index * 14)); // 调整行高 | ||
217 | }) | ||
218 | } else { | ||
219 | context.fillText(lines[i] ? lines[i] : '', 129, 495 + (30 * (i - 1))); | ||
210 | } | 220 | } |
211 | arr.push(currentLine); | 221 | } |
212 | arr.forEach((line, index) => { | 222 | |
213 | context.fillText(line, 129, y + (index * 20)); // 调整行高 | ||
214 | }) | ||
215 | }) | ||
216 | let lines1 = this.bdcqz.fj ? this.bdcqz.fj.split('\n') : []; | 223 | let lines1 = this.bdcqz.fj ? this.bdcqz.fj.split('\n') : []; |
217 | lines1.forEach((line, index) => { | 224 | lines1.forEach((line, index) => { |
218 | const y = 100 + (index * 30); // 每行文本的垂直位置 | 225 | const y = 100 + (index * 30); // 每行文本的垂直位置 |
... | @@ -328,19 +335,44 @@ | ... | @@ -328,19 +335,44 @@ |
328 | handleSubmit () { | 335 | handleSubmit () { |
329 | this.savePrintRecord() | 336 | this.savePrintRecord() |
330 | }, | 337 | }, |
331 | //保存打印记录 | ||
332 | /** | 338 | /** |
333 | * @description: 保存打印记录 | 339 | * @description: 保存打印记录 |
334 | * @author: renchao | 340 | * @author: renchao |
335 | */ | 341 | */ |
336 | savePrintRecord () { | 342 | savePrintRecord () { |
343 | let that = this | ||
337 | this.ruleForm.bsmBdcqz = this.formData.bdcqz.bsmBdcqz; | 344 | this.ruleForm.bsmBdcqz = this.formData.bdcqz.bsmBdcqz; |
338 | this.ruleForm.bdcqzlx = this.formData.bdcqz.bdcqzlx; | 345 | this.ruleForm.bdcqzlx = this.formData.bdcqz.bdcqzlx; |
339 | this.ruleForm.szzh = this.formData.bdcqz.bdcqzh; | 346 | this.ruleForm.szzh = this.formData.bdcqz.bdcqzh; |
340 | certificate(this.ruleForm).then((res) => { | 347 | certificate(this.ruleForm).then((res) => { |
341 | if (res.code === 200) { | 348 | if (res.code === 200) { |
342 | this.$popupCacel() | 349 | that.$popupCacel() |
343 | this.$message.success("提交成功") | 350 | // this.$message.success("提交成功") |
351 | getPrintTemplateByCode({ tmpno: 'zsdy' }).then(res => { | ||
352 | if (res.code == 200) { | ||
353 | getSlsqBdcqzList({ bsmSlsq: this.formData.bsmSlsq }).then(infoRes => { | ||
354 | if (infoRes.code == 200) { | ||
355 | if (infoRes.result && infoRes.result.length > 0) { | ||
356 | //打开模板设计 | ||
357 | let LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM')); | ||
358 | LODOP.ADD_PRINT_DATA("ProgramData", res.result.tmpcontent); //装载模板 | ||
359 | |||
360 | 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) | ||
362 | //todo 调取后端接口获取数据 循环set | ||
363 | for (let key in infoRes.result[0]) { | ||
364 | LODOP.SET_PRINT_STYLEA(key, "CONTENT", infoRes.result[0][key]); | ||
365 | } | ||
366 | LODOP.PREVIEW(); | ||
367 | that.$popupCacel() | ||
368 | } | ||
369 | } | ||
370 | }) | ||
371 | } else { | ||
372 | this.$message.error(res.message) | ||
373 | } | ||
374 | }) | ||
375 | |||
344 | //刷新列表 | 376 | //刷新列表 |
345 | store.dispatch('user/reWorkFresh', true) | 377 | store.dispatch('user/reWorkFresh', true) |
346 | } else { | 378 | } else { | ... | ... |
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-08-25 10:44:31 | 4 | * @LastEditTime: 2023-08-25 14:10:54 |
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;"> |
... | @@ -201,28 +201,51 @@ | ... | @@ -201,28 +201,51 @@ |
201 | }) | 201 | }) |
202 | } | 202 | } |
203 | // context.fillText(this.bdcqz.syqx ? this.bdcqz.syqx : '', 129, 429); | 203 | // context.fillText(this.bdcqz.syqx ? this.bdcqz.syqx : '', 129, 429); |
204 | // qlqtzk | 204 | // 权利其他状态 |
205 | const maxWidth = 330; // 最大宽度限制 | 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) => { | 207 | // lines.forEach((line, index) => { |
208 | const y = 463 + (index * 40); // 每行文本的垂直位置 | 208 | // const y = 463 + (index * 33); // 每行文本的垂直位置 |
209 | let currentLine = ''; | 209 | // let currentLine = ''; |
210 | let arr = []; | 210 | // let arr = []; |
211 | for (let word of line) { | 211 | // for (let word of line) { |
212 | const testLine = currentLine + word; | 212 | // const testLine = currentLine + word; |
213 | const lineWidth = context.measureText(testLine).width; | 213 | // const lineWidth = context.measureText(testLine).width; |
214 | if (lineWidth <= maxWidth) { | 214 | // if (lineWidth <= maxWidth) { |
215 | currentLine = testLine; | 215 | // currentLine = testLine; |
216 | } else { | 216 | // } else { |
217 | arr.push(currentLine); | 217 | // arr.push(currentLine); |
218 | currentLine = word; | 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++) { | ||
227 | if (getByteLen(lines[i]) > 41) { | ||
228 | let currentLine = ''; | ||
229 | let arr = []; | ||
230 | for (let word of lines[i]) { | ||
231 | const testLine = currentLine + word; | ||
232 | const lineWidth = context.measureText(testLine).width; | ||
233 | if (lineWidth <= maxWidth) { | ||
234 | currentLine = testLine; | ||
235 | } else { | ||
236 | arr.push(currentLine); | ||
237 | currentLine = word; | ||
238 | } | ||
219 | } | 239 | } |
240 | arr.push(currentLine); | ||
241 | arr.forEach((line, index) => { | ||
242 | context.fillText(line, 129, 485 + (28 * (i - 1)) + (index * 14)); // 调整行高 | ||
243 | }) | ||
244 | } else { | ||
245 | context.fillText(lines[i] ? lines[i] : '', 129, 495 + (25 * (i - 1))); | ||
220 | } | 246 | } |
221 | arr.push(currentLine); | 247 | } |
222 | arr.forEach((line, index) => { | 248 | |
223 | context.fillText(line, 129, y + (index * 20)); // 调整行高 | ||
224 | }) | ||
225 | }) | ||
226 | let lines1 = this.bdcqz.fj ? this.bdcqz.fj.split('\n') : []; | 249 | let lines1 = this.bdcqz.fj ? this.bdcqz.fj.split('\n') : []; |
227 | lines1.forEach((line, index) => { | 250 | lines1.forEach((line, index) => { |
228 | const y = 100 + (index * 30); // 每行文本的垂直位置 | 251 | const y = 100 + (index * 30); // 每行文本的垂直位置 |
... | @@ -383,7 +406,7 @@ | ... | @@ -383,7 +406,7 @@ |
383 | let lines = this.bdcqz.qlqtzk ? this.bdcqz.qlqtzk.split('\n') : []; | 406 | let lines = this.bdcqz.qlqtzk ? this.bdcqz.qlqtzk.split('\n') : []; |
384 | if (lines[0]) { | 407 | if (lines[0]) { |
385 | lines[0].split(' ').forEach((line, index) => { | 408 | lines[0].split(' ').forEach((line, index) => { |
386 | const y = 415 + (index * 60); // 每行文本的垂直位置 | 409 | const y = 415 + (index * 30); // 每行文本的垂直位置 |
387 | let currentLine = ''; | 410 | let currentLine = ''; |
388 | let arr = []; | 411 | let arr = []; |
389 | for (let word of line) { | 412 | for (let word of line) { |
... | @@ -398,13 +421,13 @@ | ... | @@ -398,13 +421,13 @@ |
398 | } | 421 | } |
399 | arr.push(currentLine); | 422 | arr.push(currentLine); |
400 | arr.forEach((line, index) => { | 423 | arr.forEach((line, index) => { |
401 | context.fillText(line, 775, y + (index * 23)); // 调整行高 | 424 | context.fillText(line, 775, y + (index * 14)); // 调整行高 |
402 | }); | 425 | }); |
403 | }); | 426 | }); |
404 | } | 427 | } |
405 | 428 | ||
406 | lines.slice(1).forEach((line, index) => { | 429 | lines.slice(1).forEach((line, index) => { |
407 | const y = ((parseInt(lines[0].length) / 19) * 22) + 415 + (index * 30); // 每行文本的垂直位置 | 430 | const y = ((parseInt(lines[0].length) / 19) * 22) + 415 + (index * 20); // 每行文本的垂直位置 |
408 | let currentLine = ''; | 431 | let currentLine = ''; |
409 | let arr = []; | 432 | let arr = []; |
410 | for (let word of line) { | 433 | for (let word of line) { | ... | ... |
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-08-25 15:26:39 | 4 | * @LastEditTime: 2023-08-24 15:38:52 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <div class="szxx"> | 7 | <div class="szxx"> |
... | @@ -75,6 +75,7 @@ | ... | @@ -75,6 +75,7 @@ |
75 | <script> | 75 | <script> |
76 | import { mapGetters } from 'vuex' | 76 | import { mapGetters } from 'vuex' |
77 | import store from '@/store/index.js' | 77 | import store from '@/store/index.js' |
78 | import { getPrintTemplateByCode } from "@/api/print"; | ||
78 | import { getSlsqBdcqzList, invalidCertificate } from "@/api/bdcqz.js"; | 79 | import { getSlsqBdcqzList, invalidCertificate } from "@/api/bdcqz.js"; |
79 | export default { | 80 | export default { |
80 | props: {}, | 81 | props: {}, | ... | ... |
-
Please register or sign in to post a comment