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

修复bug

上级 5303e940
...@@ -134,10 +134,13 @@ export default class isNewTable extends Component { ...@@ -134,10 +134,13 @@ export default class isNewTable extends Component {
return ( return (
<Col <Col
style={{ style={{
display: ary.content && (ary.content.comName === 'InputHidden'||ary.content.isMobileHidden) && 'none', display:
ary.content &&
(ary.content.comName === 'InputHidden' || ary.content.isMobileHidden) &&
'none',
...styles, ...styles,
}} }}
span={ary.content?.labelSpan||24} span={ary.content?.labelSpan || 24}
> >
{!allhidden && ary.hidden ? ( {!allhidden && ary.hidden ? (
'' ''
...@@ -255,7 +258,11 @@ export default class isNewTable extends Component { ...@@ -255,7 +258,11 @@ export default class isNewTable extends Component {
width: '100%', width: '100%',
height: '100%', height: '100%',
...styles, ...styles,
display: ary.content && (ary.content.comName === 'InputHidden'||ary.content.isMobileHidden)&& 'none', display:
ary.content &&
(ary.content.comName === 'InputHidden' ||
ary.content.isMobileHidden) &&
'none',
}} }}
> >
<TableCom <TableCom
...@@ -296,7 +303,10 @@ export default class isNewTable extends Component { ...@@ -296,7 +303,10 @@ export default class isNewTable extends Component {
<Card.Body <Card.Body
style={{ style={{
// textAlign:ary.content&&ary.content.comName === 'Table'?"left":'right' // textAlign:ary.content&&ary.content.comName === 'Table'?"left":'right'
display: ary.content && (ary.content.comName === 'InputHidden'||ary.content.isMobileHidden) && 'none', display:
ary.content &&
(ary.content.comName === 'InputHidden' || ary.content.isMobileHidden) &&
'none',
}} }}
> >
{' '} {' '}
......
/**
* @file 移动端 Row,Col二次封装
*/
import React, { Component } from 'react';
import { Row, Col } from 'antd';
export default class MobileItem extends Component {
render() {
const { labelCol, wrapperCol, label } = this.props;
return (
<Row>
<Col
style={{
minHeight: 32,
}}
span={labelCol.span ? labelCol.span : labelCol}
>
{label}
</Col>
<Col
span={wrapperCol.span ? wrapperCol.span : wrapperCol}
style={{
minHeight: 32,
}}
>
{this.props.children}
</Col>
</Row>
);
}
}
...@@ -73,6 +73,7 @@ import { getToken } from '../utils/token'; ...@@ -73,6 +73,7 @@ import { getToken } from '../utils/token';
import { formulaList } from '../excelInitFuc/functionList'; import { formulaList } from '../excelInitFuc/functionList';
import FilePreview from '../filePreview'; import FilePreview from '../filePreview';
import DraftEditorCom from '../App/DraftEditorCom'; import DraftEditorCom from '../App/DraftEditorCom';
import MobileItem from './MobileItem';
const Item = MobileList.Item; const Item = MobileList.Item;
const Brief = Item.Brief; const Brief = Item.Brief;
function getBase64(value) { function getBase64(value) {
...@@ -1653,8 +1654,10 @@ export default class tableCom extends Component { ...@@ -1653,8 +1654,10 @@ export default class tableCom extends Component {
break; break;
} }
if (get === 'mobile') { if (get === 'mobile') {
if (
if ((json.isMobileLabel != null && json.isMobileLabel) || (json.isMobileLabel == null && json.isLabel)) { (json.isMobileLabel != null && json.isMobileLabel) ||
(json.isMobileLabel == null && json.isLabel)
) {
if (obj && obj.defaultValues && obj.defaultValues[formKey]) { if (obj && obj.defaultValues && obj.defaultValues[formKey]) {
if (!isEdit) { if (!isEdit) {
return ( return (
...@@ -1721,33 +1724,30 @@ export default class tableCom extends Component { ...@@ -1721,33 +1724,30 @@ export default class tableCom extends Component {
); );
} else { } else {
return ( return (
<Form.Item <MobileItem
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={json.label ? json.label : sqlData[key] ? sqlData[key].title : ''} label={json.label ? json.label : sqlData[key] ? sqlData[key].title : ''}
> >
{cm} {cm}
</Form.Item> </MobileItem>
); );
} }
} else { } else {
return ( return (
<> <>
<Form.Item <MobileItem
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={json.label ? json.label : sqlData[key] ? sqlData[key].title : ''} label={json.label ? json.label : sqlData[key] ? sqlData[key].title : ''}
> >
{cm} {cm}
</Form.Item> </MobileItem>
{this.props.form.getFieldDecorator(`defaultValues.${formKey}.${key}`, { {this.props.form.getFieldDecorator(`defaultValues.${formKey}.${key}`, {
initialValue: value, initialValue: value,
})(<Input type="hidden" />)} })(<Input type="hidden" />)}
</> </>
); );
} }
} else { } else {
if (!isEdit && obj.defaultValues && obj.defaultValues[formKey]) { if (!isEdit && obj.defaultValues && obj.defaultValues[formKey]) {
...@@ -1763,8 +1763,6 @@ export default class tableCom extends Component { ...@@ -1763,8 +1763,6 @@ export default class tableCom extends Component {
); );
} }
} }
} else { } else {
if (json.isLabel) { if (json.isLabel) {
if (obj && obj.defaultValues && obj.defaultValues[formKey]) { if (obj && obj.defaultValues && obj.defaultValues[formKey]) {
...@@ -1873,7 +1871,6 @@ export default class tableCom extends Component { ...@@ -1873,7 +1871,6 @@ export default class tableCom extends Component {
} }
} }
} }
} }
var cm; var cm;
...@@ -2453,13 +2450,13 @@ export default class tableCom extends Component { ...@@ -2453,13 +2450,13 @@ export default class tableCom extends Component {
title title
) { ) {
cm = ( cm = (
<Form.Item <MobileItem
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title} label={title}
> >
{cm} {cm}
</Form.Item> </MobileItem>
); );
} }
} }
...@@ -2494,13 +2491,13 @@ export default class tableCom extends Component { ...@@ -2494,13 +2491,13 @@ export default class tableCom extends Component {
title title
) { ) {
cm = ( cm = (
<Form.Item <MobileItem
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title} label={title}
> >
{cm} {cm}
</Form.Item> </MobileItem>
); );
} }
} }
...@@ -2525,13 +2522,13 @@ export default class tableCom extends Component { ...@@ -2525,13 +2522,13 @@ export default class tableCom extends Component {
title title
) { ) {
cm = ( cm = (
<Form.Item <MobileItem
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title} label={title}
> >
{cm} {cm}
</Form.Item> </MobileItem>
); );
} }
} }
...@@ -2560,13 +2557,13 @@ export default class tableCom extends Component { ...@@ -2560,13 +2557,13 @@ export default class tableCom extends Component {
title title
) { ) {
cm = ( cm = (
<Form.Item <MobileItem
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title} label={title}
> >
{cm} {cm}
</Form.Item> </MobileItem>
); );
} }
...@@ -2644,13 +2641,13 @@ export default class tableCom extends Component { ...@@ -2644,13 +2641,13 @@ export default class tableCom extends Component {
title title
) { ) {
cm = ( cm = (
<Form.Item <MobileItem
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title} label={title}
> >
{cm} {cm}
</Form.Item> </MobileItem>
); );
} else if (get === 'mobile') { } else if (get === 'mobile') {
cm = <div>{cm}</div>; cm = <div>{cm}</div>;
...@@ -2698,13 +2695,13 @@ export default class tableCom extends Component { ...@@ -2698,13 +2695,13 @@ export default class tableCom extends Component {
title title
) { ) {
cm = ( cm = (
<Form.Item <MobileItem
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title} label={title}
> >
{cm} {cm}
</Form.Item> </MobileItem>
); );
} }
break; break;
...@@ -2747,13 +2744,13 @@ export default class tableCom extends Component { ...@@ -2747,13 +2744,13 @@ export default class tableCom extends Component {
title title
) { ) {
cm = ( cm = (
<Form.Item <MobileItem
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title} label={title}
> >
{cm} {cm}
</Form.Item> </MobileItem>
); );
} }
break; break;
...@@ -2808,7 +2805,7 @@ export default class tableCom extends Component { ...@@ -2808,7 +2805,7 @@ export default class tableCom extends Component {
} }
}); });
} }
: () => { } : () => {}
} }
format={json.format ? json.format : 'YYYY-MM-DD HH:mm:ss'} format={json.format ? json.format : 'YYYY-MM-DD HH:mm:ss'}
/>, />,
...@@ -2820,13 +2817,13 @@ export default class tableCom extends Component { ...@@ -2820,13 +2817,13 @@ export default class tableCom extends Component {
title title
) { ) {
cm = ( cm = (
<Form.Item <MobileItem
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title} label={title}
> >
{cm} {cm}
</Form.Item> </MobileItem>
); );
} }
break; break;
...@@ -2860,13 +2857,13 @@ export default class tableCom extends Component { ...@@ -2860,13 +2857,13 @@ export default class tableCom extends Component {
title title
) { ) {
cm = ( cm = (
<Form.Item <MobileItem
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title} label={title}
> >
{cm} {cm}
</Form.Item> </MobileItem>
); );
} }
break; break;
...@@ -2885,13 +2882,13 @@ export default class tableCom extends Component { ...@@ -2885,13 +2882,13 @@ export default class tableCom extends Component {
title title
) { ) {
cm = ( cm = (
<Form.Item <MobileItem
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title} label={title}
> >
{cm} {cm}
</Form.Item> </MobileItem>
); );
} }
break; break;
...@@ -2918,13 +2915,13 @@ export default class tableCom extends Component { ...@@ -2918,13 +2915,13 @@ export default class tableCom extends Component {
title title
) { ) {
cm = ( cm = (
<Form.Item <MobileItem
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title} label={title}
> >
{cm} {cm}
</Form.Item> </MobileItem>
); );
} }
break; break;
...@@ -2958,13 +2955,13 @@ export default class tableCom extends Component { ...@@ -2958,13 +2955,13 @@ export default class tableCom extends Component {
title title
) { ) {
cm = ( cm = (
<Form.Item <MobileItem
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title} label={title}
> >
{cm} {cm}
</Form.Item> </MobileItem>
); );
} }
break; break;
...@@ -2983,13 +2980,13 @@ export default class tableCom extends Component { ...@@ -2983,13 +2980,13 @@ export default class tableCom extends Component {
title title
) { ) {
cm = ( cm = (
<Form.Item <MobileItem
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title} label={title}
> >
{cm} {cm}
</Form.Item> </MobileItem>
); );
} }
break; break;
...@@ -3017,13 +3014,13 @@ export default class tableCom extends Component { ...@@ -3017,13 +3014,13 @@ export default class tableCom extends Component {
title title
) { ) {
cm = ( cm = (
<Form.Item <MobileItem
labelCol={{ span: json.labelSpan }} labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }} wrapperCol={{ span: json.wrapperSpan }}
label={title} label={title}
> >
{cm} {cm}
</Form.Item> </MobileItem>
); );
} }
break; break;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论