From 21f5292f2d3fad71ec3184e5a40ebff98d562b6d Mon Sep 17 00:00:00 2001 From: kuangshuai Date: Thu, 19 Aug 2021 15:19:39 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-57520=20=E6=8A=A5=E8=A1=A8=E5=9D=97?= =?UTF-8?q?=E5=86=85=E5=9B=BE=E8=A1=A8=E8=B6=85=E9=93=BE=E4=B8=8D=E5=BA=94?= =?UTF-8?q?=E8=AF=A5=E6=98=BE=E7=A4=BA=E6=82=AC=E6=B5=AE=E7=AA=97=E5=9B=BE?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/module/ChartHyperlinkGroup.java | 40 ++++++++----------- 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/design/module/ChartHyperlinkGroup.java b/designer-chart/src/main/java/com/fr/design/module/ChartHyperlinkGroup.java index 728ebbe057..7611f3300d 100644 --- a/designer-chart/src/main/java/com/fr/design/module/ChartHyperlinkGroup.java +++ b/designer-chart/src/main/java/com/fr/design/module/ChartHyperlinkGroup.java @@ -58,26 +58,21 @@ public class ChartHyperlinkGroup extends BaseHyperlinkGroup { if (template == null) { return false; } - if (template.isJWorkBook() || DesignModeContext.isDuchampMode()) { // 如果是普通报表单元格,那么没有 FormHyperlink 选项 FormHyperlinkProvider formHyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class); //返回true表示可用,返回false表示不可用 return !ComparatorUtils.equals(clazz, formHyperlink.getClass()); - } else { // 如果是决策报表 - Class[] classes = new Class[]{ChartHyperRelateCellLink.class, ChartHyperRelateFloatLink.class}; - for (Class aClass : classes) { - if (template.getEditingReportIndex() == BaseJForm.FORM_TAB) { - // 编辑的是决策报表中的图表,那么没有ChartHyperRelateFloatLink 和 ChartHyperRelateCellLink 选项,有FormHyperlink 选项 - if (ComparatorUtils.equals(aClass, clazz)) { - return false; - } - } else if (template.getEditingReportIndex() == BaseJForm.ELEMENTCASE_TAB) { - // 编辑的是决策报表中的报表块,那么没有 ChartHyperRelateFloatLink,有ChartHyperRelateCellLink 和 FormHyperlink 选项 - return !ComparatorUtils.equals(clazz, ChartHyperRelateFloatLink.class); - } + if (template.getEditingReportIndex() == BaseJForm.FORM_TAB) { + // 编辑的是决策报表中的图表,那么没有ChartHyperRelateFloatLink 和 ChartHyperRelateCellLink 选项,有FormHyperlink 选项 + Class[] classes = new Class[]{ChartHyperRelateCellLink.class, ChartHyperRelateFloatLink.class}; + return !ArrayUtils.contains(classes, clazz); + } else if (template.getEditingReportIndex() == BaseJForm.ELEMENTCASE_TAB) { + // 编辑的是决策报表中的报表块,那么没有 ChartHyperPoplink 和 ChartHyperRelateFloatLink + Class[] classes = new Class[]{ChartHyperPoplink.class, ChartHyperRelateFloatLink.class}; + return !ArrayUtils.contains(classes, clazz); } } return true; @@ -101,17 +96,14 @@ public class ChartHyperlinkGroup extends BaseHyperlinkGroup { return !ComparatorUtils.equals(object.getClass(), formHyperlink.getClass()); } else { // 如果是决策报表 - Class[] classes = new Class[]{ChartHyperRelateCellLink.class, ChartHyperRelateFloatLink.class}; - for (Class aClass : classes) { - if (template.getEditingReportIndex() == BaseJForm.FORM_TAB) { - // 编辑的是决策报表中的图表,那么没有ChartHyperRelateFloatLink 和 ChartHyperRelateCellLink 选项,有FormHyperlink 选项 - if (ComparatorUtils.equals(aClass, object.getClass())) { - return false; - } - } else if (template.getEditingReportIndex() == BaseJForm.ELEMENTCASE_TAB) { - // 编辑的是决策报表中的报表块,那么没有 ChartHyperRelateFloatLink,有ChartHyperRelateCellLink 和 FormHyperlink 选项 - return !ComparatorUtils.equals(object.getClass(), ChartHyperRelateFloatLink.class); - } + if (template.getEditingReportIndex() == BaseJForm.FORM_TAB) { + // 编辑的是决策报表中的图表,那么没有ChartHyperRelateFloatLink 和 ChartHyperRelateCellLink 选项,有FormHyperlink 选项 + Class[] classes = new Class[]{ChartHyperRelateCellLink.class, ChartHyperRelateFloatLink.class}; + return !ArrayUtils.contains(classes, object.getClass()); + } else if (template.getEditingReportIndex() == BaseJForm.ELEMENTCASE_TAB) { + // 编辑的是决策报表中的报表块,那么没有 ChartHyperPoplink 和 ChartHyperRelateFloatLink + Class[] classes = new Class[]{ChartHyperPoplink.class, ChartHyperRelateFloatLink.class}; + return !ArrayUtils.contains(classes, object.getClass()); } } return true;