From 3aa890d45098decb54898c0ec19f17379ab62ab3 Mon Sep 17 00:00:00 2001 From: hades Date: Fri, 26 Feb 2021 10:37:35 +0800 Subject: [PATCH] =?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 { // 说明模板没有保存在报表运行环境下面,提示用户