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

删除冗余代码

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