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

修改bug

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