style:打印设计
Showing
4 changed files
with
36 additions
and
25 deletions
... | @@ -2,5 +2,5 @@ | ... | @@ -2,5 +2,5 @@ |
2 | "TITLE": "不动产登记系统", | 2 | "TITLE": "不动产登记系统", |
3 | "SERVERAPI": "/bdcdj", | 3 | "SERVERAPI": "/bdcdj", |
4 | "IDCARDURL": "http://127.0.0.1:33088/function=get_idcard&readnew=0", | 4 | "IDCARDURL": "http://127.0.0.1:33088/function=get_idcard&readnew=0", |
5 | "adapter": "dysqs" | 5 | "adapter": "dysqs-630222" |
6 | } | 6 | } |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-09-01 08:20:51 | 4 | * @LastEditTime: 2023-11-21 16:30:43 |
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"> |
... | @@ -67,7 +67,8 @@ | ... | @@ -67,7 +67,8 @@ |
67 | tmpname: '', | 67 | tmpname: '', |
68 | tmpfont: '', | 68 | tmpfont: '', |
69 | tmpfontsize: '', | 69 | tmpfontsize: '', |
70 | tmpcontent: '' | 70 | tmpcontent: '', //模板1 |
71 | tmpcontent2: '', //模板2 | ||
71 | }, | 72 | }, |
72 | rules: { | 73 | rules: { |
73 | tmpno: [ | 74 | tmpno: [ |
... | @@ -83,7 +84,6 @@ | ... | @@ -83,7 +84,6 @@ |
83 | if (JSON.stringify(this.formData) != "{}") this.getDetailInfo(this.formData) | 84 | if (JSON.stringify(this.formData) != "{}") this.getDetailInfo(this.formData) |
84 | }, | 85 | }, |
85 | methods: { | 86 | methods: { |
86 | //表单提交 | ||
87 | /** | 87 | /** |
88 | * @description: 表单提交 | 88 | * @description: 表单提交 |
89 | * @author: renchao | 89 | * @author: renchao |
... | @@ -104,7 +104,6 @@ | ... | @@ -104,7 +104,6 @@ |
104 | } | 104 | } |
105 | }); | 105 | }); |
106 | }, | 106 | }, |
107 | //新增 | ||
108 | /** | 107 | /** |
109 | * @description: 新增 | 108 | * @description: 新增 |
110 | * @author: renchao | 109 | * @author: renchao | ... | ... |
1 | /* | 1 | /* |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-11-20 15:24:10 | 4 | * @LastEditTime: 2023-11-22 13:18:47 |
5 | */ | 5 | */ |
6 | import Vue from 'vue' | 6 | import Vue from 'vue' |
7 | import { getPrintTemplateByCode } from "@/api/print"; | 7 | import { getPrintTemplateByCode } from "@/api/print"; |
... | @@ -135,25 +135,37 @@ export default { | ... | @@ -135,25 +135,37 @@ export default { |
135 | break; | 135 | break; |
136 | case "B6": | 136 | case "B6": |
137 | //根据编号获取对应信息 | 137 | //根据编号获取对应信息 |
138 | getPrintTemplateByCode({ tmpno: 'dysqs' }).then(res => { | 138 | getPrintTemplateByCode({ tmpno: Vue.prototype.BASE_API.adapter }).then(res => { |
139 | if (res.code == 200) { | 139 | if (res.code === 200) { |
140 | getPrintApplicationForm(this.currentSelectProps.bsmSldy).then(async infoRes => { | 140 | getPrintTemplateByCode({ tmpno: Vue.prototype.BASE_API.adapter + '-2' }).then(res1 => { |
141 | if (infoRes.code == 200) { | 141 | getPrintApplicationForm(this.currentSelectProps.bsmSldy).then(infoRes => { |
142 | console.log(adapter({ name: 2 })); | 142 | if (infoRes.code === 200) { |
143 | //打开模板设计 | 143 | let LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM')); |
144 | // let LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM')); | 144 | |
145 | // LODOP.ADD_PRINT_DATA("ProgramData", res.result.tmpcontent); //装载模板 | 145 | // 装载第一个模板并设置数据 |
146 | // //todo 调取后端接口获取数据 循环set | 146 | LODOP.ADD_PRINT_DATA("ProgramData", res.result.tmpcontent); |
147 | // for (let key in infoRes.result) { | 147 | for (let key in infoRes.result) { |
148 | // LODOP.SET_PRINT_STYLEA(key, "CONTENT", infoRes.result[key]); | 148 | LODOP.SET_PRINT_STYLEA(key, "CONTENT", infoRes.result[key]); |
149 | // } | 149 | } |
150 | // LODOP.PREVIEW(); | 150 | |
151 | } else { | 151 | // 手动分页 |
152 | this.$message.error(infoRes.message) | 152 | LODOP.NewPage(); |
153 | } | 153 | |
154 | }) | 154 | // 装载第二个模板并设置数据 |
155 | LODOP.ADD_PRINT_DATA("ProgramData", res1.result.tmpcontent); | ||
156 | for (let key in res1.result) { | ||
157 | LODOP.SET_PRINT_STYLEA(key, "CONTENT", res1.result[key]); | ||
158 | } | ||
159 | |||
160 | // 进行预览 | ||
161 | LODOP.PREVIEW(); | ||
162 | } else { | ||
163 | this.$message.error(infoRes.message); | ||
164 | } | ||
165 | }); | ||
166 | }); | ||
155 | } else { | 167 | } else { |
156 | this.$message.error(res.message) | 168 | this.$message.error(res.message); |
157 | } | 169 | } |
158 | }) | 170 | }) |
159 | break; | 171 | break; | ... | ... |
-
Please register or sign in to post a comment