日志总量th动态替换

This commit is contained in:
wangxin
2018-08-31 20:24:43 +08:00
parent e5890dd424
commit 041d76e918
5 changed files with 42 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
$(function(){
//扩展jquery增加全局函数
$.ipcommon=function(){
return {};
@@ -438,6 +439,35 @@ $(function(){
var val=$(this).val();
$(this).val(val.trim());
});
var log_total=sessionStorage.getItem("log_total");
var log_time_start=sessionStorage.getItem("log_time_start");
var log_time_range=sessionStorage.getItem("log_time_range");
var log_5_minutes=$.validator.messages.log_5_minutes;
var log_1_hour=$.validator.messages.log_1_hour;
$('th').each(function(){
if(log_time_start){
if($(this).text()==log_5_minutes){
$(this).text(log_total);
}else if($(this).text()==log_1_hour){
$(this).text(log_total);
}
}else if(log_time_range){
if(log_time_range==300000){
if($(this).text()==log_total){
$(this).text(log_5_minutes);
}else if($(this).text()==log_1_hour){
$(this).text(log_5_minutes);
}
}else if(log_time_range=3600000){
if($(this).text()==log_total){
$(this).text(log_1_hour);
}else if($(this).text()==log_5_minutes){
$(this).text(log_1_hour);
}
}
}
})
});
window.onload=function(){
// 配置id的搜索下拉框选择切换