diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/utils/SearchJSUtils.java b/designer-realize/src/main/java/com/fr/design/actions/replace/utils/SearchJSUtils.java index 8a2d245b54..cc444ba91e 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/utils/SearchJSUtils.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/utils/SearchJSUtils.java @@ -387,11 +387,14 @@ public class SearchJSUtils { if (chartCollection.getChart(i) instanceof VanChart) { VanChart chart = ((VanChart) chartCollection.getChart(i)); if (chart.getPlot() != null) { - NameJavaScriptGroup nameJavaScriptGroup = chart.getPlot().getHotHyperLink(); - if (isNameJavaScriptGroupExist(nameJavaScriptGroup)) { - for (int j = 0; j < nameJavaScriptGroup.size(); j++) { - nameJavaScriptArrayList.add(nameJavaScriptGroup.getNameHyperlink(j)); + if (chart.getPlot() instanceof VanChartCustomPlot) { + VanChartCustomPlot plot = chart.getPlot(); + for (Plot customPlot : plot.getCustomPlotList()) { + getChartJavaScriptFromGroup(customPlot.getHotHyperLink(), nameJavaScriptArrayList); } + } else { + NameJavaScriptGroup nameJavaScriptGroup = chart.getPlot().getHotHyperLink(); + getChartJavaScriptFromGroup(nameJavaScriptGroup, nameJavaScriptArrayList); } } } @@ -399,6 +402,14 @@ public class SearchJSUtils { return nameJavaScriptArrayList; } + private static void getChartJavaScriptFromGroup(NameJavaScriptGroup nameJavaScriptGroup, ArrayList nameJavaScriptArrayList) { + if (isNameJavaScriptGroupExist(nameJavaScriptGroup)) { + for (int j = 0; j < nameJavaScriptGroup.size(); j++) { + nameJavaScriptArrayList.add(nameJavaScriptGroup.getNameHyperlink(j)); + } + } + } + /** * 处理图表的交互属性(可能存在多种地图) * @param content 存储信息的数据结构