提交 c2e78b1f authored 作者: chlolch's avatar chlolch

修改bug

上级 1c1306a4
......@@ -443,6 +443,7 @@ export default class ZdyTable extends Component {
isDynamic, // 是否为大数据页面
isWebPrint, // 打印界面
isWebPrintEnd,
isPreview
} = this.props;
let style = {};
if (formConfig.style != null) {
......@@ -629,6 +630,7 @@ export default class ZdyTable extends Component {
formId={formId} // 当前表单Id
i={i} // 当前组件下标
j={j} // 当前行数下班
isPreview={isPreview}
fatherCode={fatherCode}
index={index}
fatherObj={this.props.fatherObj}
......@@ -722,6 +724,7 @@ export default class ZdyTable extends Component {
<IsNewTable
taskAssignee={taskAssignee} // 提交人
userId={userId}
isPreview={isPreview}
isRowCol={isRowCol}
modalInit={modalInit}
items={items}
......
......@@ -34,6 +34,7 @@ export default class isNewTable extends Component {
formId,
fatherObj,
style,
isPreview,
modalInit,
concealModel,
taskAssignee,
......@@ -87,6 +88,7 @@ export default class isNewTable extends Component {
modalInit={modalInit}
formCode={formCode}
formId={formId}
isPreview={isPreview}
i={i}
j={j}
index={index}
......@@ -159,6 +161,7 @@ export default class isNewTable extends Component {
formId={formId}
i={i}
j={j}
isPreview={isPreview}
index={index}
fatherCode={fatherCode}
datas={datas}
......@@ -199,6 +202,7 @@ export default class isNewTable extends Component {
formCode={formCode}
taskAssignee={taskAssignee}
formId={formId}
isPreview={isPreview}
i={i}
j={j}
index={index}
......
......@@ -99,7 +99,7 @@ export default class ChildForm extends React.Component {
render() {
const objs = this.state;
const { form, mapData, sqlData, defaultValues, datas, base52, isEdit, addName, deleteName, obj, isMobile, json, modalInit } = this.props
const { form, mapData, sqlData, defaultValues, datas, base52, isEdit, addName, deleteName, obj, isMobile, json, modalInit,isPreview } = this.props
const span = json.span || 24
const gutter = json.gutter != null ? json.gutter : 0
const rights = this.props.rights
......@@ -113,19 +113,21 @@ export default class ChildForm extends React.Component {
return (
<WingBlank size="lg">
{Object.keys(objs).length > 1 || rights.includes("add") ? <Card style={{ marginLeft: '-27px' }}>
{Object.keys(objs).length > 1 || rights.includes("add") ? <Card >
<Card.Body style={{ minHeight: 10 }}>
{Object.keys(objs).map((r) => {
if (r == "") {
return ""
}
return <Row key={r} gutter={gutter} ><Col style={{ textAlign: 'right' }} span={isEdit ? 23 : span} >
return <Row key={r} gutter={gutter} ><Col span={isEdit ? 24 : span} >
<ZdyTable key={r} modalInit={modalInit} formCode={this.props.formCode}
formId={this.props.formId}
isPreview={isPreview}
formConfig={datas} get='mobile' fatherCode={base52} isEdit={isEdit} index={r} obj={objs[r]} fatherObj={this.props.fatherObj} init={objs} isChild={true} form={form} mapData={mapData} sqlData={sqlData} {...datas} defaultValues={defaultValues} />
{rights.includes("delete") && isEdit ? <Button type='danger' size="small" onClick={this.delete.bind(this, r)}>{deleteName || "删除"} </Button> : ''}
</Col>
{rights.includes("delete") && isEdit ? <Col style={{ textAlign: "right" }}><Button type='danger' size="small" onClick={this.delete.bind(this, r)}>{deleteName || "删除"} </Button> </Col>: ''}
</Row>
})}
......@@ -160,6 +162,7 @@ export default class ChildForm extends React.Component {
fatherCode={base52}
isEdit={isEdit}
index={r}
isPreview={isPreview}
obj={objs[r]}
formCode={this.props.formCode}
formId={this.props.formId}
......
......@@ -5,7 +5,10 @@
import React, { Component } from 'react';
import { Form} from 'antd';
export default class MobileItem extends Component {
render() {
return (<Form.Item {...this.props} label={this.props.label+"::"}/>)
const {isPreview}=this.props
return (<Form.Item {...this.props} label={isPreview?this.props.label:this.props.label+"::"}/>)
}
}
\ No newline at end of file
......@@ -1424,7 +1424,9 @@ export default class tableCom extends Component {
taskAssignee,
userId,
j,
isPreview
} = this.props;
const { options, labels, selectDis, modalCode, modalTitle, modalInit, modalProps } = this.state;
const { getFieldDecorator, getFieldError, getFieldProps } = this.props.form;
const disabled = json != null ? json.disabled : false;
......@@ -1477,6 +1479,7 @@ export default class tableCom extends Component {
isWebPrint={this.props.isWebPrint || false}
userId={userId}
key={fk}
isPreview={isPreview}
modalInit={modalInit}
datas={datas}
get={get}
......@@ -1661,7 +1664,7 @@ export default class tableCom extends Component {
) {
if (obj && obj.defaultValues && obj.defaultValues[formKey]) {
return (
<MobileItem
<MobileItem isPreview={isPreview}
labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }}
label={json.label ? json.label : sqlData[key] ? sqlData[key].title : ''}
......@@ -1672,7 +1675,7 @@ export default class tableCom extends Component {
} else {
return (
<>
<MobileItem
<MobileItem isPreview={isPreview}
labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }}
label={json.label ? json.label : sqlData[key] ? sqlData[key].title : ''}
......@@ -2169,6 +2172,7 @@ export default class tableCom extends Component {
cm = (
<ChildForm
modalInit={modalInit}
isPreview={isPreview}
fatherObj={obj}
json={json}
rights={json.rights || ['add', 'delete']}
......@@ -2397,7 +2401,7 @@ export default class tableCom extends Component {
title
) {
cm = (
<MobileItem
<MobileItem isPreview={isPreview}
labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }}
label={title}
......@@ -2438,7 +2442,7 @@ export default class tableCom extends Component {
title
) {
cm = (
<MobileItem
<MobileItem isPreview={isPreview}
labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }}
label={title}
......@@ -2469,7 +2473,7 @@ export default class tableCom extends Component {
title
) {
cm = (
<MobileItem
<MobileItem isPreview={isPreview}
labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }}
label={title}
......@@ -2504,7 +2508,7 @@ export default class tableCom extends Component {
title
) {
cm = (
<MobileItem
<MobileItem isPreview={isPreview}
labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }}
label={title}
......@@ -2588,7 +2592,7 @@ export default class tableCom extends Component {
title
) {
cm = (
<MobileItem
<MobileItem isPreview={isPreview}
labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }}
label={title}
......@@ -2642,7 +2646,7 @@ export default class tableCom extends Component {
title
) {
cm = (
<MobileItem
<MobileItem isPreview={isPreview}
labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }}
label={title}
......@@ -2691,7 +2695,7 @@ export default class tableCom extends Component {
title
) {
cm = (
<MobileItem
<MobileItem isPreview={isPreview}
labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }}
label={title}
......@@ -2764,7 +2768,7 @@ export default class tableCom extends Component {
title
) {
cm = (
<MobileItem
<MobileItem isPreview={isPreview}
labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }}
label={title}
......@@ -2804,7 +2808,7 @@ export default class tableCom extends Component {
title
) {
cm = (
<MobileItem
<MobileItem isPreview={isPreview}
labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }}
label={title}
......@@ -2829,7 +2833,7 @@ export default class tableCom extends Component {
title
) {
cm = (
<MobileItem
<MobileItem isPreview={isPreview}
labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }}
label={title}
......@@ -2862,7 +2866,7 @@ export default class tableCom extends Component {
title
) {
cm = (
<MobileItem
<MobileItem isPreview={isPreview}
labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }}
label={title}
......@@ -2879,6 +2883,7 @@ export default class tableCom extends Component {
<ChildForm
rights={json.rights || []}
isMobile={get === 'mobile'}
isPreview={isPreview}
num={json.num}
min={json.min}
max={json.max}
......@@ -2902,7 +2907,7 @@ export default class tableCom extends Component {
title
) {
cm = (
<MobileItem
<MobileItem isPreview={isPreview}
labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }}
label={title}
......@@ -2927,7 +2932,7 @@ export default class tableCom extends Component {
title
) {
cm = (
<MobileItem
<MobileItem isPreview={isPreview}
labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }}
label={title}
......@@ -2961,7 +2966,7 @@ export default class tableCom extends Component {
title
) {
cm = (
<MobileItem
<MobileItem isPreview={isPreview}
labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }}
label={title}
......@@ -3225,7 +3230,7 @@ export default class tableCom extends Component {
''
)}
{json.isMobileLabel && !isEdit && get == 'mobile' ? (
<MobileItem
<MobileItem isPreview={isPreview}
labelCol={{ span: json.labelSpan }}
wrapperCol={{ span: json.wrapperSpan }}
label={title}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论