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

表单设计器导入组件 修改

上级 5b9097e7
......@@ -11,6 +11,8 @@ const Step = Steps.Step;
const TabPane = Tabs.TabPane;
const exportExcel = CLIENT_TYPE == 'mobile' ? null : require('xlsx-oc').exportExcel;
let tempCallback = () => {};
@connect(({ DataObj, loading }) => ({
DataObj,
......@@ -19,7 +21,9 @@ const exportExcel = CLIENT_TYPE == 'mobile' ? null : require('xlsx-oc').exportEx
export default class ImportUtil extends React.PureComponent {
constructor(props) {
super(props);
const exportTemplateUrl = encodeURI(
tempCallback = this.props.callback;
const exportTemplateUrl = encodeURI(
`${config.httpServer}/DataObjApi/importTemplateDownload?objId=${this.props.objId}&name=${
props.fileName
}`,
......@@ -73,13 +77,16 @@ export default class ImportUtil extends React.PureComponent {
}
}
if (current === 3) {
console.log('current === 3');
this.setState({
current: current,
isShow: true,
});
if (this.props.callback) {
this.props.callback();
}
},()=>{
if (tempCallback && typeof tempCallback === 'function') {
tempCallback();
tempCallback = null;
}
});
}
}
......@@ -106,9 +113,10 @@ export default class ImportUtil extends React.PureComponent {
isShow: true,
visible: false,
});
if (this.props.callback) {
this.props.callback();
}
// if (typeof tempCallback === 'function') {
// tempCallback();
// tempCallback = null;
// }
},
});
}
......
......@@ -643,6 +643,8 @@ class FormList extends React.Component {
}
};
sqlBs16 = Base16Encode(this.props.sql);
getPage = (params, values, callPage, pageNo) => {
if (this.columns == null || this.columns.length == 0) {
return;
......@@ -880,7 +882,7 @@ class FormList extends React.Component {
//如果隐藏的话 就用隐藏域放置
if (item.isHidden) {
return (
<FormItem className={styles.hidden}>
<FormItem className={styles.hidden} key={item.id}>
{form.getFieldDecorator(item.name, {
initialValue: formData == null ? '' : formData[item.name],
})(<Input type="hidden" placeholder="请输入" />)}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论