diff --git a/designer-base/src/main/java/com/fr/design/preview/NewWritePreview.java b/designer-base/src/main/java/com/fr/design/preview/NewWritePreview.java new file mode 100644 index 000000000..8c7e408ff --- /dev/null +++ b/designer-base/src/main/java/com/fr/design/preview/NewWritePreview.java @@ -0,0 +1,39 @@ +package com.fr.design.preview; + +import com.fr.design.fun.impl.AbstractPreviewProvider; + +import java.util.HashMap; +import java.util.Map; + +/** + * 新前端填报预览 + * by abel 2021/07/08 + */ +public class NewWritePreview extends AbstractPreviewProvider { + @Override + public String nameForPopupItem() { + return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Write_New_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 99; + } + + @Override + public Map parametersForPreview() { + Map map = new HashMap(); + map.put("op", "write_new"); + return map; + } +} diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java b/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java index fdc811df4..3b3d5e11d 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java @@ -55,6 +55,7 @@ import com.fr.design.module.DesignModuleFactory; import com.fr.design.parameter.ParameterDefinitePane; import com.fr.design.parameter.ParameterInputPane; import com.fr.design.preview.MobilePreview; +import com.fr.design.preview.NewWritePreview; import com.fr.design.preview.PagePlusPreview; import com.fr.design.preview.PagePreview; import com.fr.design.preview.ViewPreview; @@ -927,7 +928,7 @@ public class JWorkBook extends JTemplate { public PreviewProvider[] supportPreview() { PreviewProvider[] templatePreviews = super.supportPreview(); return ArrayUtils.addAll(new PreviewProvider[]{ - new PagePreview(), new WritePreview(), new ViewPreview(), new MobilePreview(), new PagePlusPreview() + new PagePreview(), new WritePreview(), new ViewPreview(), new MobilePreview(), new PagePlusPreview(),new NewWritePreview() }, templatePreviews); }