Merge branch 'dev'

2 parents b8f6cf62 891df849
<!--
* @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(); //打印设计或者打印维护需要放到最后
}
}
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-08-29 13:11:05
* @LastEditTime: 2023-08-30 10:11:42
-->
<template>
<div>
......@@ -252,11 +252,11 @@
arr.push(currentLine);
if (i > 0) {
arr.forEach((line, index) => {
context.fillText(line, 129, 490 + (28 * (i - 1)) + 5 * num + (index * 14)); // 调整行高
context.fillText(line, 129, 485 + (26 * (i - 1)) + 5 * num + (index * 14)); // 调整行高
})
} else {
arr.forEach((line, index) => {
context.fillText(line, 129, 490 + (28 * (i - 1)) + (index * 14)); // 调整行高
context.fillText(line, 129, 485 + (26 * (i - 1)) + (index * 14)); // 调整行高
})
}
} else {
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-08-29 13:12:03
* @LastEditTime: 2023-08-30 10:13:25
-->
<template>
<div class="from-clues loadingtext" v-Loading="loading" element-loading-text="拼命加载中..." style="height:720px;text-align: center;">
......@@ -223,11 +223,11 @@
arr.push(currentLine);
if (i > 0) {
arr.forEach((line, index) => {
context.fillText(line, 129, 485 + (28 * (i - 1)) + 5 * num + (index * 14)); // 调整行高
context.fillText(line, 129, 485 + (26 * (i - 1)) + 5 * num + (index * 14)); // 调整行高
})
} else {
arr.forEach((line, index) => {
context.fillText(line, 129, 485 + (28 * (i - 1)) + (index * 14)); // 调整行高
context.fillText(line, 129, 485 + (26 * (i - 1)) + (index * 14)); // 调整行高
})
}
} else {
......