实时报表模块添加打印功能(暂时隐藏)12-28
This commit is contained in:
@@ -88,6 +88,9 @@
|
||||
<li><a class="btn export-btn" data-type="xlsx" id="export-btn"><i class="fa fa-download"> </i> excel </a><li>
|
||||
<li><a class="btn export-btn" data-type="csv" id="export-btn"><i class="fa fa-download"> </i> csv </a><li>
|
||||
</ul>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default css-print" onClick="doPrint()"><i class="fa glyphicon glyphicon-print" style="top:3px;margin-right: 3px;"></i><spring:message code="print"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
@@ -115,6 +118,7 @@
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/series-label.js"></script>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/no-data-to-display.js"></script>
|
||||
<script src="${ctxStatic }/pages/scripts/jQuery.print.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
@@ -185,6 +189,17 @@ function ajaxAppList(start,end){
|
||||
}
|
||||
});
|
||||
}
|
||||
//打印列表
|
||||
function doPrint() {
|
||||
getPageData(1,999999);// 设置打印条数
|
||||
$("#contentTable").print({
|
||||
globalStyles: true,
|
||||
iframe: true,
|
||||
append: null
|
||||
});
|
||||
getPageData(1,10);
|
||||
pageJuan(10);//初始化分页
|
||||
}
|
||||
// 导出列表
|
||||
$(".export-btn").click(function(){
|
||||
var nowDate=new Date();
|
||||
|
||||
@@ -65,6 +65,9 @@
|
||||
<li><a class="btn export-btn" data-type="xlsx" id="export-btn"><i class="fa fa-download"> </i> excel </a><li>
|
||||
<li><a class="btn export-btn" data-type="csv" id="export-btn"><i class="fa fa-download"> </i> csv </a><li>
|
||||
</ul>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default css-print" onClick="doPrint()"><i class="fa glyphicon glyphicon-print" style="top:3px;margin-right: 3px;"></i><spring:message code="print"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
@@ -91,6 +94,7 @@
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting.js"></script>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/series-label.js"></script>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
|
||||
<script src="${ctxStatic }/pages/scripts/jQuery.print.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
loading();
|
||||
@@ -163,6 +167,17 @@ function ajaxProtocolList(start,end){
|
||||
}
|
||||
});
|
||||
}
|
||||
//打印列表
|
||||
function doPrint() {
|
||||
getPageData(1,999999);// 设置打印条数
|
||||
$("#contentTable").print({
|
||||
globalStyles: true,
|
||||
iframe: true,
|
||||
append: null
|
||||
});
|
||||
getPageData(1,10);
|
||||
pageJuan(10);//初始化分页
|
||||
}
|
||||
// 导出列表
|
||||
$(".export-btn").click(function(){
|
||||
var dataType = $(this).attr("data-type");
|
||||
|
||||
@@ -70,6 +70,9 @@
|
||||
<li><a class="btn export-btn" data-type="xlsx" id="export-btn"><i class="fa fa-download"> </i> excel </a><li>
|
||||
<li><a class="btn export-btn" data-type="csv" id="export-btn"><i class="fa fa-download"> </i> csv </a><li>
|
||||
</ul>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default css-print" onClick="doPrint()"><i class="fa glyphicon glyphicon-print" style="top:3px;margin-right: 3px;"></i><spring:message code="print"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
@@ -110,6 +113,7 @@
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/exporting-data.js"></script>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/standalone.js"></script>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/no-data-to-display.js"></script>
|
||||
<script src="${ctxStatic }/pages/scripts/jQuery.print.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
@@ -131,7 +135,14 @@ $(document).ready(function(){
|
||||
$("#searchForm")[0].reset();
|
||||
});
|
||||
});
|
||||
|
||||
//打印列表
|
||||
function doPrint() {
|
||||
$("#contentTable").print({
|
||||
globalStyles: true,
|
||||
iframe: true,
|
||||
append: null
|
||||
});
|
||||
}
|
||||
//导出列表
|
||||
$(".export-btn").click(function(){
|
||||
var dataType = $(this).attr("data-type");
|
||||
|
||||
@@ -78,6 +78,9 @@
|
||||
<li><a class="btn export-btn" data-type="xlsx" id="export-btn"><i class="fa fa-download"> </i> excel </a><li>
|
||||
<li><a class="btn export-btn" data-type="csv" id="export-btn"><i class="fa fa-download"> </i> csv </a><li>
|
||||
</ul>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default css-print" onClick="doPrint()"><i class="fa glyphicon glyphicon-print" style="top:3px;margin-right: 3px;"></i><spring:message code="print"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<br>
|
||||
@@ -105,6 +108,7 @@
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/series-label.js"></script>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/no-data-to-display.js"></script>
|
||||
<script src="${ctxStatic }/pages/scripts/jQuery.print.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
@@ -179,6 +183,17 @@ function ajaxProtocolList(start,end){
|
||||
}
|
||||
});
|
||||
}
|
||||
//打印列表
|
||||
function doPrint() {
|
||||
getPageData(1,999999);// 设置打印条数
|
||||
$("#contentTable").print({
|
||||
globalStyles: true,
|
||||
iframe: true,
|
||||
append: null
|
||||
});
|
||||
getPageData(1,10);
|
||||
pageJuan(10);//初始化分页
|
||||
}
|
||||
// 导出列表
|
||||
$(".export-btn").click(function(){
|
||||
var nowDate=new Date();
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<link rel="stylesheet" href="${pageContext.request.contextPath}/static/global/css/layout.css" type="text/css" media="screen">
|
||||
<script type="text/javascript" src="${pageContext.request.contextPath}/static/global/plugins/jquery-ui/jquery-ui.min.js"></script>
|
||||
|
||||
<script src="${ctxStatic }/pages/scripts/jQuery.print.js"></script>
|
||||
<title><spring:message code="traffic_user_behavior"></spring:message></title>
|
||||
<style>
|
||||
td:hover{
|
||||
@@ -164,7 +164,22 @@
|
||||
var modifyTime=new Date(chooseDate);
|
||||
$('#searchFoundEndTime').val(modifyTime.getFullYear()+"-"+((modifyTime.getMonth()+1)>=10?(modifyTime.getMonth()+1):"0"+(modifyTime.getMonth()+1))+"-"+(modifyTime.getDate()>=10?modifyTime.getDate():'0'+modifyTime.getDate())+' '+(modifyTime.getHours()>=10?modifyTime.getHours():'0'+modifyTime.getHours())+':'+(modifyTime.getMinutes()>=10?modifyTime.getMinutes():'0'+modifyTime.getMinutes())+':'+(modifyTime.getSeconds()>=10?modifyTime.getSeconds():'0'+modifyTime.getSeconds()));
|
||||
}
|
||||
|
||||
//打印列表
|
||||
function doPrint() {
|
||||
if($('.httpResCfg').is(':hidden')){
|
||||
$(".httpReqCfg").print({
|
||||
globalStyles: true,
|
||||
iframe: true,
|
||||
append: null
|
||||
});
|
||||
}else{
|
||||
$(".httpResCfg").print({
|
||||
globalStyles: true,
|
||||
iframe: true,
|
||||
append: null
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -268,7 +283,9 @@
|
||||
maxRow="10000" label="csv"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default css-print" onClick="doPrint()"><i class="fa glyphicon glyphicon-print" style="top:3px;margin-right: 3px;"></i><spring:message code="print"/></button>
|
||||
</div>
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top"
|
||||
data-original-title=<spring:message code="custom_columns"/>
|
||||
|
||||
@@ -128,6 +128,9 @@
|
||||
<li><a class="btn export-btn" data-type="xlsx" id="export-btn"><i class="fa fa-download"> </i> excel </a><li>
|
||||
<li><a class="btn export-btn" data-type="csv" id="export-btn"><i class="fa fa-download"> </i> csv </a><li>
|
||||
</ul>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default css-print" onClick="doPrint()"><i class="fa glyphicon glyphicon-print" style="top:3px;margin-right: 3px;"></i><spring:message code="print"/></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -167,6 +170,7 @@
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/series-label.js"></script>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/offline-exporting.js"></script>
|
||||
<script src="${pageContext.request.contextPath}/static/global/plugins/highcharts/js/no-data-to-display.js"></script>
|
||||
<script src="${ctxStatic }/pages/scripts/jQuery.print.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
@@ -247,6 +251,17 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
//打印列表
|
||||
function doPrint() {
|
||||
getPageData(1,999999);// 设置打印条数
|
||||
$("#contentTable").print({
|
||||
globalStyles: true,
|
||||
iframe: true,
|
||||
append: null
|
||||
});
|
||||
getPageData(1,10);
|
||||
pageJuan(10);//初始化分页
|
||||
}
|
||||
// 导出列表
|
||||
$(".export-btn").click(function(){
|
||||
var nowDate=new Date();
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
<script src="${ctxStatic }/global/plugins/tableExport-3.3.13/xlsx.core.js"></script>
|
||||
<script src="${ctxStatic }/global/plugins/tableExport-3.3.13/FileSaver.js"></script>
|
||||
<script src="${ctxStatic }/global/plugins/tableExport-3.3.13/tableexport.js"></script>
|
||||
<script src="${ctxStatic }/pages/scripts/jQuery.print.js"></script>
|
||||
<meta name="format-detection" content="telephone=no,email=no,address=no">
|
||||
<style type="text/css">
|
||||
.statisticsRequest{
|
||||
@@ -178,7 +179,76 @@
|
||||
var currentdate = year+""+ month+""+strDate+""+ hours+""+ minutes+""+seconds;
|
||||
return currentdate;
|
||||
}
|
||||
|
||||
//来函和业务配置统计打印
|
||||
function cfgMenuPrint(){
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
cache:false,
|
||||
url:'${ctx}/configure/statistics/configureStateStatisticsPrint',//
|
||||
dataType:"json",
|
||||
success:function(data){
|
||||
if(data !=null){
|
||||
var menu=data.menuList;
|
||||
var dataList=data.requestStatisticList;
|
||||
|
||||
var userTableStr='';
|
||||
userTableStr +='<table class="table table-striped table-bordered table-condensed text-nowrap logTb">';
|
||||
userTableStr += '<thead>';
|
||||
userTableStr += '<tr>';
|
||||
userTableStr += '<th class="sort-column"><spring:message code="letter"/></th>';
|
||||
for (var i = 0; i < menu.length; i++) {
|
||||
if (menu[i].functionId == 8) {
|
||||
userTableStr += '<th class="sort-column">HTTP '+menu[i].code+'</th>';
|
||||
} else if(menu[i].functionId == 35){
|
||||
userTableStr += '<th class="sort-column">MAIL '+menu[i].code+'</th>';
|
||||
}else {
|
||||
userTableStr += '<th class="sort-column">'+menu[i].code+'</th>';
|
||||
}
|
||||
}
|
||||
userTableStr += '</tr>';
|
||||
userTableStr += '</thead>';
|
||||
userTableStr += '<tbody>';
|
||||
for(var j=0;j<dataList.length;j++){
|
||||
userTableStr += '<tr>';
|
||||
userTableStr += '<td>';
|
||||
userTableStr += dataList[j].request;
|
||||
userTableStr += '</td>';
|
||||
for (var k = 0; k < menu.length; k++) {
|
||||
userTableStr += '<td>';
|
||||
var sss=menu[k].functionId+'_'+menu[k].functionId;
|
||||
userTableStr += dataList[j][sss];
|
||||
userTableStr += '</td>';
|
||||
}
|
||||
userTableStr += '<tr>';
|
||||
}
|
||||
userTableStr +='</tbody>';
|
||||
userTableStr +='</table>';
|
||||
$("#contentPrintTable").html(userTableStr);
|
||||
}
|
||||
}
|
||||
});
|
||||
$("#contentPrintTable").css('display','block');
|
||||
$("#contentPrintTable").print({
|
||||
globalStyles: true,
|
||||
iframe: true,
|
||||
append: null
|
||||
});
|
||||
$("#contentPrintTable").css('display','none');
|
||||
/* $(".cfgMenuTable").print({
|
||||
globalStyles: true,
|
||||
iframe: true,
|
||||
append: null
|
||||
}); */
|
||||
}
|
||||
//配置业务和状态统计打印
|
||||
function statisticsPrint() {
|
||||
$(".statisticsStatusTable").print({
|
||||
globalStyles: true,
|
||||
iframe: true,
|
||||
append: null
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<title>index</title>
|
||||
@@ -206,6 +276,10 @@
|
||||
<li><a href="javascript:;" class="export-btn" data-export-type="csv" data-export-table="cfgMenuTable"><i class="fa fa-download"> <spring:message code="CSV"/></i></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default css-print" onClick="cfgMenuPrint()" style="margin-top: -5px;">
|
||||
<i class="fa glyphicon glyphicon-print" style="top:3px;margin-right: 3px;"></i><spring:message code="print"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<h5 class="page-header"></h5>
|
||||
<div class="tableDiv">
|
||||
@@ -251,6 +325,7 @@
|
||||
</div>
|
||||
</form>
|
||||
<div class="page">${page}</div>
|
||||
<div id="contentPrintTable" style="display: none;"></div>
|
||||
</div>
|
||||
<div id="statisticsStatus" class="statisticsStatus">
|
||||
<font size="4">
|
||||
@@ -269,6 +344,10 @@
|
||||
<li><a href="javascript:;" class="export-btn" data-export-type="csv" data-export-table="statisticsStatusTable"><i class="fa fa-download"> <spring:message code="CSV"/></i></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default css-print" onClick="statisticsPrint()" style="margin-top: -5px;">
|
||||
<i class="fa glyphicon glyphicon-print" style="top:3px;margin-right: 3px;"></i><spring:message code="print"/></button>
|
||||
</div>
|
||||
</div>
|
||||
<h5 class="page-header"></h5>
|
||||
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap statisticsStatusTable" name="statisticsStatusTable">
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<script src="${ctxStatic }/pages/scripts/jQuery.print.js"></script>
|
||||
<title>
|
||||
<spring:message code="asn_conn_report"/>
|
||||
</title>
|
||||
@@ -51,7 +52,59 @@
|
||||
var modifyTime=new Date(chooseDate);
|
||||
$('#searchFoundEndTime').val(modifyTime.getFullYear()+"-"+((modifyTime.getMonth()+1)>=10?(modifyTime.getMonth()+1):"0"+(modifyTime.getMonth()+1))+"-"+(modifyTime.getDate()>=10?modifyTime.getDate():'0'+modifyTime.getDate())+' '+(modifyTime.getHours()>=10?modifyTime.getHours():'0'+modifyTime.getHours())+':'+(modifyTime.getMinutes()>=10?modifyTime.getMinutes():'0'+modifyTime.getMinutes())+':'+(modifyTime.getSeconds()>=10?modifyTime.getSeconds():'0'+modifyTime.getSeconds()));
|
||||
}
|
||||
|
||||
//打印列表
|
||||
function doPrint() {
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
cache:false,
|
||||
url:'${ctx}/report/asnPrint',//
|
||||
data:{
|
||||
"searchAsnType":$('[name="searchAsnType"]').val(),
|
||||
"asn":$('[name="asn"]').val(),
|
||||
"searchFoundStartTime":$('[name="searchFoundStartTime"]').val(),
|
||||
"searchFoundEndTime":$('[name="searchFoundEndTime"]').val()
|
||||
},
|
||||
dataType:"json",
|
||||
success:function(data){
|
||||
if(data !=null){
|
||||
var userTableStr='';
|
||||
userTableStr +='<table class="table table-striped table-bordered table-condensed text-nowrap logTb">';
|
||||
userTableStr += '<thead>';
|
||||
userTableStr += '<tr>';
|
||||
userTableStr += '<th class="sort-column s_asn"><spring:message code="asn"/></th>';
|
||||
userTableStr += '<th class="sort-column pps"><spring:message code="pps"/></th>';
|
||||
userTableStr += '<th class="sort-column bps"><spring:message code="bps"/></th>';
|
||||
userTableStr += '</tr>';
|
||||
userTableStr += '</thead>';
|
||||
userTableStr += '<tbody>';
|
||||
for(var j=0;j<data.length;j++){
|
||||
userTableStr += '<tr>';
|
||||
userTableStr += '<td>';
|
||||
userTableStr += data[j].asn;
|
||||
userTableStr += '</td>';
|
||||
userTableStr += '<td>';
|
||||
userTableStr += data[j].pps;
|
||||
userTableStr += '</td>';
|
||||
userTableStr += '<td>';
|
||||
userTableStr += data[j].bps;
|
||||
userTableStr += '</td>';
|
||||
userTableStr += '<tr>';
|
||||
}
|
||||
userTableStr +='</tbody>';
|
||||
userTableStr +='</table>';
|
||||
$("#contentPrintTable").html(userTableStr);
|
||||
}
|
||||
}
|
||||
});
|
||||
$("#contentPrintTable").css('display','block');
|
||||
$("#contentPrintTable").print({
|
||||
globalStyles: true,
|
||||
iframe: true,
|
||||
append: null
|
||||
});
|
||||
$("#contentPrintTable").css('display','none');
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -129,6 +182,9 @@
|
||||
<li><sys:delRow url="${ctx}/report/asnExport?type=csv" searchUrl="${ctx}/report/asnConnList" id="contentTable" maxRow="10000" label="csv"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default css-print" onClick="doPrint()"><i class="fa glyphicon glyphicon-print" style="top:3px;margin-right: 3px;"></i><spring:message code="print"/></button>
|
||||
</div>
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
@@ -170,6 +226,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
<div id="contentPrintTable" style="display: none;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<script src="${ctxStatic }/pages/scripts/jQuery.print.js"></script>
|
||||
<title>
|
||||
<spring:message code="ntc_event_block_report"/>
|
||||
</title>
|
||||
@@ -73,6 +74,75 @@
|
||||
$('.selectpicker').selectpicker('render');
|
||||
}
|
||||
};
|
||||
|
||||
//打印列表
|
||||
function doPrint() {
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
cache:false,
|
||||
url:'${ctx}/eventBlock/eventBlockPrint',//
|
||||
data:{
|
||||
"taskIds":$("#taskIdArray").val(),
|
||||
"searchTaskStartTime":$('[name="searchTaskStartTime"]').val(),
|
||||
"searchTaskEndTime":$('[name="searchTaskEndTime"]').val(),
|
||||
"searchReportStartTime":$('[name="searchReportStartTime"]').val(),
|
||||
"searchReportEndTime":$('[name="searchReportEndTime"]').val()
|
||||
},
|
||||
dataType:"json",
|
||||
success:function(data){
|
||||
if(data !=null){
|
||||
var userTableStr='';
|
||||
userTableStr +='<table class="table table-striped table-bordered table-condensed text-nowrap logTb">';
|
||||
userTableStr += '<thead>';
|
||||
userTableStr += '<tr>';
|
||||
userTableStr += '<th class="sort-column"><spring:message code="task_id"/></th>';
|
||||
userTableStr += '<th class="sort-column"><spring:message code="task_name"/></th>';
|
||||
userTableStr += '<th class="sort-column"><spring:message code="ip_count"/></th>';
|
||||
userTableStr += '<th class="sort-column"><spring:message code="http_num"/></th>';
|
||||
userTableStr += '<th class="sort-column"><spring:message code="mail_num"/></th>';
|
||||
userTableStr += '<th class="sort-column"><spring:message code="vedio_count"/></th>';
|
||||
userTableStr += '<th class="sort-column"><spring:message code="agent_count"/></th>';
|
||||
userTableStr += '<th class="sort-column"><spring:message code="task_time"/></th>';
|
||||
userTableStr += '<th class="sort-column"><spring:message code="stat_time"/></th>';
|
||||
userTableStr += '</tr>';
|
||||
userTableStr += '</thead>';
|
||||
userTableStr += '<tbody>';
|
||||
for(var j=0;j<data.length;j++){
|
||||
userTableStr += '<tr><td>';
|
||||
userTableStr += data[j].taskIds;
|
||||
userTableStr += '</td><td>';
|
||||
userTableStr += data[j].taskName;
|
||||
userTableStr += '</td><td>';
|
||||
userTableStr += data[j].ipNum;
|
||||
userTableStr += '</td><td>';
|
||||
userTableStr += data[j].httpNum;
|
||||
userTableStr += '</td><td>';
|
||||
userTableStr += data[j].mailNum;
|
||||
userTableStr += '</td><td>';
|
||||
userTableStr += data[j].vedioNum;
|
||||
userTableStr += '</td><td>';
|
||||
userTableStr += data[j].agentNum;
|
||||
userTableStr += '</td><td>';
|
||||
userTableStr += data[j].taskTime;
|
||||
userTableStr += '</td><td>';
|
||||
userTableStr += data[j].reportTime;
|
||||
userTableStr += '</td><tr>';
|
||||
}
|
||||
userTableStr +='</tbody>';
|
||||
userTableStr +='</table>';
|
||||
$("#contentPrintTable").html(userTableStr);
|
||||
}
|
||||
}
|
||||
});
|
||||
$("#contentPrintTable").css('display','block');
|
||||
$("#contentPrintTable").print({
|
||||
globalStyles: true,
|
||||
iframe: true,
|
||||
append: null
|
||||
});
|
||||
$("#contentPrintTable").css('display','none');
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -126,6 +196,9 @@
|
||||
<li><sys:delRow url="${ctx}/eventBlock/eventBlockExport?type=csv" searchUrl="${ctx}/eventBlock/eventBlockList" id="contentTable" maxRow="10000" label="csv"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default css-print" onClick="doPrint()"><i class="fa glyphicon glyphicon-print" style="top:3px;margin-right: 3px;"></i><spring:message code="print"/></button>
|
||||
</div>
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
@@ -232,6 +305,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
<div id="contentPrintTable" style="display: none;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<script src="${ctxStatic }/pages/scripts/jQuery.print.js"></script>
|
||||
<title>
|
||||
<spring:message code="ntc_event_key_protection_report"/>
|
||||
</title>
|
||||
@@ -74,6 +75,72 @@
|
||||
$('.selectpicker').selectpicker('render');
|
||||
}
|
||||
};
|
||||
|
||||
//打印列表
|
||||
function doPrint() {
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
cache:false,
|
||||
url:'${ctx}/eventKeyProtection/eventKeyProtectionPrint',//
|
||||
data:{
|
||||
"taskIds":$("#taskIdArray").val(),
|
||||
"searchTaskStartTime":$('[name="searchTaskStartTime"]').val(),
|
||||
"searchTaskEndTime":$('[name="searchTaskEndTime"]').val(),
|
||||
"searchReportStartTime":$('[name="searchReportStartTime"]').val(),
|
||||
"searchReportEndTime":$('[name="searchReportEndTime"]').val()
|
||||
},
|
||||
dataType:"json",
|
||||
success:function(data){
|
||||
if(data !=null){
|
||||
var userTableStr='';
|
||||
userTableStr +='<table class="table table-striped table-bordered table-condensed text-nowrap logTb">';
|
||||
userTableStr += '<thead>';
|
||||
userTableStr += '<tr>';
|
||||
userTableStr += '<th class="sort-column"><spring:message code="task_id"/></th>';
|
||||
userTableStr += '<th class="sort-column"><spring:message code="task_name"/></th>';
|
||||
userTableStr += '<th class="sort-column"><spring:message code="letter_num"/></th>';
|
||||
userTableStr += '<th class="sort-column"><spring:message code="config_num"/></th>';
|
||||
userTableStr += '<th class="sort-column"><spring:message code="monitor_num"/></th>';
|
||||
userTableStr += '<th class="sort-column"><spring:message code="control_num"/></th>';
|
||||
userTableStr += '<th class="sort-column"><spring:message code="task_time"/></th>';
|
||||
userTableStr += '<th class="sort-column"><spring:message code="stat_time"/></th>';
|
||||
userTableStr += '</tr>';
|
||||
userTableStr += '</thead>';
|
||||
userTableStr += '<tbody>';
|
||||
for(var j=0;j<data.length;j++){
|
||||
userTableStr += '<tr><td>';
|
||||
userTableStr += data[j].taskIds;
|
||||
userTableStr += '</td><td>';
|
||||
userTableStr += data[j].taskName;
|
||||
userTableStr += '</td><td>';
|
||||
userTableStr += data[j].letterNum;
|
||||
userTableStr += '</td><td>';
|
||||
userTableStr += data[j].configNum;
|
||||
userTableStr += '</td><td>';
|
||||
userTableStr += data[j].monitorNum;
|
||||
userTableStr += '</td><td>';
|
||||
userTableStr += data[j].controlNum;
|
||||
userTableStr += '</td><td>';
|
||||
userTableStr += data[j].taskTime;
|
||||
userTableStr += '</td><td>';
|
||||
userTableStr += data[j].reportTime;
|
||||
userTableStr += '</td><tr>';
|
||||
}
|
||||
userTableStr +='</tbody>';
|
||||
userTableStr +='</table>';
|
||||
$("#contentPrintTable").html(userTableStr);
|
||||
}
|
||||
}
|
||||
});
|
||||
$("#contentPrintTable").css('display','block');
|
||||
$("#contentPrintTable").print({
|
||||
globalStyles: true,
|
||||
iframe: true,
|
||||
append: null
|
||||
});
|
||||
$("#contentPrintTable").css('display','none');
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -127,6 +194,9 @@
|
||||
<li><sys:delRow url="${ctx}/eventKeyProtection/eventKeyProtectionExport?type=csv" searchUrl="${ctx}/eventKeyProtection/eventKeyProtectionList" id="contentTable" maxRow="10000" label="csv"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default css-print" onClick="doPrint()"><i class="fa glyphicon glyphicon-print" style="top:3px;margin-right: 3px;"></i><spring:message code="print"/></button>
|
||||
</div>
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
@@ -230,6 +300,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
<div id="contentPrintTable" style="display: none;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<script src="${ctxStatic }/pages/scripts/jQuery.print.js"></script>
|
||||
<title>
|
||||
<spring:message code="ntc_event_monitor_report"/>
|
||||
</title>
|
||||
@@ -83,6 +84,74 @@
|
||||
}
|
||||
};
|
||||
|
||||
//打印列表
|
||||
function doPrint() {
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
cache:false,
|
||||
url:'${ctx}/eventMonitor/eventMonitorPrint',//
|
||||
data:{
|
||||
"taskIds":$("#taskIdArray").val(),
|
||||
"searchTaskStartTime":$('[name="searchTaskStartTime"]').val(),
|
||||
"searchTaskEndTime":$('[name="searchTaskEndTime"]').val(),
|
||||
"searchReportStartTime":$('[name="searchReportStartTime"]').val(),
|
||||
"searchReportEndTime":$('[name="searchReportEndTime"]').val()
|
||||
},
|
||||
dataType:"json",
|
||||
success:function(data){
|
||||
if(data !=null){
|
||||
var userTableStr='';
|
||||
userTableStr +='<table class="table table-striped table-bordered table-condensed text-nowrap logTb">';
|
||||
userTableStr += '<thead>';
|
||||
userTableStr += '<tr>';
|
||||
userTableStr += '<th class="sort-column"><spring:message code="task_id"/></th>';
|
||||
userTableStr += '<th class="sort-column"><spring:message code="task_name"/></th>';
|
||||
userTableStr += '<th class="sort-column"><spring:message code="ip_count"/></th>';
|
||||
userTableStr += '<th class="sort-column"><spring:message code="http_num"/></th>';
|
||||
userTableStr += '<th class="sort-column"><spring:message code="mail_num"/></th>';
|
||||
userTableStr += '<th class="sort-column"><spring:message code="vedio_count"/></th>';
|
||||
userTableStr += '<th class="sort-column"><spring:message code="agent_count"/></th>';
|
||||
userTableStr += '<th class="sort-column"><spring:message code="task_time"/></th>';
|
||||
userTableStr += '<th class="sort-column"><spring:message code="stat_time"/></th>';
|
||||
userTableStr += '</tr>';
|
||||
userTableStr += '</thead>';
|
||||
userTableStr += '<tbody>';
|
||||
for(var j=0;j<data.length;j++){
|
||||
userTableStr += '<tr><td>';
|
||||
userTableStr += data[j].taskIds;
|
||||
userTableStr += '</td><td>';
|
||||
userTableStr += data[j].taskName;
|
||||
userTableStr += '</td><td>';
|
||||
userTableStr += data[j].ipNum;
|
||||
userTableStr += '</td><td>';
|
||||
userTableStr += data[j].httpNum;
|
||||
userTableStr += '</td><td>';
|
||||
userTableStr += data[j].mailNum;
|
||||
userTableStr += '</td><td>';
|
||||
userTableStr += data[j].vedioNum;
|
||||
userTableStr += '</td><td>';
|
||||
userTableStr += data[j].agentNum;
|
||||
userTableStr += '</td><td>';
|
||||
userTableStr += data[j].taskTime;
|
||||
userTableStr += '</td><td>';
|
||||
userTableStr += data[j].reportTime;
|
||||
userTableStr += '</td><tr>';
|
||||
}
|
||||
userTableStr +='</tbody>';
|
||||
userTableStr +='</table>';
|
||||
$("#contentPrintTable").html(userTableStr);
|
||||
}
|
||||
}
|
||||
});
|
||||
$("#contentPrintTable").css('display','block');
|
||||
$("#contentPrintTable").print({
|
||||
globalStyles: true,
|
||||
iframe: true,
|
||||
append: null
|
||||
});
|
||||
$("#contentPrintTable").css('display','none');
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -136,6 +205,9 @@
|
||||
<li><sys:delRow url="${ctx}/eventMonitor/eventMonitorExport?type=csv" searchUrl="${ctx}/eventMonitor/eventMonitorList" id="contentTable" maxRow="10000" label="csv"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default css-print" onClick="doPrint()"><i class="fa glyphicon glyphicon-print" style="top:3px;margin-right: 3px;"></i><spring:message code="print"/></button>
|
||||
</div>
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
@@ -242,6 +314,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
<div id="contentPrintTable" style="display: none;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<script src="${ctxStatic }/pages/scripts/jQuery.print.js"></script>
|
||||
<title>
|
||||
<spring:message code="ip_range_report"/>
|
||||
</title>
|
||||
@@ -34,7 +35,67 @@
|
||||
// });
|
||||
// ajaxConnPercent();
|
||||
});
|
||||
|
||||
//打印列表
|
||||
function doPrint() {
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
cache:false,
|
||||
url:'${ctx}/report/ipRangePrint',//
|
||||
data:{
|
||||
"seType":$('[name="searchAreaType1"]').val(),
|
||||
"searchAreaType":$('[name="searchAreaType"]').val(),
|
||||
"searchCountry":$('[name="searchCountry"]').val(),
|
||||
"searchIp":$('[name="searchIp"]').val()
|
||||
},
|
||||
dataType:"json",
|
||||
success:function(data){
|
||||
if(data !=null){
|
||||
var userTableStr='';
|
||||
userTableStr +='<table class="table table-striped table-bordered table-condensed text-nowrap">';
|
||||
userTableStr += '<thead>';
|
||||
userTableStr += '<tr>';
|
||||
userTableStr += '<th class="sort-column"><spring:message code="ip_start"/></td>';
|
||||
userTableStr += '<th class="sort-column"><spring:message code="ip_end"/></td>';
|
||||
userTableStr += '<th class="sort-column"><spring:message code="ip_sub"/></td>';
|
||||
userTableStr += '<th class="sort-column"><spring:message code="country"/></td>';
|
||||
userTableStr += '<th class="sort-column"><spring:message code="desc"/></td>';
|
||||
userTableStr += '</tr>';
|
||||
userTableStr += '</thead>';
|
||||
userTableStr += '<tbody>';
|
||||
for(var j=0;j<data.length;j++){
|
||||
userTableStr += '<tr>';
|
||||
userTableStr += '<td>';
|
||||
userTableStr += data[j].ipStart;
|
||||
userTableStr += '</td>';
|
||||
userTableStr += '<td>';
|
||||
userTableStr += data[j].ipEnd;
|
||||
userTableStr += '</td>';
|
||||
userTableStr += '<td>';
|
||||
userTableStr += data[j].ipSub;
|
||||
userTableStr += '</td>';
|
||||
userTableStr += '<td>';
|
||||
userTableStr += data[j].country;
|
||||
userTableStr += '</td>';
|
||||
userTableStr += '<td>';
|
||||
userTableStr += data[j].desc;
|
||||
userTableStr += '</td>';
|
||||
userTableStr += '<tr>';
|
||||
}
|
||||
userTableStr +='</tbody>';
|
||||
userTableStr +='</table>';
|
||||
$("#contentPrintTable").html(userTableStr);
|
||||
}
|
||||
}
|
||||
});
|
||||
$("#contentPrintTable").css('display','block');
|
||||
$("#contentPrintTable").print({
|
||||
globalStyles: true,
|
||||
iframe: true,
|
||||
append: null
|
||||
});
|
||||
$("#contentPrintTable").css('display','none');
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -52,7 +113,7 @@
|
||||
<form:form id="searchForm" modelAttribute="log" action="${ctx}/report/ipRangeList" method="post" class="form-search">
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
|
||||
<input id="searchAreaType1" name="searchAreaType1" type="hidden" value="${log.searchAreaType}"/>
|
||||
<div class="col-md-12">
|
||||
<div class="pull-left">
|
||||
<div class="input-group">
|
||||
@@ -106,7 +167,9 @@
|
||||
<li><sys:delRow url="${ctx}/report/ipRangeExport?type=csv&seType=${log.searchAreaType}" searchUrl="${ctx}/report/ipRangeList" id="contentTable" maxRow="10000" label="csv"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default css-print" onClick="doPrint()"><i class="fa glyphicon glyphicon-print" style="top:3px;margin-right: 3px;"></i><spring:message code="print"/></button>
|
||||
</div>
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
@@ -151,6 +214,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
<div id="contentPrintTable" style="display: none;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
<script src="${ctxStatic }/global/plugins/tableExport-3.3.13/xlsx.core.js"></script>
|
||||
<script src="${ctxStatic }/global/plugins/tableExport-3.3.13/FileSaver.js"></script>
|
||||
<script src="${ctxStatic }/global/plugins/tableExport-3.3.13/tableexport.js"></script>
|
||||
<script src="${ctxStatic }/pages/scripts/jQuery.print.js"></script>
|
||||
<title><spring:message code="${bean.cfgName}"></spring:message></title>
|
||||
<%@ include file="/WEB-INF/include/form/pageGroup.jsp"%>
|
||||
<script>
|
||||
@@ -412,6 +413,32 @@ function customColumnClick(){
|
||||
var lipx=Number(li/6);
|
||||
$(".lireport").css({'width':lipx+'px','text-overflow':'ellipsis','overflow':'hidden'});
|
||||
}
|
||||
//打印
|
||||
function doPrint() {
|
||||
var reportBusinessType=$("#reportBusinessType").val()
|
||||
var tableId="tagTable";
|
||||
if(reportBusinessType=="label_report"){
|
||||
tableId="tagTable";
|
||||
}else if(reportBusinessType=="lwhh_report"){
|
||||
tableId="lwhhTable";
|
||||
}else if(reportBusinessType=="src_ip_report"){
|
||||
tableId="contentTable1";
|
||||
}else if(reportBusinessType=="attr_type_report"){
|
||||
tableId="attrTypeTable";
|
||||
}else if(reportBusinessType=="dest_ip_report"){
|
||||
tableId="destIpTable";
|
||||
}else if(reportBusinessType=="isp_report"){
|
||||
tableId="entranceIdTable";
|
||||
}
|
||||
|
||||
$("#"+tableId+" tbody tr").removeAttr("style");
|
||||
$("#"+tableId).print({
|
||||
globalStyles: true,
|
||||
iframe: true,
|
||||
append: null
|
||||
});
|
||||
pagination();
|
||||
}
|
||||
</script>
|
||||
<style type="text/css">
|
||||
li{
|
||||
@@ -529,6 +556,9 @@ white-space:nowrap;
|
||||
<li><a href="javascript:;" class="export-btn" data-export-type="csv"><i class="fa fa-download"> <spring:message code="CSV"/></i></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default css-print" onClick="doPrint()"><i class="fa glyphicon glyphicon-print" style="top:3px;margin-right: 3px;"></i><spring:message code="print"/></button>
|
||||
</div>
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<script src="${ctxStatic }/pages/scripts/jQuery.print.js"></script>
|
||||
<title>
|
||||
<spring:message code="https_url_report"/>
|
||||
</title>
|
||||
@@ -25,10 +26,10 @@
|
||||
// $(this).find("th").eq(0).width=300;
|
||||
if(index > 0 ){
|
||||
var title=$(this).find("td").eq(0).attr("title");
|
||||
console.log(title);
|
||||
// console.log(title);
|
||||
if(title != undefined && title != null){
|
||||
if(title.length > 80){
|
||||
$(this).find("td").eq(0).text(title.substring(0,80));
|
||||
$(this).find("td").eq(0).text(title.substring(0,80)+"...");
|
||||
}else{
|
||||
$(this).find("td").eq(0).text(title);
|
||||
}
|
||||
@@ -56,6 +57,58 @@
|
||||
var modifyTime=new Date(chooseDate);
|
||||
$('#searchReportEndTime').val(modifyTime.getFullYear()+"-"+((modifyTime.getMonth()+1)>=10?(modifyTime.getMonth()+1):"0"+(modifyTime.getMonth()+1))+"-"+(modifyTime.getDate()>=10?modifyTime.getDate():'0'+modifyTime.getDate())+' '+(modifyTime.getHours()>=10?modifyTime.getHours():'0'+modifyTime.getHours())+':'+(modifyTime.getMinutes()>=10?modifyTime.getMinutes():'0'+modifyTime.getMinutes())+':'+(modifyTime.getSeconds()>=10?modifyTime.getSeconds():'0'+modifyTime.getSeconds()));
|
||||
}
|
||||
//打印列表
|
||||
function doPrint() {
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
cache:false,
|
||||
url:'${ctx}/report/httpsPrint',//
|
||||
data:{
|
||||
"searchUrl":$('[name="searchUrl"]').val(),
|
||||
"searchReportStartTime":$('[name="searchReportStartTime"]').val(),
|
||||
"searchReportEndTime":$('[name="searchReportEndTime"]').val()
|
||||
},
|
||||
dataType:"json",
|
||||
success:function(data){
|
||||
if(data !=null){
|
||||
var userTableStr='';
|
||||
userTableStr +='<table style="word-wrap:break-word; word-break:break-all;" class="table table-striped table-bordered table-condensed ">';
|
||||
userTableStr += '<thead>';
|
||||
userTableStr += '<tr>';
|
||||
userTableStr += '<th class="sort-column "><spring:message code="url"/></td>';
|
||||
userTableStr += '<th class="sort-column "><spring:message code="ip_count"/></td>';
|
||||
userTableStr += '<th class="sort-column "><spring:message code="counnection_count"/></td>';
|
||||
userTableStr += '</tr>';
|
||||
userTableStr += '</thead>';
|
||||
userTableStr += '<tbody>';
|
||||
for(var j=0;j<data.length;j++){
|
||||
userTableStr += '<tr>';
|
||||
userTableStr += '<td style="width:700px;">';
|
||||
userTableStr += data[j].url;
|
||||
userTableStr += '</td>';
|
||||
userTableStr += '<td>';
|
||||
userTableStr += data[j].ipCount;
|
||||
userTableStr += '</td>';
|
||||
userTableStr += '<td>';
|
||||
userTableStr += data[j].connCount;
|
||||
userTableStr += '</td>';
|
||||
userTableStr += '<tr>';
|
||||
}
|
||||
userTableStr +='</tbody>';
|
||||
userTableStr +='</table>';
|
||||
$("#contentPrintTable").html(userTableStr);
|
||||
}
|
||||
}
|
||||
});
|
||||
$("#contentPrintTable").css('display','block');
|
||||
$("#contentPrintTable").print({
|
||||
globalStyles: true,
|
||||
iframe: true,
|
||||
append: null
|
||||
});
|
||||
$("#contentPrintTable").css('display','none');
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -80,7 +133,7 @@
|
||||
<div class="input-group-btn">
|
||||
<span class="selectpicker form-control" ><spring:message code="url"/></span>
|
||||
</div>
|
||||
<input name="searchUrl" type="text" class="form-control input-medium" maxlength="20" value="${log.searchUrl }" />
|
||||
<input name="searchUrl" type="text" class="form-control input-small" maxlength="20" value="${log.searchUrl }" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="pull-left">
|
||||
@@ -126,6 +179,9 @@
|
||||
<li><sys:delRow url="${ctx}/report/httpsExport?type=csv" searchUrl="${ctx}/report/httpsUrlList" id="contentTable" maxRow="10000" label="csv"></sys:delRow></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default css-print" onClick="doPrint()"><i class="fa glyphicon glyphicon-print" style="top:3px;margin-right: 3px;"></i><spring:message code="print"/></button>
|
||||
</div>
|
||||
<a class="btn btn-icon-only btn-default setfields tooltips"
|
||||
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
|
||||
<i class="icon-wrench"></i>
|
||||
@@ -169,6 +225,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="page">${page}</div>
|
||||
<div id="contentPrintTable" style="display: none;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -89,4 +89,9 @@ margin-top: 20px;
|
||||
word-break: break-all;
|
||||
word-wrap: break-word;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
/* <20><><EFBFBD><EFBFBD>ʵʱ<CAB5><CAB1><EFBFBD><EFBFBD>ģ<EFBFBD><C4A3>,<2C><>ӡ<EFBFBD><D3A1>ť<EFBFBD><C5A5><EFBFBD><EFBFBD>ʾ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
||||
.css-print{
|
||||
display: none;
|
||||
}
|
||||
279
src/main/webapp/static/pages/scripts/jQuery.print.js
Normal file
279
src/main/webapp/static/pages/scripts/jQuery.print.js
Normal file
@@ -0,0 +1,279 @@
|
||||
/* @license
|
||||
* jQuery.print, version 1.6.0
|
||||
* (c) Sathvik Ponangi, Doers' Guild
|
||||
* Licence: CC-By (http://creativecommons.org/licenses/by/3.0/)
|
||||
*--------------------------------------------------------------------------*/
|
||||
(function ($) {
|
||||
"use strict";
|
||||
// A nice closure for our definitions
|
||||
|
||||
function jQueryCloneWithSelectAndTextAreaValues(elmToClone, withDataAndEvents, deepWithDataAndEvents) {
|
||||
// Replacement jQuery clone that also clones the values in selects and textareas as jQuery doesn't for performance reasons - https://stackoverflow.com/questions/742810/clone-isnt-cloning-select-values
|
||||
// Based on https://github.com/spencertipping/jquery.fix.clone
|
||||
var $elmToClone = $(elmToClone),
|
||||
$result = $elmToClone.clone(withDataAndEvents, deepWithDataAndEvents),
|
||||
$myTextareas = $elmToClone.find('textarea').add($elmToClone.filter('textarea')),
|
||||
$resultTextareas = $result.find('textarea').add($result.filter('textarea')),
|
||||
$mySelects = $elmToClone.find('select').add($elmToClone.filter('select')),
|
||||
$resultSelects = $result.find('select').add($result.filter('select')),
|
||||
i, l, j, m;
|
||||
|
||||
for (i = 0, l = $myTextareas.length; i < l; ++i) {
|
||||
$($resultTextareas[i]).val($($myTextareas[i]).val());
|
||||
}
|
||||
for (i = 0, l = $mySelects.length; i < l; ++i) {
|
||||
for (j = 0, m = $mySelects[i].options.length; j < m; ++j) {
|
||||
if ($mySelects[i].options[j].selected === true) {
|
||||
$resultSelects[i].options[j].selected = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
function getjQueryObject(string) {
|
||||
// Make string a vaild jQuery thing
|
||||
var jqObj = $("");
|
||||
try {
|
||||
jqObj = jQueryCloneWithSelectAndTextAreaValues(string);
|
||||
} catch (e) {
|
||||
jqObj = $("<span />")
|
||||
.html(string);
|
||||
}
|
||||
return jqObj;
|
||||
}
|
||||
|
||||
function printFrame(frameWindow, content, options) {
|
||||
// Print the selected window/iframe
|
||||
var def = $.Deferred();
|
||||
try {
|
||||
frameWindow = frameWindow.contentWindow || frameWindow.contentDocument || frameWindow;
|
||||
var wdoc = frameWindow.document || frameWindow.contentDocument || frameWindow;
|
||||
if(options.doctype) {
|
||||
wdoc.write(options.doctype);
|
||||
}
|
||||
wdoc.write(content);
|
||||
wdoc.close();
|
||||
var printed = false,
|
||||
callPrint = function () {
|
||||
if(printed) {
|
||||
return;
|
||||
}
|
||||
// Fix for IE : Allow it to render the iframe
|
||||
frameWindow.focus();
|
||||
try {
|
||||
// Fix for IE11 - printng the whole page instead of the iframe content
|
||||
if (!frameWindow.document.execCommand('print', false, null)) {
|
||||
// document.execCommand returns false if it failed -http://stackoverflow.com/a/21336448/937891
|
||||
frameWindow.print();
|
||||
}
|
||||
// focus body as it is losing focus in iPad and content not getting printed
|
||||
$('body').focus();
|
||||
} catch (e) {
|
||||
frameWindow.print();
|
||||
}
|
||||
frameWindow.close();
|
||||
printed = true;
|
||||
def.resolve();
|
||||
};
|
||||
// Print once the frame window loads - seems to work for the new-window option but unreliable for the iframe
|
||||
$(frameWindow).on("load", callPrint);
|
||||
// Fallback to printing directly if the frame doesn't fire the load event for whatever reason
|
||||
setTimeout(callPrint, options.timeout);
|
||||
} catch (err) {
|
||||
def.reject(err);
|
||||
}
|
||||
return def;
|
||||
}
|
||||
|
||||
function printContentInIFrame(content, options) {
|
||||
var $iframe = $(options.iframe + "");
|
||||
var iframeCount = $iframe.length;
|
||||
if (iframeCount === 0) {
|
||||
// Create a new iFrame if none is given
|
||||
$iframe = $('<iframe height="0" width="0" border="0" wmode="Opaque"/>')
|
||||
.prependTo('body')
|
||||
.css({
|
||||
"position": "absolute",
|
||||
"top": -999,
|
||||
"left": -999
|
||||
});
|
||||
}
|
||||
var frameWindow = $iframe.get(0);
|
||||
return printFrame(frameWindow, content, options)
|
||||
.done(function () {
|
||||
// Success
|
||||
setTimeout(function () {
|
||||
// Wait for IE
|
||||
if (iframeCount === 0) {
|
||||
// Destroy the iframe if created here
|
||||
$iframe.remove();
|
||||
}
|
||||
}, 1000);
|
||||
})
|
||||
.fail(function (err) {
|
||||
// Use the pop-up method if iframe fails for some reason
|
||||
console.error("Failed to print from iframe", err);
|
||||
printContentInNewWindow(content, options);
|
||||
})
|
||||
.always(function () {
|
||||
try {
|
||||
options.deferred.resolve();
|
||||
} catch (err) {
|
||||
console.warn('Error notifying deferred', err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function printContentInNewWindow(content, options) {
|
||||
// Open a new window and print selected content
|
||||
var frameWindow = window.open();
|
||||
return printFrame(frameWindow, content, options)
|
||||
.always(function () {
|
||||
try {
|
||||
options.deferred.resolve();
|
||||
} catch (err) {
|
||||
console.warn('Error notifying deferred', err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function isNode(o) {
|
||||
/* http://stackoverflow.com/a/384380/937891 */
|
||||
return !!(typeof Node === "object" ? o instanceof Node : o && typeof o === "object" && typeof o.nodeType === "number" && typeof o.nodeName === "string");
|
||||
}
|
||||
$.print = $.fn.print = function () {
|
||||
// Print a given set of elements
|
||||
var options, $this, self = this;
|
||||
// console.log("Printing", this, arguments);
|
||||
if (self instanceof $) {
|
||||
// Get the node if it is a jQuery object
|
||||
self = self.get(0);
|
||||
}
|
||||
if (isNode(self)) {
|
||||
// If `this` is a HTML element, i.e. for
|
||||
// $(selector).print()
|
||||
$this = $(self);
|
||||
if (arguments.length > 0) {
|
||||
options = arguments[0];
|
||||
}
|
||||
} else {
|
||||
if (arguments.length > 0) {
|
||||
// $.print(selector,options)
|
||||
$this = $(arguments[0]);
|
||||
if (isNode($this[0])) {
|
||||
if (arguments.length > 1) {
|
||||
options = arguments[1];
|
||||
}
|
||||
} else {
|
||||
// $.print(options)
|
||||
options = arguments[0];
|
||||
$this = $("html");
|
||||
}
|
||||
} else {
|
||||
// $.print()
|
||||
$this = $("html");
|
||||
}
|
||||
}
|
||||
// Default options
|
||||
var defaults = {
|
||||
globalStyles: true,
|
||||
mediaPrint: false,
|
||||
stylesheet: null,
|
||||
noPrintSelector: ".no-print",
|
||||
iframe: true,
|
||||
append: null,
|
||||
prepend: null,
|
||||
manuallyCopyFormValues: true,
|
||||
deferred: $.Deferred(),
|
||||
timeout: 750,
|
||||
title: null,
|
||||
doctype: '<!doctype html>'
|
||||
};
|
||||
// Merge with user-options
|
||||
options = $.extend({}, defaults, (options || {}));
|
||||
var $styles = $("");
|
||||
if (options.globalStyles) {
|
||||
// Apply the stlyes from the current sheet to the printed page
|
||||
$styles = $("style, link, meta, base, title");
|
||||
} else if (options.mediaPrint) {
|
||||
// Apply the media-print stylesheet
|
||||
$styles = $("link[media=print]");
|
||||
}
|
||||
if (options.stylesheet) {
|
||||
// Add a custom stylesheet if given
|
||||
$styles = $.merge($styles, $('<link rel="stylesheet" href="' + options.stylesheet + '">'));
|
||||
}
|
||||
// Create a copy of the element to print
|
||||
var copy = jQueryCloneWithSelectAndTextAreaValues($this);
|
||||
// Wrap it in a span to get the HTML markup string
|
||||
copy = $("<span/>")
|
||||
.append(copy);
|
||||
// Remove unwanted elements
|
||||
copy.find(options.noPrintSelector)
|
||||
.remove();
|
||||
// Add in the styles
|
||||
copy.append(jQueryCloneWithSelectAndTextAreaValues($styles));
|
||||
// Update title
|
||||
if (options.title) {
|
||||
var title = $("title", copy);
|
||||
if (title.length === 0) {
|
||||
title = $("<title />");
|
||||
copy.append(title);
|
||||
}
|
||||
title.text(options.title);
|
||||
}
|
||||
// Appedned content
|
||||
copy.append(getjQueryObject(options.append));
|
||||
// Prepended content
|
||||
copy.prepend(getjQueryObject(options.prepend));
|
||||
if (options.manuallyCopyFormValues) {
|
||||
// Manually copy form values into the HTML for printing user-modified input fields
|
||||
// http://stackoverflow.com/a/26707753
|
||||
copy.find("input")
|
||||
.each(function () {
|
||||
var $field = $(this);
|
||||
if ($field.is("[type='radio']") || $field.is("[type='checkbox']")) {
|
||||
if ($field.prop("checked")) {
|
||||
$field.attr("checked", "checked");
|
||||
}
|
||||
} else {
|
||||
$field.attr("value", $field.val());
|
||||
}
|
||||
});
|
||||
copy.find("select").each(function () {
|
||||
var $field = $(this);
|
||||
$field.find(":selected").attr("selected", "selected");
|
||||
});
|
||||
copy.find("textarea").each(function () {
|
||||
// Fix for https://github.com/DoersGuild/jQuery.print/issues/18#issuecomment-96451589
|
||||
var $field = $(this);
|
||||
$field.text($field.val());
|
||||
});
|
||||
}
|
||||
// Get the HTML markup string
|
||||
var content = copy.html();
|
||||
// Notify with generated markup & cloned elements - useful for logging, etc
|
||||
try {
|
||||
options.deferred.notify('generated_markup', content, copy);
|
||||
} catch (err) {
|
||||
console.warn('Error notifying deferred', err);
|
||||
}
|
||||
// Destroy the copy
|
||||
copy.remove();
|
||||
if (options.iframe) {
|
||||
// Use an iframe for printing
|
||||
try {
|
||||
printContentInIFrame(content, options);
|
||||
} catch (e) {
|
||||
// Use the pop-up method if iframe fails for some reason
|
||||
console.error("Failed to print from iframe", e.stack, e.message);
|
||||
printContentInNewWindow(content, options);
|
||||
}
|
||||
} else {
|
||||
// Use a new window for printing
|
||||
printContentInNewWindow(content, options);
|
||||
}
|
||||
return this;
|
||||
};
|
||||
})(jQuery);
|
||||
Reference in New Issue
Block a user