From bf9b0880d38b98ce4c7d06328e91a0fa27774dd9 Mon Sep 17 00:00:00 2001 From: "Qinghui.Liu" Date: Thu, 25 Feb 2021 10:20:47 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20=E8=A7=A3?= =?UTF-8?q?=E5=86=B3=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../submit/SmartInsertDBManipulationPane.java | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java b/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java index d306bb1793..3fe1268793 100644 --- a/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java +++ b/designer-realize/src/main/java/com/fr/design/write/submit/SmartInsertDBManipulationPane.java @@ -310,9 +310,9 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane { // 单元格组要记录下之前的选中情况 private CellSelection oriCellSelection = null; - private List newAdd = new ArrayList(); + private List newAdd = new ArrayList<>(); - private List oldAdd = new ArrayList(); + private List oldAdd = new ArrayList<>(); public SmartJTablePane4DB(KeyColumnTableModel model, ElementCasePane actionReportPane) { this(model, actionReportPane, false); @@ -433,7 +433,8 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane { if (!allColumnRow.contains(columnRow.toString())) { add.addColumnRow(columnRow); } - + // 重新更换区域框选单元格后 清理历史框选 + oldAdd.clear(); } if (add.getSize() > 0) { @@ -459,10 +460,11 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane { TemplateCellElement cellElement = ePane.getEditingElementCase().getTemplateCellElement(c + i, r + j); if (cellElement != null && ((i + c) != 0 || (r + j) != 0)) { String value = cellElement.toString(); - if (!newAdd.contains(value) && !allColumnRow.contains(value)) { - add.addColumnRow(ColumnRow.valueOf(value)); + ColumnRow columnRow = ColumnRow.valueOf(value); + if (!newAdd.contains(columnRow) && !allColumnRow.contains(value)) { + add.addColumnRow(columnRow); } - newAdd.add(value); + newAdd.add(columnRow); } if (cellElement == null) { @@ -470,16 +472,14 @@ public class SmartInsertDBManipulationPane extends DBManipulationPane { if (!allColumnRow.contains(columnRow.toString())) { add.addColumnRow(columnRow); } - newAdd.add(columnRow.toString()); + newAdd.add(columnRow); } } } - int oldSize = oldAdd.size(); - int newSize = newAdd.size(); - if (oldSize > newSize && oldAdd.containsAll(newAdd)) { - int diff = oldSize - newSize; - newValue.splice(newValue.getSize() - diff, diff); - } + // 计算出前后两次选中的差值 + oldAdd.removeAll(newAdd); + // 移除差值部分 + newValue.removeAll(oldAdd); oldAdd.clear(); oldAdd.addAll(newAdd); } From e114ee0104819d9946a97144b7297e8e929f77ad Mon Sep 17 00:00:00 2001 From: Lanlan Date: Fri, 26 Feb 2021 09:34:11 +0800 Subject: [PATCH 2/4] =?UTF-8?q?REPORT-47885=20=E8=AE=BE=E8=AE=A1=E5=99=A8?= =?UTF-8?q?=E7=9A=84=E5=9F=8B=E7=82=B9=E5=9B=9E=E4=BC=A0=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=9B=9E=E4=BC=A0=E6=9C=AC=E5=9C=B0=E6=9C=8D=E5=8A=A1=E5=99=A8?= =?UTF-8?q?=E7=9A=84=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/messagecollect/solid/SolidCollector.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/messagecollect/solid/SolidCollector.java b/designer-realize/src/main/java/com/fr/design/mainframe/messagecollect/solid/SolidCollector.java index 974f75dd33..1a931df490 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/messagecollect/solid/SolidCollector.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/messagecollect/solid/SolidCollector.java @@ -40,9 +40,6 @@ public class SolidCollector { * 回传文件给云中心,并删除服务端本地文件 */ public void sendToCloudCenterAndDeleteFile() { - if (WorkContext.getCurrent().isLocal()) { - return; - } String url = CloudCenter.getInstance().acquireConf("design.solid", "https://cloud.fanruan.com/api/solid/upload"); if (StringUtils.isEmpty(url)) { FineLoggerFactory.getLogger().info("failed to get solid content upload url..."); From 3aa890d45098decb54898c0ec19f17379ab62ab3 Mon Sep 17 00:00:00 2001 From: hades Date: Fri, 26 Feb 2021 10:37:35 +0800 Subject: [PATCH 3/4] =?UTF-8?q?REPORT-48354=20=E3=80=9010.0.14=E4=BA=8C?= =?UTF-8?q?=E8=BD=AE=E5=86=92=E7=83=9F=E3=80=91=E6=9C=AC=E5=9C=B0=E6=89=93?= =?UTF-8?q?=E5=BC=80=E6=A8=A1=E6=9D=BF=EF=BC=8C=E5=88=87=E6=8D=A2=E5=88=B0?= =?UTF-8?q?=E8=BF=9C=E7=A8=8B=E7=8E=AF=E5=A2=83=EF=BC=8C=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E6=A8=A1=E6=9D=BF=E4=BF=9D=E5=AD=98=E6=88=90=E5=8A=9F=E5=90=8E?= =?UTF-8?q?=E6=9C=AA=E8=B7=B3=E5=88=B0=E9=A2=84=E8=A7=88=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/actions/file/WebPreviewUtils.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/actions/file/WebPreviewUtils.java b/designer-base/src/main/java/com/fr/design/actions/file/WebPreviewUtils.java index f3c5236b52..8d1e5828d7 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/WebPreviewUtils.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/WebPreviewUtils.java @@ -73,6 +73,22 @@ public final class WebPreviewUtils { FILE currentTemplate = jt.getEditingFILE(); // carl:是否是保存在运行环境下的模板,不是就不能被预览 if (currentTemplate instanceof FileNodeFILE) { + // 判断下模板是否存在 不存在先提示 + if (!currentTemplate.exists()) { + int selVal = showConfirmDialog( + DesignerContext.getDesignerFrame(), + Toolkit.i18nText("Fine-Design_Basic_Web_Preview_Message"), + Toolkit.i18nText("Fine-Design_Basic_Preview_Tool_Tips"), + OK_CANCEL_OPTION, + WARNING_MESSAGE + ); + if (OK_OPTION == selVal) { + if (!jt.saveAsTemplate()) { + return; + } + } + currentTemplate = jt.getEditingFILE(); + } browseUrl(currentTemplate, baseRoute, map, actionType, jt); } else { // 说明模板没有保存在报表运行环境下面,提示用户 From cff3586c102e855f9690ef5870bcd1f88f742557 Mon Sep 17 00:00:00 2001 From: shine Date: Fri, 26 Feb 2021 10:54:06 +0800 Subject: [PATCH 4/4] =?UTF-8?q?CHART-18181=20=E8=AE=BE=E7=BD=AE=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/design/ui/Assistant.java | 11 +++++++++++ .../main/java/com/fr/design/ui/ModernUIPane.java | 14 +++++++------- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/ui/Assistant.java b/designer-base/src/main/java/com/fr/design/ui/Assistant.java index 7e94306728..6a04cf358d 100644 --- a/designer-base/src/main/java/com/fr/design/ui/Assistant.java +++ b/designer-base/src/main/java/com/fr/design/ui/Assistant.java @@ -3,6 +3,7 @@ package com.fr.design.ui; import com.fr.stable.StringUtils; import com.teamdev.jxbrowser.chromium.Browser; import com.teamdev.jxbrowser.chromium.BrowserContext; +import com.teamdev.jxbrowser.chromium.BrowserPreferences; import com.teamdev.jxbrowser.chromium.ProtocolService; import com.teamdev.jxbrowser.chromium.URLResponse; @@ -12,6 +13,8 @@ import java.io.IOException; import java.io.InputStream; import java.nio.file.Files; import java.nio.file.Path; +import java.util.Collections; +import java.util.List; /** * @author richie @@ -20,6 +23,14 @@ import java.nio.file.Path; */ public class Assistant { + public static void addChromiumSwitches(String... switches) { + + List list = BrowserPreferences.getChromiumSwitches(); + Collections.addAll(list, switches); + + BrowserPreferences.setChromiumSwitches((list.toArray(new String[0]))); + } + public static URLResponse inputStream2Response(InputStream inputStream, String filePath) throws Exception { URLResponse response = new URLResponse(); DataInputStream stream = new DataInputStream(inputStream); diff --git a/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java b/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java index 4a92d3715c..745c56ea70 100644 --- a/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java +++ b/designer-base/src/main/java/com/fr/design/ui/ModernUIPane.java @@ -8,18 +8,18 @@ import com.fr.design.i18n.Toolkit; import com.fr.design.utils.gui.GUICoreUtils; import com.fr.web.struct.AssembleComponent; import com.teamdev.jxbrowser.chromium.Browser; -import com.teamdev.jxbrowser.chromium.BrowserPreferences; import com.teamdev.jxbrowser.chromium.JSValue; -import com.teamdev.jxbrowser.chromium.events.FinishLoadingEvent; -import com.teamdev.jxbrowser.chromium.events.LoadAdapter; import com.teamdev.jxbrowser.chromium.events.LoadListener; import com.teamdev.jxbrowser.chromium.events.ScriptContextAdapter; import com.teamdev.jxbrowser.chromium.events.ScriptContextEvent; import com.teamdev.jxbrowser.chromium.events.ScriptContextListener; import com.teamdev.jxbrowser.chromium.swing.BrowserView; -import javax.swing.*; -import java.awt.*; +import javax.swing.JDialog; +import javax.swing.SwingUtilities; +import javax.swing.WindowConstants; +import java.awt.BorderLayout; +import java.awt.Dimension; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.Map; @@ -44,7 +44,7 @@ public class ModernUIPane extends BasicPane { private void initialize() { if (browser == null) { setLayout(new BorderLayout()); - BrowserPreferences.setChromiumSwitches("--disable-google-traffic"); + Assistant.addChromiumSwitches("--disable-google-traffic"); if (DesignerEnvManager.getEnvManager().isOpenDebug()) { UIToolbar toolbar = new UIToolbar(); add(toolbar, BorderLayout.NORTH); @@ -75,7 +75,7 @@ public class ModernUIPane extends BasicPane { SwingUtilities.getWindowAncestor(ModernUIPane.this).setVisible(false); } }); - BrowserPreferences.setChromiumSwitches("--remote-debugging-port=9222"); + Assistant.addChromiumSwitches("--remote-debugging-port=9222"); initializeBrowser(); add(new BrowserView(browser), BorderLayout.CENTER); } else {