燕鹏
3 years ago
5 changed files with 145 additions and 20 deletions
@ -0,0 +1,76 @@ |
|||
/******************************************************************************* |
|||
* Copyright 2017 Bstek |
|||
* |
|||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not |
|||
* use this file except in compliance with the License. You may obtain a copy |
|||
* of the License at |
|||
* |
|||
* http://www.apache.org/licenses/LICENSE-2.0
|
|||
* |
|||
* Unless required by applicable law or agreed to in writing, software |
|||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
|||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
|||
* License for the specific language governing permissions and limitations under |
|||
* the License. |
|||
******************************************************************************/ |
|||
package com.bstek.ureport.console.html; |
|||
|
|||
import com.bstek.ureport.build.Context; |
|||
import com.bstek.ureport.build.ReportBuilder; |
|||
import com.bstek.ureport.build.paging.Page; |
|||
import com.bstek.ureport.cache.CacheUtils; |
|||
import com.bstek.ureport.chart.ChartData; |
|||
import com.bstek.ureport.console.MobileUtils; |
|||
import com.bstek.ureport.console.RenderPageServletAction; |
|||
import com.bstek.ureport.console.cache.TempObjectCache; |
|||
import com.bstek.ureport.console.exception.ReportDesignException; |
|||
import com.bstek.ureport.definition.Paper; |
|||
import com.bstek.ureport.definition.ReportDefinition; |
|||
import com.bstek.ureport.definition.searchform.FormPosition; |
|||
import com.bstek.ureport.exception.ReportComputeException; |
|||
import com.bstek.ureport.export.*; |
|||
import com.bstek.ureport.export.html.HtmlProducer; |
|||
import com.bstek.ureport.export.html.HtmlReport; |
|||
import com.bstek.ureport.export.html.SearchFormData; |
|||
import com.bstek.ureport.model.Report; |
|||
import org.apache.commons.lang.StringUtils; |
|||
import org.apache.velocity.Template; |
|||
import org.apache.velocity.VelocityContext; |
|||
import org.codehaus.jackson.map.ObjectMapper; |
|||
|
|||
import javax.servlet.ServletException; |
|||
import javax.servlet.http.HttpServletRequest; |
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.io.IOException; |
|||
import java.io.PrintWriter; |
|||
import java.io.StringWriter; |
|||
import java.util.*; |
|||
|
|||
/** |
|||
* @author Jacky.gao |
|||
* @since 2017年2月15日 |
|||
*/ |
|||
public class TipServletAction extends RenderPageServletAction { |
|||
|
|||
@Override |
|||
public void execute(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { |
|||
String method=retriveMethod(req); |
|||
if(method!=null){ |
|||
invokeMethod(method, req, resp); |
|||
}else{ |
|||
VelocityContext context = new VelocityContext(); |
|||
context.put("contextPath", req.getContextPath()); |
|||
resp.setContentType("text/html"); |
|||
resp.setCharacterEncoding("utf-8"); |
|||
Template template=ve.getTemplate("ureport-html/ietip.html","utf-8"); |
|||
PrintWriter writer=resp.getWriter(); |
|||
template.merge(context, writer); |
|||
writer.close(); |
|||
} |
|||
} |
|||
|
|||
@Override |
|||
public String url() { |
|||
return "/ietip"; |
|||
} |
|||
} |
@ -1,29 +1,41 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="UTF-8"> |
|||
<link href="${contextPath}/ureport/res/ureport-asserts/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> |
|||
<link href="${contextPath}/ureport/res/ureport-asserts/css/handsontable.min.css" rel="stylesheet" type="text/css" /> |
|||
<title>UReport2 Designer</title> |
|||
<script type="text/javascript" src="${contextPath}/ureport/res/ureport-asserts/venderjs/jquery.min.js"></script> |
|||
<script type="text/javascript" src="${contextPath}/ureport/res/ureport-asserts/venderjs/jquery.contextMenu.min.js"></script> |
|||
<script type="text/javascript" src="${contextPath}/ureport/res/ureport-asserts/venderjs/completer.min.js"></script> |
|||
<script type="text/javascript" src="${contextPath}/ureport/res/ureport-asserts/venderjs/bootstrap-colorpicker.min.js"></script> |
|||
<script type="text/javascript" src="${contextPath}/ureport/res/ureport-asserts/js/common.bundle.js"></script> |
|||
<style> |
|||
::-webkit-scrollbar { |
|||
width: 0px; |
|||
} |
|||
::-webkit-scrollbar-thumb { |
|||
background: #0001; |
|||
} |
|||
</style> |
|||
<meta charset="UTF-8"> |
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
|||
<link href="${contextPath}/ureport/res/ureport-asserts/css/bootstrap.min.css" rel="stylesheet" type="text/css"/> |
|||
<link href="${contextPath}/ureport/res/ureport-asserts/css/handsontable.min.css" rel="stylesheet" type="text/css"/> |
|||
<title>UReport2 Designer</title> |
|||
<script type="text/javascript" src="${contextPath}/ureport/res/ureport-asserts/venderjs/jquery.min.js"></script> |
|||
<script type="text/javascript" |
|||
src="${contextPath}/ureport/res/ureport-asserts/venderjs/jquery.contextMenu.min.js"></script> |
|||
<script type="text/javascript" src="${contextPath}/ureport/res/ureport-asserts/venderjs/completer.min.js"></script> |
|||
<script type="text/javascript" |
|||
src="${contextPath}/ureport/res/ureport-asserts/venderjs/bootstrap-colorpicker.min.js"></script> |
|||
<script type="text/javascript" src="${contextPath}/ureport/res/ureport-asserts/js/common.bundle.js"></script> |
|||
<style> |
|||
::-webkit-scrollbar { |
|||
width: 0px; |
|||
} |
|||
|
|||
::-webkit-scrollbar-thumb { |
|||
background: #0001; |
|||
} |
|||
</style> |
|||
<script> |
|||
var userAgent = navigator.userAgent; // 取得浏览器的userAgent字符串 |
|||
console.log(userAgent) |
|||
var isTrident = navigator.userAgent.indexOf('Trident') > -1 // 是否是IE内核 |
|||
if(isTrident){ |
|||
window.location.href = "/ureport/ietip" |
|||
} |
|||
</script> |
|||
</head> |
|||
<body style="margin:0px"> |
|||
<div id='container'></div> |
|||
<script type="text/javascript"> |
|||
window._server="${contextPath}/ureport"; |
|||
window._contextPath="${contextPath}"; |
|||
window._server = "${contextPath}/ureport"; |
|||
window._contextPath = "${contextPath}"; |
|||
</script> |
|||
<script type="text/javascript" src="${contextPath}/ureport/res/ureport-asserts/js/designer.bundle.js"></script> |
|||
</body> |
|||
|
@ -0,0 +1,28 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<head> |
|||
<meta charset="UTF-8"> |
|||
<style> |
|||
html, body, #container{ |
|||
width: 100%; |
|||
height: 100%; |
|||
} |
|||
|
|||
#ietip{ |
|||
color: red; |
|||
font-size: 16px; |
|||
text-align: center; |
|||
margin-top: 25%; |
|||
} |
|||
</style> |
|||
</head> |
|||
<body style="margin:0px"> |
|||
<div id='container'> |
|||
<p id="ietip">辣鸡IE我们不支持,请使用其他的浏览器访问,谢谢!</p> |
|||
</div> |
|||
<script type="text/javascript"> |
|||
window._server = "${contextPath}/ureport"; |
|||
window._contextPath = "${contextPath}"; |
|||
</script> |
|||
</body> |
|||
</html> |
Loading…
Reference in new issue