提交 eebcd83f authored 作者: 钟是志's avatar 钟是志

打印功能修改. 还是搞不到事

上级 291d5168
...@@ -39,7 +39,7 @@ export function getCLodopFuncJS() { ...@@ -39,7 +39,7 @@ export function getCLodopFuncJS() {
'点击确定进行控件下载', { '点击确定进行控件下载', {
title: '未获取到打印控件', title: '未获取到打印控件',
onOk: () => { onOk: () => {
window.open('/CLodop_32_Print.zip'); window.open(window.location.origin + '/zyd/CLodop_32_Print.zip');
}, },
}); });
}; };
......
...@@ -107,10 +107,6 @@ export default class ViewPrint extends Component { ...@@ -107,10 +107,6 @@ export default class ViewPrint extends Component {
'page-break-after: always;', 'page-break-after: always;',
); );
strHTML = `${strHTML}`; strHTML = `${strHTML}`;
console.log(strHTML);
strHTML = `<div style="width: 24.7cm; height: 17cm">
<img src="http://zysoft.cdzhiyong.com:53003/dsf/u/upload/202006/05182802hzom.jpg"
style="width:100%;height: 100%;text-align: center"></div>`;
LODOP.PRINT_INITA(0, 0, `100%`, `100%`, "printDomId_" + printIndex); LODOP.PRINT_INITA(0, 0, `100%`, `100%`, "printDomId_" + printIndex);
LODOP.SET_PRINT_MODE('POS_BASEON_PAPER', true); LODOP.SET_PRINT_MODE('POS_BASEON_PAPER', true);
LODOP.SET_PRINT_PAGESIZE(printMeth, 0, 0, "A4"); LODOP.SET_PRINT_PAGESIZE(printMeth, 0, 0, "A4");
...@@ -193,17 +189,6 @@ export default class ViewPrint extends Component { ...@@ -193,17 +189,6 @@ export default class ViewPrint extends Component {
}} }}
loading={loading} loading={loading}
/> />
<ButtonDiy
name={'打印背景图'}
handleClick={() => {
this.setState({
printBg: true,
}, () => {
this.printByLodop();
});
}}
loading={loading}
/>
<ButtonDiy <ButtonDiy
name={'打印'} name={'打印'}
handleClick={() => { handleClick={() => {
...@@ -269,7 +254,7 @@ export default class ViewPrint extends Component { ...@@ -269,7 +254,7 @@ export default class ViewPrint extends Component {
// border: '1px solid red', // border: '1px solid red',
...imageStyle, ...imageStyle,
}}> }}>
{ true || hasPrintBackground || printBg ? ( { hasPrintBackground || printBg ? (
<img <img
src={backgroundUrl} src={backgroundUrl}
draggable={false} draggable={false}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论