diff --git a/src/main/java/com/nis/web/controller/report/NtcEventBlockController.java b/src/main/java/com/nis/web/controller/report/NtcEventBlockController.java
index 70990a7df..fed932e83 100644
--- a/src/main/java/com/nis/web/controller/report/NtcEventBlockController.java
+++ b/src/main/java/com/nis/web/controller/report/NtcEventBlockController.java
@@ -395,7 +395,32 @@ public class NtcEventBlockController extends BaseController {
list = data.getList();
}
}
-
+ //计算合计,并添加在集合的最后位置
+ Properties msgProp = getMsgProp();
+ NtcEventMonitorOrBlockReport ntcEventMonitorOrBlockReport = new NtcEventMonitorOrBlockReport();
+ long ipNum = 0;
+ long httpNum = 0;
+ long mailNum = 0;
+ long vedioNum = 0;
+ long agentNum = 0;
+ for (NtcEventMonitorOrBlockReport entity : list) {
+ ipNum += entity.getIpNum();
+ httpNum += entity.getHttpNum();
+ mailNum += entity.getMailNum();
+ vedioNum += entity.getVedioNum();
+ agentNum += entity.getAgentNum();
+ }
+ String report_total = msgProp.getProperty("report_total");
+ ntcEventMonitorOrBlockReport.setIpNum(ipNum);
+ ntcEventMonitorOrBlockReport.setHttpNum(httpNum);
+ ntcEventMonitorOrBlockReport.setMailNum(mailNum);
+ ntcEventMonitorOrBlockReport.setVedioNum(vedioNum);
+ ntcEventMonitorOrBlockReport.setAgentNum(agentNum);
+ ntcEventMonitorOrBlockReport.setTaskIds(report_total);
+ ntcEventMonitorOrBlockReport.setTaskName(" 一 ");
+ ntcEventMonitorOrBlockReport.setTaskTime(" 一 ");
+ ntcEventMonitorOrBlockReport.setReportTime(" 一 ");
+ list.add(ntcEventMonitorOrBlockReport);
return list;
} catch (Exception e) {
logger.error("ntc_event_block_report print failed", e);
diff --git a/src/main/java/com/nis/web/controller/report/NtcEventKeyProtectionController.java b/src/main/java/com/nis/web/controller/report/NtcEventKeyProtectionController.java
index b770b667e..36ee299d3 100644
--- a/src/main/java/com/nis/web/controller/report/NtcEventKeyProtectionController.java
+++ b/src/main/java/com/nis/web/controller/report/NtcEventKeyProtectionController.java
@@ -386,6 +386,30 @@ public class NtcEventKeyProtectionController extends BaseController {
list = data.getList();
}
}
+ //计算合计,并填加到集合最后
+ Properties msgProp = getMsgProp();
+ NtcEventKeyProtectionReport ntcEventKey=new NtcEventKeyProtectionReport();
+ long letterNum=0;
+ long configNum=0;
+ long monitorNum=0;
+ long controlNum=0;
+ for (NtcEventKeyProtectionReport entity : list) {
+ letterNum += entity.getLetterNum();
+ configNum += entity.getConfigNum();
+ monitorNum += entity.getMonitorNum();
+ controlNum += entity.getControlNum();
+ }
+ String report_total=msgProp.getProperty("report_total");
+ ntcEventKey.setLetterNum(letterNum);
+ ntcEventKey.setConfigNum(configNum);
+ ntcEventKey.setMonitorNum(monitorNum);
+ ntcEventKey.setControlNum(controlNum);
+ ntcEventKey.setTaskIds(report_total);
+ ntcEventKey.setTaskName(" 一 ");
+ ntcEventKey.setTaskTime(" 一 ");
+ ntcEventKey.setReportTime(" 一 ");
+ list.add(ntcEventKey);
+
return list;
} catch (Exception e) {
logger.error("ntc_event_key_protection_report print failed", e);
diff --git a/src/main/java/com/nis/web/controller/report/NtcEventMonitorController.java b/src/main/java/com/nis/web/controller/report/NtcEventMonitorController.java
index 5f4d29f2e..591e315f7 100644
--- a/src/main/java/com/nis/web/controller/report/NtcEventMonitorController.java
+++ b/src/main/java/com/nis/web/controller/report/NtcEventMonitorController.java
@@ -393,6 +393,32 @@ public class NtcEventMonitorController extends BaseController {
list = data.getList();
}
}
+ //计算合计,并添加到集合的最后
+ Properties msgProp = getMsgProp();
+ NtcEventMonitorOrBlockReport ntcEventMonitorOrBlockReport = new NtcEventMonitorOrBlockReport();
+ long ipNum = 0;
+ long httpNum = 0;
+ long mailNum = 0;
+ long vedioNum = 0;
+ long agentNum = 0;
+ for (NtcEventMonitorOrBlockReport entity : list) {
+ ipNum += entity.getIpNum();
+ httpNum += entity.getHttpNum();
+ mailNum += entity.getMailNum();
+ vedioNum += entity.getVedioNum();
+ agentNum += entity.getAgentNum();
+ }
+ String report_total = msgProp.getProperty("report_total");
+ ntcEventMonitorOrBlockReport.setIpNum(ipNum);
+ ntcEventMonitorOrBlockReport.setHttpNum(httpNum);
+ ntcEventMonitorOrBlockReport.setMailNum(mailNum);
+ ntcEventMonitorOrBlockReport.setVedioNum(vedioNum);
+ ntcEventMonitorOrBlockReport.setAgentNum(agentNum);
+ ntcEventMonitorOrBlockReport.setTaskIds(report_total);
+ ntcEventMonitorOrBlockReport.setTaskName(" 一 ");
+ ntcEventMonitorOrBlockReport.setTaskTime(" 一 ");
+ ntcEventMonitorOrBlockReport.setReportTime(" 一 ");
+ list.add(ntcEventMonitorOrBlockReport);
return list;
} catch (Exception e) {
logger.error("ntc_event_monitor_report print failed", e);
diff --git a/src/main/java/com/nis/web/controller/report/ReportController.java b/src/main/java/com/nis/web/controller/report/ReportController.java
index b761321fa..df6f44659 100644
--- a/src/main/java/com/nis/web/controller/report/ReportController.java
+++ b/src/main/java/com/nis/web/controller/report/ReportController.java
@@ -613,6 +613,23 @@ public class ReportController extends BaseController {
list = data.getList();
}
}
+ Properties msgProp = getMsgProp();
+ NtcAsnRecord ntcAsnRecord = new NtcAsnRecord();
+ double pps = 0;
+ double bps = 0;
+ for (NtcAsnRecord entity : list) {
+ if (null != entity.getBps() && !"".equals(entity.getBps())) {
+ bps += Double.valueOf(entity.getBps());
+ }
+ if (null != entity.getPps() && !"".equals(entity.getPps())) {
+ pps += Double.valueOf(entity.getPps());
+ }
+ }
+ String report_total = msgProp.getProperty("report_total");
+ ntcAsnRecord.setAsn(report_total);
+ ntcAsnRecord.setBps(String.format("%.2f", bps));
+ ntcAsnRecord.setPps(String.format("%.2f", pps));
+ list.add(ntcAsnRecord);
return list;
} catch (Exception e) {
logger.error("Ntc_Asn_Record print failed", e);
@@ -664,6 +681,19 @@ public class ReportController extends BaseController {
list = data.getList();
}
}
+ Properties msgProp = getMsgProp();
+ NtcURLReport ntcURLReport = new NtcURLReport();
+ long ipCount=0;
+ long connCount=0;
+ for (NtcURLReport entity : list) {
+ ipCount += entity.getIpCount();
+ connCount += entity.getConnCount();
+ }
+ String report_total = msgProp.getProperty("report_total");
+ ntcURLReport.setIpCount(ipCount);
+ ntcURLReport.setConnCount(connCount);
+ ntcURLReport.setUrl(report_total);
+ list.add(ntcURLReport);
return list;
} catch (Exception e) {
logger.error("Ntc_HTTPS_Report print failed", e);
diff --git a/src/main/webapp/WEB-INF/tags/sys/delRow.tag b/src/main/webapp/WEB-INF/tags/sys/delRow.tag
index 4338e2c3c..6fc9eff80 100644
--- a/src/main/webapp/WEB-INF/tags/sys/delRow.tag
+++ b/src/main/webapp/WEB-INF/tags/sys/delRow.tag
@@ -415,6 +415,10 @@ function cancelPassOpt(url){
url+="&"+$("#exportType").val()+"="+$("#exportValue").val();
}
}
+ if(column.toString()!="" && column.toString() ==""){
+ top.$.jBox.tip("", "");
+ return;
+ }
if(column.toString()!=""){
url+="&columns="+column.toString();
}else{
diff --git a/src/main/webapp/WEB-INF/views/dashboard/trafficAppTypeList.jsp b/src/main/webapp/WEB-INF/views/dashboard/trafficAppTypeList.jsp
index c4953af32..dd4b361ec 100644
--- a/src/main/webapp/WEB-INF/views/dashboard/trafficAppTypeList.jsp
+++ b/src/main/webapp/WEB-INF/views/dashboard/trafficAppTypeList.jsp
@@ -212,11 +212,25 @@ function ajaxAppList(start,end,entranceId){
//打印列表
function doPrint() {
getPageData(1,999999);// 设置打印条数
+ //统计数据
+ var tb=document.getElementById("contentTable");
+ var rows=tb.rows;
+ $("#contentTable tbody tr").removeClass("hidden");
+ //为某一列或者 某一行 添加样式
+ addPrintTableCss(rows.length-1,0,"contentTable","print-title");
+
+ var title='
';
+ title+=':'+$("#beginDate").val();
+ title+=' ';
+ title+=':'+$("#endDate").val()+'
';
+ $('.tr-total').addClass("tc");
$("#contentTable").print({
globalStyles: true,
iframe: true,
- append: null
+ append: null,
+ prepend: title
});
+ $('.tr-total').addClass("hidden");
getPageData(1,10);
pageJuan(10);//初始化分页
}
@@ -343,6 +357,7 @@ function htmlData(fileDataS){
if(index==fileDataS.length-1){
html+=""
html+= "| "+""+" | ";
+ html+= "" +"--"+" | "
html+= ""+totalLink+" | ";
html+= "" +"100%"+" | ";
html+= ""+Math.round(totalPackets*100)/100+" | ";
diff --git a/src/main/webapp/WEB-INF/views/dashboard/trafficHttpStatisticList.jsp b/src/main/webapp/WEB-INF/views/dashboard/trafficHttpStatisticList.jsp
index 4cda0d06a..c2a569e15 100644
--- a/src/main/webapp/WEB-INF/views/dashboard/trafficHttpStatisticList.jsp
+++ b/src/main/webapp/WEB-INF/views/dashboard/trafficHttpStatisticList.jsp
@@ -173,11 +173,25 @@ function ajaxProtocolList(start,end){
//打印列表
function doPrint() {
getPageData(1,999999);// 设置打印条数
+ //统计数据
+ var tb=document.getElementById("contentTable");
+ var rows=tb.rows;
+ $("#contentTable tbody tr").removeClass("hidden");
+ //为某一列或者 某一行 添加样式
+ addPrintTableCss(rows.length-1,0,"contentTable","print-title");
+
+ var title='
';
+ title+=':'+$("#beginDate").val();
+ title+=' ';
+ title+=':'+$("#endDate").val()+'
';
+ $('.tr-total').addClass("tc");
$("#contentTable").print({
globalStyles: true,
iframe: true,
- append: null
+ append: null,
+ prepend: title
});
+ $('.tr-total').addClass("hidden");
getPageData(1,10);
pageJuan(10);//初始化分页
}
diff --git a/src/main/webapp/WEB-INF/views/dashboard/trafficIpActiveList.jsp b/src/main/webapp/WEB-INF/views/dashboard/trafficIpActiveList.jsp
index fe7090a1d..fa791acf9 100644
--- a/src/main/webapp/WEB-INF/views/dashboard/trafficIpActiveList.jsp
+++ b/src/main/webapp/WEB-INF/views/dashboard/trafficIpActiveList.jsp
@@ -150,11 +150,24 @@ $(document).ready(function(){
});
//打印列表
function doPrint() {
+ //统计数据
+ var tb=document.getElementById("contentTable");
+ var rows=tb.rows;
+ $("#contentTable tbody tr").removeClass("hidden");
+ //为某一列或者 某一行 添加样式
+ addPrintTableCss(rows.length-1,0,"contentTable","print-title");
+
+ var title='
';
+ title+=':'+$("#beginDate").val();
+ title+=' ';
+ title+=':'+$("#endDate").val()+'
';
$("#contentTable").print({
globalStyles: true,
iframe: true,
- append: null
- });
+ append: null,
+ prepend: title
+ });
+ $('.tr-total').addClass("hidden");
}
//导出列表
$(".export-btn").click(function(){
diff --git a/src/main/webapp/WEB-INF/views/dashboard/trafficProtocolTypeList.jsp b/src/main/webapp/WEB-INF/views/dashboard/trafficProtocolTypeList.jsp
index 72c1e5e4b..4311e068f 100644
--- a/src/main/webapp/WEB-INF/views/dashboard/trafficProtocolTypeList.jsp
+++ b/src/main/webapp/WEB-INF/views/dashboard/trafficProtocolTypeList.jsp
@@ -203,11 +203,25 @@ function ajaxProtocolList(start,end,entranceId){
//打印列表
function doPrint() {
getPageData(1,999999);// 设置打印条数
+ //统计数据
+ var tb=document.getElementById("contentTable");
+ var rows=tb.rows;
+ $("#contentTable tbody tr").removeClass("hidden");
+ //为某一列或者 某一行 添加样式
+ addPrintTableCss(rows.length-1,0,"contentTable","print-title");
+
+ var title='
';
+ title+=':'+$("#beginDate").val();
+ title+=' ';
+ title+=':'+$("#endDate").val()+'
';
+ $('.tr-total').addClass("tc");
$("#contentTable").print({
globalStyles: true,
iframe: true,
- append: null
+ append: null,
+ prepend: title
});
+ $('.tr-total').addClass("hidden");
getPageData(1,10);
pageJuan(10);//初始化分页
}
diff --git a/src/main/webapp/WEB-INF/views/dashboard/trafficWebTypeList.jsp b/src/main/webapp/WEB-INF/views/dashboard/trafficWebTypeList.jsp
index fb6bc5458..ffe66034f 100644
--- a/src/main/webapp/WEB-INF/views/dashboard/trafficWebTypeList.jsp
+++ b/src/main/webapp/WEB-INF/views/dashboard/trafficWebTypeList.jsp
@@ -144,7 +144,7 @@
|
|
- |
+ |
|
|
() |
@@ -255,11 +255,25 @@
//打印列表
function doPrint() {
getPageData(1,999999);// 设置打印条数
+ //统计数据
+ var tb=document.getElementById("contentTable");
+ var rows=tb.rows;
+ $("#contentTable tbody tr").removeClass("hidden");
+ //为某一列或者 某一行 添加样式
+ addPrintTableCss(rows.length-1,0,"contentTable","print-title");
+
+ var title='
';
+ title+=':'+$("#beginDate").val();
+ title+=' ';
+ title+=':'+$("#endDate").val()+'
';
+ $('.tr-total').addClass("tc");
$("#contentTable").print({
globalStyles: true,
iframe: true,
- append: null
+ append: null,
+ prepend: title
});
+ $('.tr-total').addClass("hidden");
getPageData(1,10);
pageJuan(10);//初始化分页
}
@@ -388,11 +402,12 @@
if(index==fileDataS.length-1){
html+="
"
html+= "| "+""+" | ";
+ html+= "" +"--"+" | "
html+= ""+totalunique+" | ";
html+= "" +"--"+" | ";
- html+= ""+totalPackets+" | ";
+ html+= ""+parseInt(totalPackets).toFixed(2)+" | ";
html+= ""+"100%"+" | ";
- html+= ""+totalGbyte+" | ";
+ html+= ""+parseInt(totalGbyte).toFixed(2)+" | ";
html+= ""+"100%"+" | ";
html+="
"
}
diff --git a/src/main/webapp/WEB-INF/views/index.jsp b/src/main/webapp/WEB-INF/views/index.jsp
index f68253b09..76208af97 100644
--- a/src/main/webapp/WEB-INF/views/index.jsp
+++ b/src/main/webapp/WEB-INF/views/index.jsp
@@ -193,7 +193,7 @@
var dataList=data.requestStatisticList;
var userTableStr='';
- userTableStr +='';
+ userTableStr +='';
userTableStr += '';
userTableStr += '';
userTableStr += ' | ';
@@ -217,7 +217,11 @@
for (var k = 0; k < menu.length; k++) {
userTableStr += '';
var sss=menu[k].functionId+'_'+menu[k].functionId;
- userTableStr += dataList[j][sss];
+ if(dataList[j][sss] !=undefined && dataList[j][sss] !=null &&dataList[j][sss] !=""){
+ userTableStr += dataList[j][sss];
+ }else{
+ userTableStr += "0";
+ }
userTableStr += ' | ';
}
userTableStr += '
';
@@ -228,26 +232,69 @@
}
}
});
+ //计算合计行
+ var tb=document.getElementById("printTable");
+ var rows = tb.rows;
+ var colums = tb.rows[0].cells.length;
+ var trtotal="";
+ trtotal+=" | ";
+ for(var j = 1; j < colums; j++){
+ var sum = 0;
+ for(var i = 1;i"+sum+"";
+ }
+ $('#total').remove();
+ $('#printTable tbody').append("
");
+ $('#total').html(trtotal);
+ //为某一列或者 某一行 添加样式
+ addPrintTableCss(rows.length-1,0,"printTable","print-title");
+ var title='
';
+ title+=' '+$("#requestStatisticTime").val()+'
';
$("#contentPrintTable").css('display','block');
$("#contentPrintTable").print({
globalStyles: true,
iframe: true,
- append: null
+ append: null,
+ prepend: title
});
$("#contentPrintTable").css('display','none');
- /* $(".cfgMenuTable").print({
- globalStyles: true,
- iframe: true,
- append: null
- }); */
}
//配置业务和状态统计打印
- function statisticsPrint() {
+ function statisticsPrint() {
+
+ $('.count').removeClass("hidden");
+ //计算合计行
+ var tb=document.getElementsByName("statisticsStatusTable")[0];
+ var rows = tb.rows;
+ var colums = tb.rows[0].cells.length;
+ $(".statisticsStatusTable .count").empty();
+ $(".statisticsStatusTable .count").append(" | ");
+ for(var j = 1; j < colums; j++){
+ var sum = 0;
+ for(var i = 1;i"+sum+"");
+ }
+ //为某一列或者 某一行 添加样式
+ addPrintTableCss(rows.length-1,0,"contentTable2","print-title");
+ var title='
';
+ title+=' '+$("#configStatisticTime").val()+'
';
+ //打印
$(".statisticsStatusTable").print({
globalStyles: true,
iframe: true,
- append: null
- });
+ append: null,
+ prepend: title
+ });
+ //隐藏合计行
+ $('.count').addClass("hidden");
}
@@ -323,6 +370,7 @@
">
+
+
[:${configStatisticTime }]
@@ -419,7 +468,7 @@
-
+
|
diff --git a/src/main/webapp/WEB-INF/views/report/asnRecordList.jsp b/src/main/webapp/WEB-INF/views/report/asnRecordList.jsp
index 2c15227d7..bdd37d706 100644
--- a/src/main/webapp/WEB-INF/views/report/asnRecordList.jsp
+++ b/src/main/webapp/WEB-INF/views/report/asnRecordList.jsp
@@ -68,40 +68,65 @@
dataType:"json",
success:function(data){
if(data !=null){
+ var thData=$('#contentTable thead tr th');
var userTableStr='';
- userTableStr +='';
+ userTableStr +='';
userTableStr += '';
userTableStr += '';
- userTableStr += ' | ';
- userTableStr += ' | ';
- userTableStr += ' | ';
+ for (var i = 0; i < thData.length; i++) {
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ }
userTableStr += '
';
userTableStr += '';
userTableStr += '';
for(var j=0;j';
- userTableStr += '';
- userTableStr += data[j].asn;
- userTableStr += ' | ';
- userTableStr += '';
- userTableStr += data[j].pps;
- userTableStr += ' | ';
- userTableStr += '';
- userTableStr += data[j].bps;
- userTableStr += ' | ';
- userTableStr += '';
+ for (var i = 0; i < thData.length; i++) {
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '| ';
+ userTableStr += data[j].asn;
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '';
+ userTableStr += data[j].pps;
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '';
+ userTableStr += data[j].bps;
+ userTableStr += ' | ';
+ }
+ }
+ userTableStr += '
';
}
userTableStr +='';
userTableStr +='
';
$("#contentPrintTable").html(userTableStr);
+ //为某一列或者 某一行 添加样式
+ addPrintTableCss(data.length,0,"printTable","print-title");
}
}
});
+ //为某一列或者 某一行 添加样式
+// addPrintTableCss(5,2,"printTable","print-title");
+ var title='
';
+ title+=':'+$('[name="searchFoundStartTime"]').val()+' ';
+ title+=':'+$('[name="searchFoundEndTime"]').val()+'
';
$("#contentPrintTable").css('display','block');
$("#contentPrintTable").print({
globalStyles: true,
iframe: true,
- append: null
+ append: null,
+ prepend: title
});
$("#contentPrintTable").css('display','none');
}
diff --git a/src/main/webapp/WEB-INF/views/report/eventBlockList.jsp b/src/main/webapp/WEB-INF/views/report/eventBlockList.jsp
index 446052699..47bcb06eb 100644
--- a/src/main/webapp/WEB-INF/views/report/eventBlockList.jsp
+++ b/src/main/webapp/WEB-INF/views/report/eventBlockList.jsp
@@ -92,54 +92,114 @@
dataType:"json",
success:function(data){
if(data !=null){
+ var thData=$('#contentTable thead tr th');
var userTableStr='';
- userTableStr +='';
+ userTableStr +='';
userTableStr += '';
userTableStr += '';
- userTableStr += ' | ';
- userTableStr += ' | ';
- userTableStr += ' | ';
- userTableStr += ' | ';
- userTableStr += ' | ';
- userTableStr += ' | ';
- userTableStr += ' | ';
- userTableStr += ' | ';
- userTableStr += ' | ';
+ for (var i = 0; i < thData.length; i++) {
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ }
userTableStr += '
';
userTableStr += '';
userTableStr += '';
for(var j=0;j';
- userTableStr += data[j].taskIds;
- userTableStr += ' | ';
- userTableStr += data[j].taskName;
- userTableStr += ' | ';
- userTableStr += data[j].ipNum;
- userTableStr += ' | ';
- userTableStr += data[j].httpNum;
- userTableStr += ' | ';
- userTableStr += data[j].mailNum;
- userTableStr += ' | ';
- userTableStr += data[j].vedioNum;
- userTableStr += ' | ';
- userTableStr += data[j].agentNum;
- userTableStr += ' | ';
- userTableStr += data[j].taskTime;
- userTableStr += ' | ';
- userTableStr += data[j].reportTime;
- userTableStr += ' | ';
+ userTableStr += '
';
+ for (var i = 0; i < thData.length; i++) {
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '| ';
+ userTableStr += data[j].taskIds;
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '';
+ userTableStr += data[j].taskName;
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '';
+ userTableStr += data[j].ipNum;
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '';
+ userTableStr += data[j].httpNum;
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '';
+ userTableStr += data[j].mailNum;
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '';
+ userTableStr += data[j].vedioNum;
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '';
+ userTableStr += data[j].agentNum;
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '';
+ userTableStr += data[j].taskTime;
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '';
+ userTableStr += data[j].reportTime;
+ userTableStr += ' | ';
+ }
+ }
+ userTableStr += '
';
}
userTableStr +='';
userTableStr +='
';
$("#contentPrintTable").html(userTableStr);
+ //为某一列或者 某一行 添加样式
+ addPrintTableCss(data.length,0,"printTable","print-title");
}
}
});
+ //为某一列或者 某一行 添加样式
+// addPrintTableCss(4,2,"printTable","print-title");
+ var title='
';
+ title+=':'+$('[name="searchTaskStartTime"]').val()+'—'+$('[name="searchTaskEndTime"]').val();
+ title+=' ';
+ title+=':'+$('[name="searchReportStartTime"]').val()+'—'+$('[name="searchReportEndTime"]').val()+'
';
$("#contentPrintTable").css('display','block');
$("#contentPrintTable").print({
globalStyles: true,
iframe: true,
- append: null
+ append: null,
+ prepend: title
});
$("#contentPrintTable").css('display','none');
}
diff --git a/src/main/webapp/WEB-INF/views/report/eventKeyProtectionList.jsp b/src/main/webapp/WEB-INF/views/report/eventKeyProtectionList.jsp
index 073d388ff..4f8fbf597 100644
--- a/src/main/webapp/WEB-INF/views/report/eventKeyProtectionList.jsp
+++ b/src/main/webapp/WEB-INF/views/report/eventKeyProtectionList.jsp
@@ -93,51 +93,104 @@
dataType:"json",
success:function(data){
if(data !=null){
+ var thData=$('#contentTable thead tr th');
var userTableStr='';
- userTableStr +='';
+ userTableStr +='';
userTableStr += '';
userTableStr += '';
- userTableStr += ' | ';
- userTableStr += ' | ';
- userTableStr += ' | ';
- userTableStr += ' | ';
- userTableStr += ' | ';
- userTableStr += ' | ';
- userTableStr += ' | ';
- userTableStr += ' | ';
+ for (var i = 0; i < thData.length; i++) {
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ }
userTableStr += '
';
userTableStr += '';
userTableStr += '';
for(var j=0;j';
- userTableStr += data[j].taskIds;
- userTableStr += ' | ';
- userTableStr += data[j].taskName;
- userTableStr += ' | ';
- userTableStr += data[j].letterNum;
- userTableStr += ' | ';
- userTableStr += data[j].configNum;
- userTableStr += ' | ';
- userTableStr += data[j].monitorNum;
- userTableStr += ' | ';
- userTableStr += data[j].controlNum;
- userTableStr += ' | ';
- userTableStr += data[j].taskTime;
- userTableStr += ' | ';
- userTableStr += data[j].reportTime;
- userTableStr += ' | ';
+ userTableStr += '
';
+ for (var i = 0; i < thData.length; i++) {
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '| ';
+ userTableStr += data[j].taskIds;
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '';
+ userTableStr += data[j].taskName;
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '';
+ userTableStr += data[j].letterNum;
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '';
+ userTableStr += data[j].configNum;
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '';
+ userTableStr += data[j].monitorNum;
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '';
+ userTableStr += data[j].controlNum;
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '';
+ userTableStr += data[j].taskTime;
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '';
+ userTableStr += data[j].reportTime;
+ userTableStr += ' | ';
+ }
+ }
+ userTableStr += '
';
}
userTableStr +='';
userTableStr +='
';
$("#contentPrintTable").html(userTableStr);
+ //为某一列或者 某一行 添加样式
+ addPrintTableCss(data.length,0,"printTable","print-title");
}
}
});
+ var title='
';
+ title+=':'+$('[name="searchTaskStartTime"]').val()+'—'+$('[name="searchTaskEndTime"]').val();
+ title+=' ';
+ title+=':'+$('[name="searchReportStartTime"]').val()+'—'+$('[name="searchReportEndTime"]').val()+'
';
$("#contentPrintTable").css('display','block');
$("#contentPrintTable").print({
globalStyles: true,
iframe: true,
- append: null
+ append: null,
+ prepend: title
});
$("#contentPrintTable").css('display','none');
}
diff --git a/src/main/webapp/WEB-INF/views/report/eventMonitorList.jsp b/src/main/webapp/WEB-INF/views/report/eventMonitorList.jsp
index 32c2ad3f1..bf96d42e1 100644
--- a/src/main/webapp/WEB-INF/views/report/eventMonitorList.jsp
+++ b/src/main/webapp/WEB-INF/views/report/eventMonitorList.jsp
@@ -101,54 +101,112 @@
dataType:"json",
success:function(data){
if(data !=null){
+ var thData=$('#contentTable thead tr th');
var userTableStr='';
- userTableStr +='';
+ userTableStr +='';
userTableStr += '';
userTableStr += '';
- userTableStr += ' | ';
- userTableStr += ' | ';
- userTableStr += ' | ';
- userTableStr += ' | ';
- userTableStr += ' | ';
- userTableStr += ' | ';
- userTableStr += ' | ';
- userTableStr += ' | ';
- userTableStr += ' | ';
+ for (var i = 0; i < thData.length; i++) {
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ }
userTableStr += '
';
userTableStr += '';
userTableStr += '';
for(var j=0;j';
- userTableStr += data[j].taskIds;
- userTableStr += ' | ';
- userTableStr += data[j].taskName;
- userTableStr += ' | ';
- userTableStr += data[j].ipNum;
- userTableStr += ' | ';
- userTableStr += data[j].httpNum;
- userTableStr += ' | ';
- userTableStr += data[j].mailNum;
- userTableStr += ' | ';
- userTableStr += data[j].vedioNum;
- userTableStr += ' | ';
- userTableStr += data[j].agentNum;
- userTableStr += ' | ';
- userTableStr += data[j].taskTime;
- userTableStr += ' | ';
- userTableStr += data[j].reportTime;
- userTableStr += ' | ';
+ userTableStr += '
';
+ for (var i = 0; i < thData.length; i++) {
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '| ';
+ userTableStr += data[j].taskIds;
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '';
+ userTableStr += data[j].taskName;
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '';
+ userTableStr += data[j].ipNum;
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '';
+ userTableStr += data[j].httpNum;
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '';
+ userTableStr += data[j].mailNum;
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '';
+ userTableStr += data[j].vedioNum;
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '';
+ userTableStr += data[j].agentNum;
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '';
+ userTableStr += data[j].taskTime;
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '';
+ userTableStr += data[j].reportTime;
+ userTableStr += ' | ';
+ }
+ }
+ userTableStr += '
';
}
userTableStr +='';
userTableStr +='
';
$("#contentPrintTable").html(userTableStr);
+ //为某一列或者 某一行 添加样式
+ addPrintTableCss(data.length,0,"printTable","print-title");
}
}
});
+ var title='
';
+ title+=':'+$('[name="searchTaskStartTime"]').val()+'—'+$('[name="searchTaskEndTime"]').val();
+ title+=' ';
+ title+=':'+$('[name="searchReportStartTime"]').val()+'—'+$('[name="searchReportEndTime"]').val()+'
';
$("#contentPrintTable").css('display','block');
$("#contentPrintTable").print({
globalStyles: true,
iframe: true,
- append: null
+ append: null,
+ prepend: title
});
$("#contentPrintTable").css('display','none');
}
diff --git a/src/main/webapp/WEB-INF/views/report/ipRangeReportList.jsp b/src/main/webapp/WEB-INF/views/report/ipRangeReportList.jsp
index c2c4c1184..6eb418da6 100644
--- a/src/main/webapp/WEB-INF/views/report/ipRangeReportList.jsp
+++ b/src/main/webapp/WEB-INF/views/report/ipRangeReportList.jsp
@@ -51,36 +51,61 @@
dataType:"json",
success:function(data){
if(data !=null){
+ var thData=$('#contentTable thead tr th');
var userTableStr='';
- userTableStr +='';
+ userTableStr +='';
userTableStr += '';
userTableStr += '';
- userTableStr += '| ';
- userTableStr += ' | ';
- userTableStr += ' | ';
- userTableStr += ' | ';
- userTableStr += ' | ';
+ for (var i = 0; i < thData.length; i++) {
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ }
userTableStr += '
';
userTableStr += '';
userTableStr += '';
for(var j=0;j';
- userTableStr += '';
- userTableStr += data[j].ipStart;
- userTableStr += ' | ';
- userTableStr += '';
- userTableStr += data[j].ipEnd;
- userTableStr += ' | ';
- userTableStr += '';
- userTableStr += data[j].ipSub;
- userTableStr += ' | ';
- userTableStr += '';
- userTableStr += data[j].country;
- userTableStr += ' | ';
- userTableStr += '';
- userTableStr += data[j].desc;
- userTableStr += ' | ';
- userTableStr += '';
+ for (var i = 0; i < thData.length; i++) {
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '| ';
+ userTableStr += data[j].ipStart;
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '';
+ userTableStr += data[j].ipEnd;
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '';
+ userTableStr += data[j].ipSub;
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '';
+ userTableStr += data[j].country;
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '';
+ userTableStr += data[j].desc;
+ userTableStr += ' | ';
+ }
+ }
+ userTableStr += '
';
}
userTableStr +='';
userTableStr +='
';
@@ -88,11 +113,15 @@
}
}
});
+ //为某一列或者 某一行 添加样式
+// addPrintTableCss(4,2,"printTable","print-title");
+ var title='
';
$("#contentPrintTable").css('display','block');
$("#contentPrintTable").print({
globalStyles: true,
iframe: true,
- append: null
+ append: null,
+ prepend: title
});
$("#contentPrintTable").css('display','none');
}
diff --git a/src/main/webapp/WEB-INF/views/report/list.jsp b/src/main/webapp/WEB-INF/views/report/list.jsp
index a5492f6da..da53f0f76 100644
--- a/src/main/webapp/WEB-INF/views/report/list.jsp
+++ b/src/main/webapp/WEB-INF/views/report/list.jsp
@@ -429,28 +429,50 @@ function customColumnClick(){
}
//打印
function doPrint() {
- var reportBusinessType=$("#reportBusinessType").val()
- var tableId="tagTable";
- if(reportBusinessType=="label_report"){
+
+ document.getElementById("tabTablePrint").scrollTop = 0;
+ $('th').css('transform','translateY(0px)');
+ $('thead tr').css('position','relative');
+ $('th').css('border','1px solid rgb(255, 255, 255)');
+ $('th').css('background-clip','padding-box');
+
+ var reportBusinessType=$("#reportBusinessType").val()
+ var tableId="tagTable";
+ var tabTitleName="";
+ if(reportBusinessType=="label_report"){
tableId="tagTable";
- }else if(reportBusinessType=="lwhh_report"){
+ tabTitleName="";
+ }else if(reportBusinessType=="lwhh_report"){
tableId="lwhhTable";
+ tabTitleName="";
}else if(reportBusinessType=="src_ip_report"){
tableId="contentTable1";
+ tabTitleName="";
}else if(reportBusinessType=="attr_type_report"){
tableId="attrTypeTable";
+ tabTitleName="";
}else if(reportBusinessType=="dest_ip_report"){
tableId="destIpTable";
+ tabTitleName="";
}else if(reportBusinessType=="isp_report"){
tableId="entranceIdTable";
+ tabTitleName="";
}
$("#"+tableId+" tbody tr").removeAttr("style");
- $("#"+tableId).print({
+ //为某一列或者 某一行 添加样式
+ addPrintTableCss(1,0,tableId,"print-title");
+ var timeType = $("#reportType").find("option:selected").text();
+ var time = $("#intype").val();
+ var title=''+$("[name=cfgName2]").val()+'()
';
+ title+=''+timeType+' '+time+' '+tabTitleName+'
';
+ $("#"+tableId).print({
globalStyles: true,
iframe: true,
- append: null
- });
+ append: null,
+ prepend: title
+ });
+ $("#"+tableId+" tbody td").removeClass("print-title");
pagination(30);
}
@@ -492,6 +514,10 @@ function customColumnClick(){
}
num++;
});
+ if(column.length ==0 ){
+ top.$.jBox.tip("", "");
+ return;
+ }
for(var i=1 ; i
>">
-
+
in active
diff --git a/src/main/webapp/WEB-INF/views/report/urlReportList.jsp b/src/main/webapp/WEB-INF/views/report/urlReportList.jsp
index ce3361228..9ee192b39 100644
--- a/src/main/webapp/WEB-INF/views/report/urlReportList.jsp
+++ b/src/main/webapp/WEB-INF/views/report/urlReportList.jsp
@@ -72,40 +72,65 @@
dataType:"json",
success:function(data){
if(data !=null){
+ var thData=$('#contentTable thead tr th');
var userTableStr='';
- userTableStr +='
';
+ userTableStr +='';
userTableStr += '';
userTableStr += '';
- userTableStr += '| ';
- userTableStr += ' | ';
- userTableStr += ' | ';
+ for (var i = 0; i < thData.length; i++) {
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += ' | ';
+ }
+ }
userTableStr += '
';
userTableStr += '';
userTableStr += '';
for(var j=0;j';
- userTableStr += '';
- userTableStr += data[j].url;
- userTableStr += ' | ';
- userTableStr += '';
- userTableStr += data[j].ipCount;
- userTableStr += ' | ';
- userTableStr += '';
- userTableStr += data[j].connCount;
- userTableStr += ' | ';
- userTableStr += '';
+ for (var i = 0; i < thData.length; i++) {
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '| ';
+ userTableStr += data[j].url;
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '';
+ userTableStr += data[j].ipCount;
+ userTableStr += ' | ';
+ }
+ if (thData[i].style.display !="none" && thData[i].innerHTML=="") {
+ userTableStr += '';
+ userTableStr += data[j].connCount;
+ userTableStr += ' | ';
+ }
+ }
+ userTableStr += '
';
}
userTableStr +='';
userTableStr +='
';
$("#contentPrintTable").html(userTableStr);
+ //为某一列或者 某一行 添加样式
+ addPrintTableCss(data.length,0,"printTable","print-title");
}
}
});
+ //为某一列或者 某一行 添加样式
+// addPrintTableCss(4,2,"printTable","print-title");
+ var title='
';
+ title+=':'+$('[name="searchReportStartTime"]').val()+' ';
+ title+=':'+$('[name="searchReportEndTime"]').val()+'
';
$("#contentPrintTable").css('display','block');
$("#contentPrintTable").print({
globalStyles: true,
iframe: true,
- append: null
+ append: null,
+ prepend: title
});
$("#contentPrintTable").css('display','none');
}
diff --git a/src/main/webapp/static/global/css/page.css b/src/main/webapp/static/global/css/page.css
index ab961db4e..2805b83f3 100644
--- a/src/main/webapp/static/global/css/page.css
+++ b/src/main/webapp/static/global/css/page.css
@@ -94,4 +94,8 @@ margin-top: 20px;
/* ʵʱģ,ӡťʾ */
.css-print{
display: none;
+}
+/* Ӵ */
+.print-title{
+ font-weight:bold;
}
\ No newline at end of file
diff --git a/src/main/webapp/static/global/scripts/common.js b/src/main/webapp/static/global/scripts/common.js
index 63414074a..2b3edc3ad 100644
--- a/src/main/webapp/static/global/scripts/common.js
+++ b/src/main/webapp/static/global/scripts/common.js
@@ -1681,4 +1681,23 @@ function heightDiv(type){
}
}
window.onresize=heightDiv;
-
+/* 打印时,为列表的某一行或者某一列添加CSS样式
+ * 例子:如果不用添加样式,就把行数和列数设置为0;
+ * var rowValue=3; 行数
+ * var cellValue=2; 列数
+ * var tableIdValue="printTable"; table的ID的值
+ * var cssName="print-title print-background-color"; 要添加的class样式的名字
+ * */
+function addPrintTableCss(rowValue,cellValue,tableIdValue,cssName){
+ var rows=document.getElementById(""+tableIdValue).rows;
+ for (var i = 0; i < rows.length; i++) {
+ for (var k = 0; k 0 && rowValue 0 && cellValue<=rows[0].cells.length&& (cellValue-1)==k && i !=0) {
+ rows[i].cells[k].className=cssName;
+ }
+ }
+ }
+}