配置界面的Cfg Id检索条件 增加范围和in的检索方式

This commit is contained in:
shangguanyanfei
2019-04-11 11:26:39 +08:00
parent 04a94458ed
commit fc08261929
58 changed files with 844 additions and 106 deletions

View File

@@ -24,6 +24,16 @@
});
}(jQuery));
//cfgId 新增配置ID查询条件验证 1,2,3 1-3
jQuery.validator.addMethod("compileIdCheck",function(value,element){
var flagTypeSame=true;
if(this.optional(element) || /^(\d+,)*\d+$/.test(value) || /^(\d+-)?\d+$/.test(value)){
flagTypeSame=true;
}else{
flagTypeSame=false;
}
return flagTypeSame ;
},$.validator.messages.compileIdCheck);
jQuery.validator.addMethod("hexCheck", function(value, element) {
return this.optional(element) || /^([0-9|a-f|A-F]*)$/.test(value);
}, $.validator.messages.hexCheck);

View File

@@ -92,6 +92,7 @@
protect_warn:"Policy with relax precondition may consume too much resources.Use with cautions!",
log_no_data:"This hour no data",
expireTip:"Start time and end time interval is at least 1 minute",
compareTip:"Start time should not be less than the current time plus 2 minutes."
compareTip:"Start time should not be less than the current time plus 2 minutes.",
compileIdCheck:"Please enter the correct query format"
});
}(jQuery));

View File

@@ -92,6 +92,7 @@
protect_warn:"Policy with relax precondition may consume too much resources.Use with cautions!",
log_no_data:"Нет данных за этот час",
expireTip:"Start time and end time interval is at least 1 minute",
compareTip:"Start time should not be less than the current time plus 2 minutes."
compareTip:"Start time should not be less than the current time plus 2 minutes.",
compileIdCheck:"Please enter the correct query format"
});
}(jQuery));

View File

@@ -92,6 +92,7 @@
protect_warn:"该策略执行条件过于宽泛,会消耗较多的计算资源。慎用!",
log_no_data:"本小时无数据",
expireTip:"开始时间结束时间间隔至少为1分钟",
compareTip:"开始时间不能小于当前时间加上2分钟 "
compareTip:"开始时间不能小于当前时间加上2分钟 ",
compileIdCheck:"请输入正确的查询格式"
});
}(jQuery));

View File

@@ -739,25 +739,25 @@ window.onload=function(){
$("div[class='content content5']").find("label:lt(1)").addClass("keyword-disinline");//page.css 关键词换行
})
// 配置id的搜索下拉框选择切换
if ($("#searchForm #seltype").val() == 'compileId') {
$("#searchForm #intype").addClass("number");
if ($("#searchForm #seltype").val() == 'compileIdNew') {
$("#searchForm #intype").addClass("compileIdCheck");
} else {
$("#searchForm #intype").removeClass("number");
$("#searchForm #intype").removeClass("compileIdCheck");
}
// reset时去掉number
$("#resetBtn").on("click", function() {
if ($("#searchForm #seltype").val() == 'compileId') {
$("#searchForm #intype").addClass("number");
if ($("#searchForm #seltype").val() == 'compileIdNew') {
$("#searchForm #intype").addClass("compileIdCheck");
} else {
$("#searchForm #intype").removeClass("number");
$("#searchForm #intype").removeClass("compileIdCheck");
}
});
// 切换时为compileId加上number
$("#searchForm #seltype").on("change", function() {
if ($("#searchForm #seltype").val() == 'compileId') {
$("#searchForm #intype").addClass("number");
if ($("#searchForm #seltype").val() == 'compileIdNew') {
$("#searchForm #intype").addClass("compileIdCheck");
} else {
$("#searchForm #intype").removeClass("number");
$("#searchForm #intype").removeClass("compileIdCheck");
}
});