提交 32f33c47 authored 作者: 钟是志's avatar 钟是志

删除冗余代码

上级 9cd2df2a
...@@ -363,7 +363,7 @@ export default class FormArray extends Component { ...@@ -363,7 +363,7 @@ export default class FormArray extends Component {
fieldDom = ( fieldDom = (
<TextArea <TextArea
{...defaultProps} {...defaultProps}
autosize={{ minRows: 4, maxRows: 6 }} autoSize={{ minRows: 4, maxRows: 6 }}
onChange={e => { onChange={e => {
changeValue(e.target.value, info.key); changeValue(e.target.value, info.key);
}} }}
......
...@@ -116,7 +116,7 @@ export default class ZdyTable extends Component { ...@@ -116,7 +116,7 @@ export default class ZdyTable extends Component {
formConfig: xxx, formConfig: xxx,
}) })
}) })
return; return;
} }
if (isCg === 'yes') { if (isCg === 'yes') {
...@@ -153,6 +153,7 @@ export default class ZdyTable extends Component { ...@@ -153,6 +153,7 @@ export default class ZdyTable extends Component {
} }
} }
const obj = JSON.parse(val.unifiedServicePatternModel.content); const obj = JSON.parse(val.unifiedServicePatternModel.content);
const xxx = obj.datas[obj.init]; const xxx = obj.datas[obj.init];
this.initExcel(obj,()=>{ this.initExcel(obj,()=>{
this.setState({ this.setState({
...@@ -177,13 +178,15 @@ export default class ZdyTable extends Component { ...@@ -177,13 +178,15 @@ export default class ZdyTable extends Component {
: xxx.defaultBinds, : xxx.defaultBinds,
}) })
}) })
return; return;
} }
if ( if (
val.unifiedServicePatternModel.isDefaultError != null && val.unifiedServicePatternModel.isDefaultError != null &&
val.unifiedServicePatternModel.isDefaultError val.unifiedServicePatternModel.isDefaultError
) { )
{
if (this.props.get == 'web') { if (this.props.get == 'web') {
message.error('当前办理人数较多,服务繁忙,请稍后再试!'); message.error('当前办理人数较多,服务繁忙,请稍后再试!');
} else { } else {
...@@ -193,6 +196,7 @@ export default class ZdyTable extends Component { ...@@ -193,6 +196,7 @@ export default class ZdyTable extends Component {
router.goBack(); router.goBack();
return; return;
} }
const mapData = {}; const mapData = {};
const sqlData = {}; const sqlData = {};
const sqls = val.unifiedServicePatternModel.sqlModels; const sqls = val.unifiedServicePatternModel.sqlModels;
...@@ -212,6 +216,7 @@ export default class ZdyTable extends Component { ...@@ -212,6 +216,7 @@ export default class ZdyTable extends Component {
} }
} }
const obj = JSON.parse(val.unifiedServicePatternModel.content); const obj = JSON.parse(val.unifiedServicePatternModel.content);
console.log(obj, '-----content---');
const xxx = obj.datas[this.props.formKey ? this.props.formKey : obj.init]; // 是否是存在历史表单传入值 const xxx = obj.datas[this.props.formKey ? this.props.formKey : obj.init]; // 是否是存在历史表单传入值
const fk = this.props.formKey const fk = this.props.formKey
? this.props.formKey ? this.props.formKey
...@@ -238,7 +243,7 @@ export default class ZdyTable extends Component { ...@@ -238,7 +243,7 @@ export default class ZdyTable extends Component {
isBorder: this.props.table ? obj.datas[val.taskFormKey].isBorder : xxx.isBorder, isBorder: this.props.table ? obj.datas[val.taskFormKey].isBorder : xxx.isBorder,
isRowCol: this.props.table ? obj.datas[val.taskFormKey].isRowCol : xxx.isRowCol, isRowCol: this.props.table ? obj.datas[val.taskFormKey].isRowCol : xxx.isRowCol,
viewMode: this.props.table ? obj.datas[val.taskFormKey]. viewMode : xxx.viewMode, viewMode: this.props.table ? obj.datas[val.taskFormKey]. viewMode : xxx.viewMode,
items: this.props.table ? obj.datas[val.taskFormKey].items : xxx.items, items: this.props.table ? obj.datas[val.taskFormKey].items : xxx.items,
isReady: true, isReady: true,
init: { ...this.state.init, ...(val.isSecond ? this.props.obj : {}) }, init: { ...this.state.init, ...(val.isSecond ? this.props.obj : {}) },
...@@ -328,10 +333,10 @@ export default class ZdyTable extends Component { ...@@ -328,10 +333,10 @@ export default class ZdyTable extends Component {
this.setState({ isChange: !this.state.isChange },()=>{ this.setState({ isChange: !this.state.isChange },()=>{
if(callback)callback(); if(callback)callback();
}); });
console.log('公式导入excel成功'); console.log('公式导入excel成功');
}) })
}; };
...@@ -464,7 +469,7 @@ export default class ZdyTable extends Component { ...@@ -464,7 +469,7 @@ export default class ZdyTable extends Component {
formConfig: xxx, formConfig: xxx,
}) })
}) })
return; return;
} }
if (isCg === 'yes') { if (isCg === 'yes') {
...@@ -511,7 +516,7 @@ export default class ZdyTable extends Component { ...@@ -511,7 +516,7 @@ export default class ZdyTable extends Component {
: xxx.defaultBinds, : xxx.defaultBinds,
}) })
}) })
return; return;
} }
const mapData = {}; const mapData = {};
...@@ -534,7 +539,7 @@ export default class ZdyTable extends Component { ...@@ -534,7 +539,7 @@ export default class ZdyTable extends Component {
} }
const obj = JSON.parse(val.unifiedServicePatternModel.content); const obj = JSON.parse(val.unifiedServicePatternModel.content);
const xxx = obj.datas[this.props.formKey ? this.props.formKey : obj.init]; // 是否是存在历史表单传入值 const xxx = obj.datas[this.props.formKey ? this.props.formKey : obj.init]; // 是否是存在历史表单传入值
if(this.props.isQuery) return; if(this.props.isQuery) return;
const fk = this.props.formKey const fk = this.props.formKey
? this.props.formKey ? this.props.formKey
...@@ -717,7 +722,7 @@ export default class ZdyTable extends Component { ...@@ -717,7 +722,7 @@ export default class ZdyTable extends Component {
paddingBottom: paddingBottom != null ? paddingBottom : isWebPrint ? 0 : '10px', paddingBottom: paddingBottom != null ? paddingBottom : isWebPrint ? 0 : '10px',
}; };
if (!isReady) return <></>; if (!isReady) return <></>;
if (this.props.postData?.isUpdate) { if (this.props.postData?.isUpdate) {
updateTime = moment(+this.props.postData?.updateTime).format('llll'); updateTime = moment(+this.props.postData?.updateTime).format('llll');
...@@ -730,7 +735,10 @@ export default class ZdyTable extends Component { ...@@ -730,7 +735,10 @@ export default class ZdyTable extends Component {
{this.props.postData?.isUpdate ? ( {this.props.postData?.isUpdate ? (
<div style={{ margin: '100px 24px 24px' }}> <div style={{ margin: '100px 24px 24px' }}>
<div style={{ textAlign: 'center' }}> <div style={{ textAlign: 'center' }}>
<img style={{ marginRight: 30 }} src={maintain}></img> <img style={{ marginRight: 30 }}
src={maintain}>
</img>
</div> </div>
<p <p
style={{ style={{
......
...@@ -22,7 +22,7 @@ export default class ChildForm extends React.Component { ...@@ -22,7 +22,7 @@ export default class ChildForm extends React.Component {
componentWillReceiveProps(nextProps) { componentWillReceiveProps(nextProps) {
// Should be a controlled component. // Should be a controlled component.
if ('value' in nextProps) { if ('value' in nextProps) {
const value = nextProps.value; const value = nextProps.value;
this.state = value; this.state = value;
} }
...@@ -61,12 +61,12 @@ export default class ChildForm extends React.Component { ...@@ -61,12 +61,12 @@ export default class ChildForm extends React.Component {
return; return;
} }
const x = form.getFieldValue(base52); const x = form.getFieldValue(base52);
delete x[uuid]; delete x[uuid];
delete x[""]; delete x[""];
if (!('value' in this.props)) { if (!('value' in this.props)) {
this.state=x this.state=x
} }
...@@ -89,7 +89,7 @@ export default class ChildForm extends React.Component { ...@@ -89,7 +89,7 @@ export default class ChildForm extends React.Component {
return; return;
} }
objs['id_' + UUID.v4().replace(/-/g, '2')] = {}; objs['id_' + UUID.v4().replace(/-/g, '2')] = {};
if (!('value' in this.props)) { if (!('value' in this.props)) {
this.setState(objs); this.setState(objs);
} }
...@@ -121,7 +121,7 @@ export default class ChildForm extends React.Component { ...@@ -121,7 +121,7 @@ export default class ChildForm extends React.Component {
getCellValue, getCellValue,
taskId taskId
} = this.props; } = 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;
...@@ -148,7 +148,7 @@ export default class ChildForm extends React.Component { ...@@ -148,7 +148,7 @@ export default class ChildForm extends React.Component {
span={isEdit ? 24 : span} span={isEdit ? 24 : span}
> >
<ZdyTable <ZdyTable
setRealTimeValues={this.props.setRealTimeValues} setRealTimeValues={this.props.setRealTimeValues}
trees={this.props.trees} trees={this.props.trees}
key={r} key={r}
...@@ -217,6 +217,10 @@ export default class ChildForm extends React.Component { ...@@ -217,6 +217,10 @@ export default class ChildForm extends React.Component {
); );
} }
/***
* 子表单
* */
return ( return (
<div style={{ width: '100%' }}> <div style={{ width: '100%' }}>
<Row gutter={gutter}> <Row gutter={gutter}>
...@@ -224,9 +228,10 @@ export default class ChildForm extends React.Component { ...@@ -224,9 +228,10 @@ export default class ChildForm extends React.Component {
if (r == '') { if (r == '') {
return ''; return '';
} }
console.log('子表单', r);
// console.log(form.getFieldsValue());
return ( return (
<Col span={span}> <Col span={span} key={r}>
<ZdyTable <ZdyTable
taskId={taskId} taskId={taskId}
setRealTimeValues={this.props.setRealTimeValues} setRealTimeValues={this.props.setRealTimeValues}
......
...@@ -2472,7 +2472,7 @@ export default class tableCom extends Component { ...@@ -2472,7 +2472,7 @@ export default class tableCom extends Component {
: [{required: required, message: '请输入' + title}], : [{required: required, message: '请输入' + title}],
})( })(
<TextArea <TextArea
autosize={{minRows: 4}} autoSize={{minRows: 4}}
disabled={disabled} disabled={disabled}
placeholder={json.placeholder} placeholder={json.placeholder}
/>, />,
...@@ -2518,7 +2518,7 @@ export default class tableCom extends Component { ...@@ -2518,7 +2518,7 @@ export default class tableCom extends Component {
: [{required: required, message: '请输入' + title}], : [{required: required, message: '请输入' + title}],
})( })(
<TextArea <TextArea
autosize={{minRows: 4}} autoSize={{minRows: 4}}
disabled={disabled} disabled={disabled}
rows={4} rows={4}
placeholder={json.placeholder} placeholder={json.placeholder}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论