Browse Source

REPORT-75998 添加注释、增加决策报表底层组件的搜索逻辑

feature/x
Destiny.Lin 2 years ago
parent
commit
2a810e445c
  1. 11
      designer-realize/src/main/java/com/fr/design/actions/replace/action/content/component/SearchComponentAction.java
  2. 7
      designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/chart/SearchChartMapDataFormulaAction.java
  3. 7
      designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/widget/SearchWidgetFormulaAction.java
  4. 3
      designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/widget/SearchWidgetFormulaManager.java

11
designer-realize/src/main/java/com/fr/design/actions/replace/action/content/component/SearchComponentAction.java

@ -52,6 +52,8 @@ public class SearchComponentAction implements SearchAction {
content.setTemplateName(jTemplate.getTemplateName());
content.addTRL(jTemplate.getTemplateName());
content.setFrmFlag(true);
//处理最底层form组件
dealForm(componentInfos, content, form.getContainer());
//参数面板
dealPara(componentInfos, content, form.getParaContainer());
//body面板
@ -60,6 +62,15 @@ public class SearchComponentAction implements SearchAction {
setComponentInfos(componentInfos);
}
private void dealForm(List<ComponentInfo> componentInfos, ITContent content, WLayout container) {
ITContent formContent = ITContent.copy(content);
formContent.setReplaceObject(container);
dealContent(formContent, container.getWidgetName());
formContent.addOtherPos(container.getWidgetName());
formContent.setJumpAble(false);
componentInfos.add(new ComponentInfo(formContent));
}
private void dealBody(List<ComponentInfo> componentInfos, ITContent content, Widget body) {
if (body instanceof WLayout) {
ITContent bodyContent = ITContent.copy(content);

7
designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/chart/SearchChartMapDataFormulaAction.java

@ -159,6 +159,13 @@ public class SearchChartMapDataFormulaAction implements SearchChartDataFormula {
}
}
/**
* 处理区域名
* @param formulaInfos
* @param content
* @param object
* @param definition
*/
public void dealAreaName(List<FormulaInfo> formulaInfos, ITContent content, Object object, VanMapReportDefinition definition) {
if (object instanceof Formula) {
ITContent cateContent = ITContent.copy(content);

7
designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/widget/SearchWidgetFormulaAction.java

@ -20,6 +20,7 @@ import com.fr.form.ui.ChartEditor;
import com.fr.form.ui.Label;
import com.fr.form.ui.Widget;
import com.fr.form.ui.container.WBorderLayout;
import com.fr.form.ui.container.WScaleLayout;
import com.fr.form.ui.container.WTitleLayout;
import com.fr.form.ui.widget.CRBoundsWidget;
@ -74,7 +75,6 @@ public class SearchWidgetFormulaAction extends AbstractSearchWidgetFormulaAction
private void searchFormulaFromWidgetValue(Info info, List<FormulaInfo> formulaInfos) {
Widget widget = (Widget) info.getContent().getReplaceObject();
if (widget instanceof WScaleLayout) {
widget = ((CRBoundsWidget) ((WScaleLayout) widget).getWidget(0)).getWidget();
info.getContent().setReplaceObject(widget);
@ -89,7 +89,7 @@ public class SearchWidgetFormulaAction extends AbstractSearchWidgetFormulaAction
}
}
Widget tempWidget = (((WTitleLayout) widget).getBodyBoundsWidget()).getWidget();
if (tempWidget instanceof ChartEditor && ((ChartEditor) tempWidget).getChartCollection() instanceof ChartCollection) {
if (isChartValid(tempWidget)) {
SearchChartCollectionFormulaAction.getInstance().searchChartCollectionFormula(formulaInfos, info.getContent(), (ChartCollection) ((ChartEditor) tempWidget).getChartCollection());
}
}
@ -102,6 +102,9 @@ public class SearchWidgetFormulaAction extends AbstractSearchWidgetFormulaAction
}
private boolean isChartValid(Widget tempWidget) {
return tempWidget instanceof ChartEditor && ((ChartEditor) tempWidget).getChartCollection() instanceof ChartCollection;
}
public boolean isReplaceObjectExist(Info info) {
return info.getContent() != null && info.getContent().getReplaceObject() != null;

3
designer-realize/src/main/java/com/fr/design/actions/replace/action/content/formula/widget/SearchWidgetFormulaManager.java

@ -33,6 +33,7 @@ public class SearchWidgetFormulaManager implements SearchManager {
private static final String TREE_COMBO_BOX_EDITOR = "TreeComboBoxEditor";
private static final String TREE_EDITOR = "TreeEditor";
private static final String W_TITLE_LAYOUT = "WTitleLayout";
private static final String W_BORDER_LAYOUT = "WBorderLayout";
private SearchWidgetFormulaManager() {
/**
@ -48,7 +49,7 @@ public class SearchWidgetFormulaManager implements SearchManager {
register(NUMBER_EDITOR, SearchCommonWidgetFormulaAction.getInstance());
register(TEXT_EDITOR, SearchCommonWidgetFormulaAction.getInstance());
register(W_TITLE_LAYOUT, SearchCommonWidgetFormulaAction.getInstance());
register(W_BORDER_LAYOUT, SearchCommonWidgetFormulaAction.getInstance());
/**
* 日期类型
*/

Loading…
Cancel
Save