提交 7725f116 authored 作者: 徐立's avatar 徐立

宽度撑不开

上级 4804cf1c
...@@ -106,37 +106,146 @@ export default class isNewTable extends Component { ...@@ -106,37 +106,146 @@ export default class isNewTable extends Component {
</> </>
); );
} }
if(isRowCol){ if (isRowCol) {
return ( items.map((item, i) => { return items.map((item, i) => {
console.log(item) console.log(item);
const allhidden = checkAllHidden(items) const allhidden = checkAllHidden(items);
return <Row style={{ return (
<Row
...style, style={{
}}> ...style,
}}
>
{ {item.map((ary, j) => {
item.map((ary, j) => { let styles = {};
let styles = {}; if (ary.content && ary.content.styles) {
if (ary.content && ary.content.styles) { try {
try { styles = JSON.parse(ary.content.styles);
styles = JSON.parse(ary.content.styles); } catch (e) {
} catch (e) { console.log(`第${i}行第${j}列样式配置有误,${e}`);
console.log(`第${i}行第${j}列样式配置有误,${e}`); }
} }
} if (ary.content?.comName === 'Label') {
if(ary.content?.comName==="Label"){ console.log(ary);
console.log(ary) return (
return <Col <Col
style={{ style={{
...styles,
...styles, }}
}} span={ary.content?.labelSpan}
span={ary.content?.labelSpan} >
{!allhidden && ary.hidden ? (
''
) : (
<>
<TableCom
formCode={formCode}
formId={formId}
i={i}
j={j}
index={index}
fatherCode={fatherCode}
datas={datas}
isEdit={isEdit}
fatherObj={this.props.fatherObj}
formKey={currentFormKey}
init={init}
get={get}
key={j}
sqlData={sqlData}
obj={obj || {}}
form={this.props.form}
mapData={mapData}
json={ary.content}
uuid={ary.uuid}
routerState={routerState} // 兼容表单设计器路由传参
defaultValues={defaultValues || {}}
messageData={messageData} // 场景设计器共享变量参数
/>
</>
)}
</Col>
);
}
return (
<Col span={24}>
{!allhidden && ary.hidden ? (
''
) : (
<>
<TableCom
formCode={formCode}
formId={formId}
i={i}
j={j}
index={index}
fatherCode={fatherCode}
datas={datas}
isEdit={isEdit}
fatherObj={this.props.fatherObj}
formKey={currentFormKey}
init={init}
get={get}
key={j}
sqlData={sqlData}
obj={obj || {}}
form={this.props.form}
mapData={mapData}
json={ary.content}
uuid={ary.uuid}
routerState={routerState} // 兼容表单设计器路由传参
defaultValues={defaultValues || {}}
messageData={messageData} // 场景设计器共享变量参数
/>
</>
)}
</Col>
);
})}
</Row>
);
});
}
return items.map((item, i) => {
const allhidden = checkAllHidden(items);
return (
<>
{' '}
<Card
full
style={{
...style,
}}
>
{item.map((ary, j) => {
if (!ary.content) {
return;
}
let styles = {};
if (ary.content && ary.content.styles) {
try {
styles = JSON.parse(ary.content.styles);
} catch (e) {
console.log(`第${i}行第${j}列样式配置有误,${e}`);
}
}
if (ary.content && ary.content.comName === 'Label') {
return (
<Card.Header
title={
!allhidden && ary.hidden ? (
''
) : (
<div
style={{
display: 'inline-block',
width: '100%',
height: '100%',
...styles,
}}
> >
{!allhidden && ary.hidden ? "" <TableCom
:<><TableCom modalInit={modalInit}
formCode={formCode} formCode={formCode}
formId={formId} formId={formId}
i={i} i={i}
...@@ -157,165 +266,65 @@ export default class isNewTable extends Component { ...@@ -157,165 +266,65 @@ export default class isNewTable extends Component {
json={ary.content} json={ary.content}
uuid={ary.uuid} uuid={ary.uuid}
routerState={routerState} // 兼容表单设计器路由传参 routerState={routerState} // 兼容表单设计器路由传参
defaultValues={defaultValues || {}} defaultValues={defaultValues || {}}
messageData={messageData} // 场景设计器共享变量参数 messageData={messageData} // 场景设计器共享变量参数
/></> />
}</Col> </div>
)
} }
return <Col />
span={24} );
> }
{!allhidden && ary.hidden ? "" return !allhidden && ary.hidden ? (
:<><TableCom ''
formCode={formCode} ) : (
formId={formId} <Card.Body
i={i} style={
j={j} {
index={index} // textAlign:ary.content&&ary.content.comName === 'Table'?"left":'right'
fatherCode={fatherCode}
datas={datas}
isEdit={isEdit}
fatherObj={this.props.fatherObj}
formKey={currentFormKey}
init={init}
get={get}
key={j}
sqlData={sqlData}
obj={obj || {}}
form={this.props.form}
mapData={mapData}
json={ary.content}
uuid={ary.uuid}
routerState={routerState} // 兼容表单设计器路由传参
defaultValues={defaultValues || {}}
messageData={messageData} // 场景设计器共享变量参数
/></>
}</Col>
})
}
</Row>
}))
}
return (
items.map((item, i) => {
const allhidden = checkAllHidden(items);
return (
<>
{' '}
<Card full
style={{
...style
}}
>
{item.map((ary, j) => {
if (!ary.content) {
return;
}
let styles = {};
if (ary.content && ary.content.styles) {
try {
styles = JSON.parse(ary.content.styles);
} catch (e) {
console.log(`第${i}行第${j}列样式配置有误,${e}`);
} }
} }
if (ary.content && ary.content.comName === 'Label') { >
return ( {' '}
<Card.Header <div
title={ style={{
!allhidden && ary.hidden ? ( display: 'inline-block',
'' ...styles,
) : ( }}
<div >
style={{ <TableCom
display: 'inline-block', modalInit={modalInit}
...styles, formCode={formCode}
}}> formId={formId}
<TableCom i={i}
modalInit={modalInit} j={j}
formCode={formCode} index={index}
formId={formId} fatherCode={fatherCode}
i={i} datas={datas}
j={j} isEdit={isEdit}
index={index} fatherObj={this.props.fatherObj}
fatherCode={fatherCode} formKey={currentFormKey}
datas={datas} init={init}
isEdit={isEdit} get={get}
fatherObj={this.props.fatherObj} key={j}
formKey={currentFormKey} sqlData={sqlData}
init={init} obj={obj || {}}
get={get} form={this.props.form}
key={j} mapData={mapData}
sqlData={sqlData} json={ary.content}
obj={obj || {}} uuid={ary.uuid}
form={this.props.form} routerState={routerState} // 兼容表单设计器路由传参
mapData={mapData} defaultValues={defaultValues || {}}
json={ary.content} messageData={messageData} // 场景设计器共享变量参数
uuid={ary.uuid} />
routerState={routerState} // 兼容表单设计器路由传参 </div>
defaultValues={defaultValues || {}} </Card.Body>
messageData={messageData} // 场景设计器共享变量参数 );
/> })}
</div> </Card>
) <WhiteSpace />
} </>
/> );
); });
}
return !allhidden && ary.hidden ? (
''
) : (
<Card.Body
style={
{
// textAlign:ary.content&&ary.content.comName === 'Table'?"left":'right'
}
}
>
{' '}
<div
style={{
display: 'inline-block',
...styles,
}}>
<TableCom
modalInit={modalInit}
formCode={formCode}
formId={formId}
i={i}
j={j}
index={index}
fatherCode={fatherCode}
datas={datas}
isEdit={isEdit}
fatherObj={this.props.fatherObj}
formKey={currentFormKey}
init={init}
get={get}
key={j}
sqlData={sqlData}
obj={obj || {}}
form={this.props.form}
mapData={mapData}
json={ary.content}
uuid={ary.uuid}
routerState={routerState} // 兼容表单设计器路由传参
defaultValues={defaultValues || {}}
messageData={messageData} // 场景设计器共享变量参数
/>
</div>
</Card.Body>
);
})}
</Card>
<WhiteSpace />
</>
);
})
);
} }
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论