ac61b2de by renchao@pashanhoo.com

style:打印申请书

1 parent 76f3cd14
1 { 1 {
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 } 6 }
...\ No newline at end of file ...\ No newline at end of file
......
1 /*
2 * @Description: 申请书
3 * @Autor: renchao
4 * @LastEditTime: 2023-11-20 15:42:45
5 */
6 import Vue from 'vue'
7 // 创建不同的适配器策略
8 const strategies = {
9 dysqs: function (data) {
10 return data.name;
11 },
12 default: function (data) {
13 return data;
14 }
15 };
16
17 // 创建适配器函数,并使用策略模式进行数据处理
18 export default function adapter (data) {
19 const type = Vue.prototype.BASE_API.adapter;
20 const selectedStrategy = strategies[type] || strategies['default'];
21
22 return selectedStrategy(data);
23 }
...\ No newline at end of file ...\ No newline at end of file
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
12 </el-tab-pane> 12 </el-tab-pane>
13 </el-tabs> 13 </el-tabs>
14 <el-empty description="暂无数据" v-if="headTabBdcqz.length == 0 && noData"></el-empty> 14 <el-empty description="暂无数据" v-if="headTabBdcqz.length == 0 && noData"></el-empty>
15 <div v-else>
15 <div style="height:540px"> 16 <div style="height:540px">
16 <el-form class="zs" :model="bdcqz" v-if="this.bdcqz.bdcqzlx==1" ref="ruleForm" label-width="100px"> 17 <el-form class="zs" :model="bdcqz" v-if="this.bdcqz.bdcqzlx==1" ref="ruleForm" label-width="100px">
17 <el-row> 18 <el-row>
...@@ -156,6 +157,7 @@ ...@@ -156,6 +157,7 @@
156 <el-button type="primary" @click="handleSubmit">保存</el-button> 157 <el-button type="primary" @click="handleSubmit">保存</el-button>
157 </div> 158 </div>
158 </div> 159 </div>
160 </div>
159 </template> 161 </template>
160 162
161 <script> 163 <script>
......
1 /* 1 /*
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-11-15 11:29:32 4 * @LastEditTime: 2023-11-20 15:24:10
5 */ 5 */
6 import Vue from 'vue'
6 import { getPrintTemplateByCode } from "@/api/print"; 7 import { getPrintTemplateByCode } from "@/api/print";
7 import { uploadUndo } from "@/api/clxx"; 8 import { uploadUndo } from "@/api/clxx";
8 import { getLodop } from "@/utils/LodopFuncs" 9 import { getLodop } from "@/utils/LodopFuncs";
10 import adapter from "@/utils/sqs/adapter";
9 import { 11 import {
10 stepExpandInfo, 12 stepExpandInfo,
11 record, 13 record,
...@@ -131,23 +133,21 @@ export default { ...@@ -131,23 +133,21 @@ export default {
131 case "B-ZSXG": 133 case "B-ZSXG":
132 this.$popupDialog("证书修改", "workflow/components/dialog/zsxg", { bsmSlsq: this.bsmSlsq, }, '55%', true) 134 this.$popupDialog("证书修改", "workflow/components/dialog/zsxg", { bsmSlsq: this.bsmSlsq, }, '55%', true)
133 break; 135 break;
134 case "B-SQD":
135
136 break;
137 case "B6": 136 case "B6":
138 //根据编号获取对应信息 137 //根据编号获取对应信息
139 getPrintTemplateByCode({ tmpno: 'dysqs' }).then(res => { 138 getPrintTemplateByCode({ tmpno: 'dysqs' }).then(res => {
140 if (res.code == 200) { 139 if (res.code == 200) {
141 getPrintApplicationForm(this.currentSelectProps.bsmSldy).then(infoRes => { 140 getPrintApplicationForm(this.currentSelectProps.bsmSldy).then(async infoRes => {
142 if (infoRes.code == 200) { 141 if (infoRes.code == 200) {
142 console.log(adapter({ name: 2 }));
143 //打开模板设计 143 //打开模板设计
144 let LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM')); 144 // let LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
145 LODOP.ADD_PRINT_DATA("ProgramData", res.result.tmpcontent); //装载模板 145 // LODOP.ADD_PRINT_DATA("ProgramData", res.result.tmpcontent); //装载模板
146 //todo 调取后端接口获取数据 循环set 146 // //todo 调取后端接口获取数据 循环set
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 // LODOP.PREVIEW();
151 } else { 151 } else {
152 this.$message.error(infoRes.message) 152 this.$message.error(infoRes.message)
153 } 153 }
......