From 9ce5a14621f7aa3d83e6ccf790a8538f59cf0439 Mon Sep 17 00:00:00 2001 From: "Leo.Qin" Date: Fri, 21 Apr 2023 14:15:15 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-94114=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E5=9B=BE=E8=A1=A8=E8=B6=85=E9=93=BE=E9=80=89?= =?UTF-8?q?=E9=A1=B9=E7=BC=BA=E5=A4=B1=20=E3=80=90=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E5=8E=9F=E5=9B=A0=E3=80=91=E6=B2=A1=E6=9C=89=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E5=BD=93=E5=89=8D=E6=98=AF=E5=86=B3=E7=AD=96=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E5=9B=BE=E8=A1=A8=E8=BF=98=E6=98=AF=E6=99=AE=E9=80=9A=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8=E5=9B=BE=E8=A1=A8=EF=BC=8C=E4=B8=A4=E8=80=85=E7=9A=84?= =?UTF-8?q?=E8=B6=85=E9=93=BE=E9=80=89=E9=A1=B9=E4=B8=8D=E5=90=8C=20?= =?UTF-8?q?=E3=80=90=E6=94=B9=E5=8A=A8=E6=80=9D=E8=B7=AF=E3=80=91=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E5=88=A4=E6=96=AD=E5=BD=93=E5=89=8D=E6=8A=A5=E8=A1=A8?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/VanChartHyperLinkPane.java | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java b/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java index 75ec5d3ce2..34375790f3 100644 --- a/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java +++ b/designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java @@ -309,12 +309,19 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane { if (!JTemplate.isValid(template)) { return false; } - 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; + + if (template.isJWorkBook()) { + // 如果是普通报表单元格,那么没有 FormHyperlink 选项 + FormHyperlinkProvider formHyperlink = StableFactory.getMarkedInstanceObjectFromClass(FormHyperlinkProvider.XML_TAG, FormHyperlinkProvider.class); + return !ComparatorUtils.equals(clazz, formHyperlink.getClass()); + } else { + // 编辑的是决策报表中的图表,那么没有ChartHyperRelateFloatLink 和 ChartHyperRelateCellLink 选项 + Class[] classes = new Class[]{ChartHyperRelateCellLink.class, ChartHyperRelateFloatLink.class}; + for (Class aClass : classes) { + if (template.getEditingReportIndex() == BaseJForm.FORM_TAB) { + if (ComparatorUtils.equals(aClass, clazz)) { + return false; + } } } }