Browse Source

Pull request #10213: REPORT-75998 修复多级菜单下无法跳转的错误

Merge in DESIGN/design from ~DESTINY.LIN/design:feature/x to feature/x

* commit 'b53cdd74fe195562776a61e8dd57d1e609bf80d7':
  REPORT-75998 修复多级菜单下无法跳转的错误
feature/x
Destiny.Lin-林锦龙 2 years ago
parent
commit
10b36d1dd2
  1. 1
      designer-realize/src/main/java/com/fr/design/actions/replace/action/content/cell/SearchCellAction.java
  2. 1
      designer-realize/src/main/java/com/fr/design/actions/replace/action/content/component/SearchComponentAction.java
  3. 1
      designer-realize/src/main/java/com/fr/design/actions/replace/action/content/floatelement/SearchFloatAction.java
  4. 1
      designer-realize/src/main/java/com/fr/design/actions/replace/action/content/widget/SearchWidgetAction.java
  5. 11
      designer-realize/src/main/java/com/fr/design/actions/replace/info/base/ITContent.java
  6. 2
      designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableButton.java

1
designer-realize/src/main/java/com/fr/design/actions/replace/action/content/cell/SearchCellAction.java

@ -61,6 +61,7 @@ public class SearchCellAction implements SearchAction {
ITContent content = new ITContent();
content.setTemplateName(jTemplate.getTemplateName());
content.addTRL(jTemplate.getTemplateName());
content.setTemplatePath(jTemplate.getPath());
if (jTemplate.getTarget() instanceof Form) {
setCellInfos(dealForm(jTemplate));
} else if (jTemplate.getTarget() instanceof WorkBook) {

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

@ -50,6 +50,7 @@ public class SearchComponentAction implements SearchAction {
Form form = (Form) jTemplate.getTarget();
ITContent content = new ITContent();
content.setTemplateName(jTemplate.getTemplateName());
content.setTemplatePath(jTemplate.getPath());
content.addTRL(jTemplate.getTemplateName());
content.setFrmFlag(true);
//处理最底层form组件

1
designer-realize/src/main/java/com/fr/design/actions/replace/action/content/floatelement/SearchFloatAction.java

@ -44,6 +44,7 @@ public class SearchFloatAction implements SearchAction {
Report report = workBook.getReport(i);
ITContent content = new ITContent();
content.setTemplateName(jTemplate.getTemplateName());
content.setTemplatePath(jTemplate.getPath());
content.setSheetID(String.valueOf(i));
content.setSheetName(workBook.getReportName(i));
content.addTRL(jTemplate.getTemplateName());

1
designer-realize/src/main/java/com/fr/design/actions/replace/action/content/widget/SearchWidgetAction.java

@ -44,6 +44,7 @@ public class SearchWidgetAction implements SearchAction {
ArrayList<WidgetInfo> widgetInfos = new ArrayList<>();
ITContent content = new ITContent();
content.setTemplateName(jTemplate.getTemplateName());
content.setTemplatePath(jTemplate.getPath());
//这边拿SearchCellAction里的CellInfo来查找,由于在SearchCellAction里面已经考虑了决策报表和普通报表两种情况了,这边就不用再做区分
addCellWidget2Array(widgetInfos, jTemplate);
content.addTRL(jTemplate.getTemplateName());

11
designer-realize/src/main/java/com/fr/design/actions/replace/info/base/ITContent.java

@ -19,6 +19,7 @@ public class ITContent implements Cloneable {
private String sheetID;
private String sheetName;
private String templateName;
private String templatePath;
private String blockName;
/**
* 一些不好定位的位置先用字符串展示出来就好
@ -90,6 +91,7 @@ public class ITContent implements Cloneable {
this.trlString = StringUtils.EMPTY;
this.operatorArray = new ArrayList<>();
this.holdObject = new Object();
this.templatePath = StringUtils.EMPTY;
}
@ -117,6 +119,7 @@ public class ITContent implements Cloneable {
result.setJumpAble(content.isJumpAble());
result.setHoldObject(content.getHoldObject());
result.setTag(content.getTag());
result.setTemplatePath(content.getTemplatePath());
}
return result;
}
@ -205,6 +208,14 @@ public class ITContent implements Cloneable {
this.showObject = showObject;
}
public String getTemplatePath() {
return templatePath;
}
public void setTemplatePath(String templatePath) {
this.templatePath = templatePath;
}
/**
* 添加位置信息
*

2
designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableButton.java

@ -44,7 +44,7 @@ public class ITTableButton extends AbstractCellEditor implements TableCellEditor
if (StringUtils.isNotEmpty(GeneralUtils.objectToString(content.getTrlString()))) {
ITReplaceMainDialog.setITReplaceFlag(true);
TRL trl = new TRL(GeneralUtils.objectToString(content.getTrlString()));
DesignerContext.getDesignerFrame().openTemplate(FILEFactory.createFILE(ProjectConstants.REPORTLETS_NAME + FILEFactory.SEPARATOR + content.getTemplateName()));
DesignerContext.getDesignerFrame().openTemplate(FILEFactory.createFILE(content.getTemplatePath()));
HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().navigate(trl);
}
ITReplaceMainDialog.setITReplaceFlag(false);

Loading…
Cancel
Save