b31a0bfb by renchao@pashanhoo.com

打印设计

1 parent 4cc1df44
1 <!-- 1 <!--
2 * @Description: 2 * @Description:
3 * @Autor: renchao 3 * @Autor: renchao
4 * @LastEditTime: 2023-08-29 14:13:09 4 * @LastEditTime: 2023-08-30 08:40:36
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">
...@@ -160,7 +160,6 @@ ...@@ -160,7 +160,6 @@
160 this.ruleForm = item; 160 this.ruleForm = item;
161 this.editFlag = true; 161 this.editFlag = true;
162 }, 162 },
163 //设计打印模板
164 /** 163 /**
165 * @description: 设计打印模板 164 * @description: 设计打印模板
166 * @author: renchao 165 * @author: renchao
...@@ -169,6 +168,10 @@ ...@@ -169,6 +168,10 @@
169 let that = this; 168 let that = this;
170 that.loadStatus = '1'; 169 that.loadStatus = '1';
171 let LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM')); 170 let LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
171 if (['zsdy', 'zmdy'].includes(that.ruleForm.tmpno)) {
172 LODOP.SET_PRINT_PAGESIZE(2, 0, 0, "B4"); // 设置纸张大小为 B4
173 LODOP.SET_PRINT_MODE("RESELECT_ORIENT", true); // 手动设置方向
174 }
172 LODOP.ADD_PRINT_DATA("ProgramData", this.ruleForm.tmpcontent); //装载模板 175 LODOP.ADD_PRINT_DATA("ProgramData", this.ruleForm.tmpcontent); //装载模板
173 //窗口关闭后,回调函数中保存的设计代码 176 //窗口关闭后,回调函数中保存的设计代码
174 if (LODOP.CVERSION) 177 if (LODOP.CVERSION)
...@@ -192,10 +195,6 @@ ...@@ -192,10 +195,6 @@
192 that.loadStatus = '2'; 195 that.loadStatus = '2';
193 }, 1000); 196 }, 1000);
194 }; 197 };
195 if (['zsdy', 'zmdy'].includes(that.ruleForm.tmpno)) {
196 LODOP.SET_PRINT_PAGESIZE(2, 0, 0, "B4");
197 // LODOP.SET_PRINT_MODE("RESELECT_ORIENT", true); // 手动设置方向
198 }
199 LODOP.PRINT_DESIGN(); //打印设计或者打印维护需要放到最后 198 LODOP.PRINT_DESIGN(); //打印设计或者打印维护需要放到最后
200 } 199 }
201 } 200 }
......