提交 1116bff3 authored 作者: 徐立's avatar 徐立
...@@ -187,26 +187,26 @@ class FormList extends React.Component { ...@@ -187,26 +187,26 @@ class FormList extends React.Component {
columns = []; columns = [];
checkList = []; // 复选框内容 checkList = []; // 复选框内容
getOptions = () => { getOptions = () => {
const refIds = []; const refIds = []
for (var i = 0; i < this.state.formItem.length; i++) { for (var i = 0; i < this.state.formItem.length; i++) {
if (
this.state.formItem[i].referenceObjId != null && if (this.state.formItem[i].referenceObjId != null && this.state.options[this.state.formItem[i].id + ''] == null) {
this.state.options[this.state.formItem[i].id + ''] == null refIds.push(this.state.formItem[i].id)
) {
refIds.push(datas[t].id);
} }
} }
if (refIds.length > 0) { if (refIds.length > 0) {
dispatch({ this.props.dispatch({
type: 'formList/getBatchOptions', type: 'formList/getBatchOptions',
payload: { ids: refIds }, payload: { ids: refIds },
callback: options => { callback: (options) => {
this.setState({ options: { ...this.state.options, ...options } });
}, this.setState({ options: { ...this.state.options, ...options } })
}
}); });
} }
}; }
modify = record => { modify = record => {
// if (this.state.formItem.length < 10) { // if (this.state.formItem.length < 10) {
this.getOptions(); this.getOptions();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论