Browse Source

Pull request #3639: 无JIRA任务 解决冲突

Merge in DESIGN/design from ~QINGHUI.LIU/design:feature/x to feature/x

* commit '5c33f67b318213df772568b576897e5447ed7e17':
  CHART-18057 富文本默认参数和数据集字段重名时,显示默认参数
research/11.0
ju|剧浩宇 4 years ago
parent
commit
6a9bf0ec67
  1. 40
      designer-base/src/main/java/com/fr/design/preview/WriteEnhancePreview.java
  2. 11
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java
  3. 3
      designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java

40
designer-base/src/main/java/com/fr/design/preview/WriteEnhancePreview.java

@ -1,40 +0,0 @@
package com.fr.design.preview;
import com.fr.base.io.IOFile;
import com.fr.design.fun.impl.AbstractPreviewProvider;
import java.util.HashMap;
import java.util.Map;
/**
* Created by loy on 2017/7/7.
*/
public class WriteEnhancePreview extends AbstractPreviewProvider {
@Override
public String nameForPopupItem() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Write_Enhance_Preview");
}
@Override
public String iconPathForPopupItem() {
return "com/fr/design/images/buttonicon/writes.png";
}
@Override
public String iconPathForLarge() {
return "com/fr/design/images/buttonicon/writeb24.png";
}
@Override
public int previewTypeCode() {
return IOFile.WRITE_ENHANCE_PREVIEW_TYPE;
}
@Override
public Map<String, Object> parametersForPreview() {
Map<String, Object> map = new HashMap<String, Object>();
map.put("op", "write_plus");
return map;
}
}

11
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartTooltipContentPane.java

@ -47,6 +47,7 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@ -463,9 +464,15 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
private void refreshTableFieldParams(Map<String, String> params) {
List<String> tableFieldNames = VanChartRichEditorPane.getFieldNames();
List<String> defaultParams = Arrays.asList(getRichTextFieldNames());
if (tableFieldNames != null && params != null) {
for (String fieldName : tableFieldNames) {
if (tableFieldNames == null || params == null) {
return;
}
for (String fieldName : tableFieldNames) {
// 富文本默认参数和数据集字段重名时,显示默认参数
if (!defaultParams.contains(fieldName)) {
params.put(fieldName, "${" + fieldName + "_" + fieldName.hashCode() + "}");
}
}

3
designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java

@ -58,7 +58,6 @@ import com.fr.design.preview.MobilePreview;
import com.fr.design.preview.PagePlusPreview;
import com.fr.design.preview.PagePreview;
import com.fr.design.preview.ViewPreview;
import com.fr.design.preview.WriteEnhancePreview;
import com.fr.design.preview.WritePreview;
import com.fr.design.report.fit.menupane.ReportFitAttrAction;
import com.fr.design.roleAuthority.ReportAndFSManagePane;
@ -919,7 +918,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
public PreviewProvider[] supportPreview() {
PreviewProvider[] templatePreviews = super.supportPreview();
return ArrayUtils.addAll(new PreviewProvider[]{
new PagePreview(), new WritePreview(), new ViewPreview(), new WriteEnhancePreview(), new MobilePreview(), new PagePlusPreview()
new PagePreview(), new WritePreview(), new ViewPreview(), new MobilePreview(), new PagePlusPreview()
}, templatePreviews);
}

Loading…
Cancel
Save