From 74a947c089df0f3e0f530235e866ee3e3d23e33a Mon Sep 17 00:00:00 2001 From: kerry Date: Mon, 16 Aug 2021 10:26:38 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-56128=E3=80=90=E5=BC=80=E5=8F=91?= =?UTF-8?q?=E8=80=85=E9=A2=84=E8=A7=88=E6=94=AF=E6=8C=81=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E5=B8=83=E5=B1=80=E3=80=91=E6=96=B0=E8=87=AA?= =?UTF-8?q?=E9=80=82=E5=BA=94-=E8=AE=BE=E8=AE=A1=E7=94=BB=E5=B8=83?= =?UTF-8?q?=E9=87=8C=E6=8B=96=E6=8B=BD=E8=B0=83=E6=95=B4=E7=BB=84=E4=BB=B6?= =?UTF-8?q?A=E5=A4=A7=E5=B0=8F=EF=BC=8C=E6=8C=A4=E5=8E=8B=E7=BB=9D?= =?UTF-8?q?=E5=AF=B9=E7=94=BB=E5=B8=83=E5=9D=97=EF=BC=8C=E7=BB=9D=E5=AF=B9?= =?UTF-8?q?=E7=94=BB=E5=B8=83=E5=9D=97=E5=86=85=E7=BB=84=E4=BB=B6=E4=BC=9A?= =?UTF-8?q?=E4=BF=9D=E6=8C=81=E5=B0=BA=E5=AF=B8=E4=B8=8D=E5=8F=98=E4=B8=94?= =?UTF-8?q?=E8=B6=85=E5=87=BA=E7=BB=9D=E5=AF=B9=E7=94=BB=E5=B8=83=E5=9D=97?= =?UTF-8?q?=EF=BC=9B=E4=BD=86=E5=BC=80=E5=8F=91=E8=80=85=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E4=B8=8B=EF=BC=8C=E6=AD=A4=E5=9C=BA=E6=99=AF=EF=BC=8C=E7=BB=9D?= =?UTF-8?q?=E5=AF=B9=E7=94=BB=E5=B8=83=E5=9D=97=E5=86=85=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=B0=BA=E5=AF=B8=E9=80=82=E5=BA=94=E5=8C=BA=E5=9F=9F=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E3=80=82=E8=BF=99=E9=87=8C=E8=A6=81=E4=B8=8D=E8=A6=81?= =?UTF-8?q?=E7=BB=9F=E4=B8=80=E4=B8=80=E4=B8=8B=E6=95=88=E6=9E=9C=E5=95=8A?= =?UTF-8?q?@kerry?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/fit/common/AdaptiveSwitchUtil.java | 28 ++++++++++++++++--- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/fit/common/AdaptiveSwitchUtil.java b/designer-form/src/main/java/com/fr/design/fit/common/AdaptiveSwitchUtil.java index 7b6984dad..8c55e8ab0 100644 --- a/designer-form/src/main/java/com/fr/design/fit/common/AdaptiveSwitchUtil.java +++ b/designer-form/src/main/java/com/fr/design/fit/common/AdaptiveSwitchUtil.java @@ -1,7 +1,5 @@ package com.fr.design.fit.common; -import com.fr.decision.ExtraDecisionClassManager; -import com.fr.decision.fun.EmailSendProvider; import com.fr.design.data.DesignTableDataManager; import com.fr.design.fit.DesignerUIModeConfig; import com.fr.design.fit.NewJForm; @@ -13,7 +11,6 @@ import com.fr.design.fit.attrpane.RootDesignExtendDefinePane; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.JForm; import com.fr.design.mainframe.JTemplate; -import com.fr.design.mainframe.JTemplateFactory; import com.fr.design.parameter.RootDesignDefinePane; import com.fr.design.preview.FormAdaptivePreview; import com.fr.design.preview.FormPreview; @@ -25,8 +22,8 @@ import com.fr.design.widget.ui.designer.layout.FRAbsoluteLayoutDefinePane; import com.fr.design.widget.ui.designer.layout.FRFitLayoutDefinePane; import com.fr.file.FILE; import com.fr.file.MemFILE; -import com.fr.form.fit.NewFormMarkAttr; import com.fr.form.main.Form; +import com.fr.form.main.WidgetGather; import com.fr.form.ui.ElementCaseEditor; import com.fr.form.ui.Widget; import com.fr.form.ui.container.WAbsoluteBodyLayout; @@ -152,11 +149,34 @@ public class AdaptiveSwitchUtil { if (DesignerUIModeConfig.getInstance().newUIMode() && jForm.getTarget().getReportFitAttr() != null && isSwitchJFromIng()) { jForm.getTarget().setReportFitAttr(shiftReportFitAttr(old, jForm.getTarget().getReportFitAttr().isFitFont())); } + processAbsoluteLayoutCompatible(jForm.getTarget()); TemplateTool.saveForm(jForm); } return template; } + + private static void processAbsoluteLayoutCompatible(Form form){ + Form.traversalWidget(form.getContainer(), new WidgetGather() { + @Override + public void dealWith(Widget widget) { + if (widget.acceptType(WAbsoluteBodyLayout.class)) { + return; + } + WAbsoluteLayout absoluteLayout = (WAbsoluteLayout) widget; + //切换到新模板后,内部的绝对画布块都要设置成适应缩放的逻辑 + absoluteLayout.setCompState(0); + } + + @Override + public boolean dealWithAllCards() { + return true; + } + }, WAbsoluteLayout.class); + } + + + /** * @Description: 创建模板核心方法 * @param old 以前的方法