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

打印功能调整

上级 01b2c780
......@@ -43,6 +43,10 @@ export function getLodop(dir, oOBJECT, oEMBED) {
basePath = getContextOrPath(false);
}
var path = window.location.origin + '/zyd/';
if(window.location.origin.indexOf('localhost') > -1){
path = window.location.origin + '/';
}
console.log(path);
var strHtmInstall = '<br><font color=\'#FF00FF\'>打印控件未安装!点击这里<a href=\'' + path + 'CLodop_32_Print.zip\' target=\'_self\'>执行安装</a>,安装后请刷新页面或重新进入。</font>';
var strHtmUpdate = '<br><font color=\'#FF00FF\'>打印控件需要升级!点击这里<a href=\'' + path + 'CLodop_32_Print.zip\' target=\'_self\'>执行升级</a>,升级后请重新进入。</font>';
var strHtm64_Install = '<br><font color=\'#FF00FF\'>打印控件未安装!点击这里<a href=\'' + path + 'CLodop_32_Print.zip\' target=\'_self\'>执行安装</a>,安装后请刷新页面或重新进入。</font>';
......
......@@ -111,9 +111,7 @@ export default class ViewPrint extends Component {
LODOP.SET_PRINT_MODE('POS_BASEON_PAPER', true);
LODOP.SET_PRINT_PAGESIZE(printMeth, 0, 0, "A4");
LODOP.ADD_PRINT_IMAGE(0, 0, "100%", "100%", strHTML);
LODOP.PREVIEW(); // 预览模式
// LODOPObj.PRINT(); // 直接打印
// LODOPObj.PRINT_SETUP();
LODOP.PRINT(); // 直接打印
};
printOneByOne = () => {
......@@ -220,14 +218,14 @@ export default class ViewPrint extends Component {
style={{
...imageStyle,
}}>
<img
{/* <img
src={backgroundUrl}
draggable={false}
className={styles.bgimagePrint}
alt={'背景图'}
style={imageStyleAll}
/>
{/* {this.detailDom(info)}*/}
/>*/}
{this.detailDom(info)}
</div>
);
})}
......@@ -239,7 +237,7 @@ export default class ViewPrint extends Component {
<div
ref={(node) => (this.content = node)}
style={{
display: showWindowPrint || true ? 'block' : 'none',
display: showWindowPrint ? 'block' : 'none',
}}>
{viewData.map((info, index) => {
return (
......@@ -254,7 +252,7 @@ export default class ViewPrint extends Component {
// border: '1px solid red',
...imageStyle,
}}>
{ hasPrintBackground || printBg ? (
{ hasPrintBackground && false ? (
<img
src={backgroundUrl}
draggable={false}
......@@ -266,7 +264,7 @@ export default class ViewPrint extends Component {
}}
/>
) : null}
{/* {this.detailDom(info)}*/}
{this.detailDom(info)}
</div>
</div>
);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论