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

打印bug修改

上级 6f4e78f4
...@@ -120,8 +120,14 @@ export default class Index extends Component { ...@@ -120,8 +120,14 @@ export default class Index extends Component {
render() { render() {
const { const {
backgroundUrl, backgroundUrl,
configAll: { config }, configAll: { config, wide, high, },
} = this.props; } = this.props;
const imageStyle = {
height: high || '902px',
width: wide || 'auto',
};
return ( return (
<div className={styles.outSideDiv}> <div className={styles.outSideDiv}>
<div <div
...@@ -130,12 +136,17 @@ export default class Index extends Component { ...@@ -130,12 +136,17 @@ export default class Index extends Component {
}} }}
style={{ style={{
padding: '12px', padding: '12px',
...imageStyle,
}}> }}>
<img <img
src={backgroundUrl} src={backgroundUrl}
id={'dropZone'} id={'dropZone'}
draggable={false} draggable={false}
className={styles.bgimage} className={styles.bgimage}
style={{
width: 'auto',
height: '100%',
}}
alt={'背景图'} alt={'背景图'}
/> />
{config.map((item, index) => { {config.map((item, index) => {
......
...@@ -55,6 +55,13 @@ export default class ViewPrint extends Component { ...@@ -55,6 +55,13 @@ export default class ViewPrint extends Component {
console.error(`${x.queryUrl}接口报错或者没有返回数据`); console.error(`${x.queryUrl}接口报错或者没有返回数据`);
return false; return false;
} }
for (let item of viewData) {
for (let x in item) {
if (item[x] === null || item[x] === 'null') {
item[x] = '';
}
}
}
this.setState({ this.setState({
viewData, viewData,
}); });
...@@ -197,7 +204,7 @@ export default class ViewPrint extends Component { ...@@ -197,7 +204,7 @@ export default class ViewPrint extends Component {
<div <div
ref={(node) => (this.content = node)} ref={(node) => (this.content = node)}
style={{ style={{
display: showWindowPrint || true ? 'block' : 'none', display: showWindowPrint ? 'block' : 'none',
}}> }}>
{viewData.map((info, index) => { {viewData.map((info, index) => {
return ( return (
...@@ -217,7 +224,7 @@ export default class ViewPrint extends Component { ...@@ -217,7 +224,7 @@ export default class ViewPrint extends Component {
style={{ style={{
width: 'auto', width: 'auto',
height: '100%', height: '100%',
}} /> }}/>
) : null} ) : null}
{this.detailDom(info)} {this.detailDom(info)}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论