From 9d4d5f6473a2c1b6b52aa3cf124a90a856014074 Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Fri, 30 Sep 2022 14:55:57 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-75998=20=E4=BF=AE=E5=A4=8D=E5=A4=9A?= =?UTF-8?q?=E7=BA=A7=E8=8F=9C=E5=8D=95=E4=B8=8B=E6=97=A0=E6=B3=95=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../replace/action/content/cell/SearchCellAction.java | 1 + .../content/component/SearchComponentAction.java | 1 + .../content/floatelement/SearchFloatAction.java | 1 + .../action/content/widget/SearchWidgetAction.java | 1 + .../design/actions/replace/info/base/ITContent.java | 11 +++++++++++ .../fr/design/actions/replace/ui/ITTableButton.java | 2 +- 6 files changed, 16 insertions(+), 1 deletion(-) diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/cell/SearchCellAction.java b/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/cell/SearchCellAction.java index 826b247e0c..2711069847 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/cell/SearchCellAction.java +++ b/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) { diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/component/SearchComponentAction.java b/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/component/SearchComponentAction.java index 336aa93745..fd741fdf7e 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/component/SearchComponentAction.java +++ b/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组件 diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/floatelement/SearchFloatAction.java b/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/floatelement/SearchFloatAction.java index 4eaa574bea..13398be1f1 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/floatelement/SearchFloatAction.java +++ b/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()); diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/widget/SearchWidgetAction.java b/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/widget/SearchWidgetAction.java index 66ca91dd15..32a21bee54 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/action/content/widget/SearchWidgetAction.java +++ b/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 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()); diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/info/base/ITContent.java b/designer-realize/src/main/java/com/fr/design/actions/replace/info/base/ITContent.java index afa9847f37..ee83e77534 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/info/base/ITContent.java +++ b/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; + } + /** * 添加位置信息 * diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableButton.java b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableButton.java index d64946d09d..1a73d3fcb3 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableButton.java +++ b/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);