提交 b79f1e4a authored 作者: 徐立's avatar 徐立

打印页面关闭margin和padding

上级 696aab4d
......@@ -12,7 +12,6 @@ import moment from 'moment';
import TableCom from '../tableCompon';
import IsNewTable from './isNewMobileTable';
import maintain from '../assets/maintain.png';
export default class ZdyTable extends Component {
constructor(props) {
super(props);
......@@ -442,6 +441,8 @@ export default class ZdyTable extends Component {
taskAssignee,
userId,
isDynamic, // 是否为大数据页面
isWebPrint, // 打印界面
isWebPrintEnd,
} = this.props;
let style = {};
if (formConfig.style != null) {
......@@ -482,18 +483,19 @@ export default class ZdyTable extends Component {
// overflowY: isDynamic && 'auto',
width: '100%',
height: this.props.height,
paddingBottom: paddingBottom != null ? paddingBottom : '10px',
paddingBottom: paddingBottom != null ? paddingBottom : isWebPrint ? 0 : '10px',
}
: {
overflow: isDynamic ? 'hidden' : 'auto',
// overflowY: isDynamic && 'auto',
width: '100%',
paddingBottom: paddingBottom != null ? paddingBottom : '10px',
paddingBottom: paddingBottom != null ? paddingBottom : isWebPrint ? 0 : '10px',
};
if (!isReady) return <></>;
if (this.props.postData?.isUpdate) {
updateTime = moment(+this.props.postData?.updateTime).format('llll');
}
console.log(isWebPrintEnd);
switch (get) {
case 'web':
return (
......@@ -557,7 +559,7 @@ export default class ZdyTable extends Component {
style={{
overflow: 'auto',
margin: max * width > 550 ? 'auto' : '',
marginBottom: '5px',
marginBottom: isWebPrint ? (isWebPrintEnd ? '5px' : 0) : '1px',
...style,
}}
border={border}
......@@ -617,6 +619,8 @@ export default class ZdyTable extends Component {
}}
>
<TableCom
isWebPrintEnd={isWebPrintEnd}
isWebPrint={isWebPrint}
isPrint={this.props.isPrint}
formCode={formCode} // 当前表单code
modalInit={modalInit}
......
......@@ -1474,6 +1474,7 @@ export default class tableCom extends Component {
})(<Input type="hidden" />)}{' '}
<ZdyTable
taskAssignee={taskAssignee}
isWebPrint={this.props.isWebPrint || false}
userId={userId}
key={fk}
modalInit={modalInit}
......@@ -1659,17 +1660,15 @@ export default class tableCom extends Component {
(json.isMobileLabel == null && json.isLabel)
) {
if (obj && obj.defaultValues && obj.defaultValues[formKey]) {
return (
<MobileItem
labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }}
label={json.label ? json.label : sqlData[key] ? sqlData[key].title : ''}
>
{cm}
</MobileItem>
);
return (
<MobileItem
labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }}
label={json.label ? json.label : sqlData[key] ? sqlData[key].title : ''}
>
{cm}
</MobileItem>
);
} else {
return (
<>
......@@ -2278,7 +2277,7 @@ export default class tableCom extends Component {
? json.vlds
: [{ required: required, message: '请输入' + title }],
})(<TextArea disabled={disabled} rows={4} placeholder={json.placeholder} />);
/* cm = (
/* cm = (
<MobileTextareaItem
{...getFieldProps(dataColumn.base52, {
initialValue: initValue,
......@@ -3221,13 +3220,17 @@ export default class tableCom extends Component {
) : (
''
)}
{json.isMobileLabel&&!isEdit&&get=="mobile"? <MobileItem
labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }}
label={title}
>
{cm}
</MobileItem>:cm}
{json.isMobileLabel && !isEdit && get == 'mobile' ? (
<MobileItem
labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }}
label={title}
>
{cm}
</MobileItem>
) : (
cm
)}
</>
);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论