Browse Source

REPORT-53806【组件复用】组件生成时,数据集查询的数据集变成了内置数据集,而不是保留查询

feature/10.0
kerry 3 years ago
parent
commit
aa59c0a9bc
  1. 16
      designer-form/src/main/java/com/fr/design/mainframe/share/generate/task/ComponentCreator.java

16
designer-form/src/main/java/com/fr/design/mainframe/share/generate/task/ComponentCreator.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.share.generate.task;
import com.fr.base.TableData;
import com.fr.base.iofile.attr.ExtendSharableAttrMark;
import com.fr.base.iofile.attr.SharableAttrMark;
import com.fr.design.i18n.Toolkit;
@ -21,6 +22,7 @@ import com.fr.workspace.WorkContext;
import org.jetbrains.annotations.NotNull;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
/**
@ -91,10 +93,16 @@ public class ComponentCreator extends AbstractComponentCreatorProcessor {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
// //内置数据集
ShareEmbeddedConverter embeddedConverter = WorkContext.getCurrent().get(ShareEmbeddedConverter.class);
embeddedConverter.convertToEmbeddedTableData(tpl, paraMap);
//内置数据集
if (tpl != null) {
ShareEmbeddedConverter embeddedConverter = WorkContext.getCurrent().get(ShareEmbeddedConverter.class);
Map<String, TableData> map = embeddedConverter.convertToEmbeddedTableData(tpl, paraMap);
Iterator<Map.Entry<String, TableData>> iterator = map.entrySet().iterator();
while (iterator.hasNext()) {
Map.Entry<String, TableData> entry = iterator.next();
tpl.putTableData(entry.getKey(), entry.getValue());
}
}
return tpl;
}

Loading…
Cancel
Save