b31a0bfb by renchao@pashanhoo.com

打印设计

1 parent 4cc1df44
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-08-29 14:13:09
* @LastEditTime: 2023-08-30 08:40:36
-->
<template>
<el-form ref="ruleForm" :model="ruleForm" label-width="100px" :rules="rules">
......@@ -160,7 +160,6 @@
this.ruleForm = item;
this.editFlag = true;
},
//设计打印模板
/**
* @description: 设计打印模板
* @author: renchao
......@@ -169,6 +168,10 @@
let that = this;
that.loadStatus = '1';
let LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
if (['zsdy', 'zmdy'].includes(that.ruleForm.tmpno)) {
LODOP.SET_PRINT_PAGESIZE(2, 0, 0, "B4"); // 设置纸张大小为 B4
LODOP.SET_PRINT_MODE("RESELECT_ORIENT", true); // 手动设置方向
}
LODOP.ADD_PRINT_DATA("ProgramData", this.ruleForm.tmpcontent); //装载模板
//窗口关闭后,回调函数中保存的设计代码
if (LODOP.CVERSION)
......@@ -192,10 +195,6 @@
that.loadStatus = '2';
}, 1000);
};
if (['zsdy', 'zmdy'].includes(that.ruleForm.tmpno)) {
LODOP.SET_PRINT_PAGESIZE(2, 0, 0, "B4");
// LODOP.SET_PRINT_MODE("RESELECT_ORIENT", true); // 手动设置方向
}
LODOP.PRINT_DESIGN(); //打印设计或者打印维护需要放到最后
}
}
......