(1)IP类通用导入配置功能增加,针对同一个菜单不同action发往不同maattable进行了处理。格式验证在后面会加上。
(2)IP通用页面,域名通用页面表单提交遮罩层增加。
This commit is contained in:
@@ -311,6 +311,10 @@ $(function(){
|
||||
$(this).html("0");
|
||||
}
|
||||
});
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
$("#protocolId").val($(this).attr("protocolId"));
|
||||
});
|
||||
});
|
||||
//与表达式时,只允许为子串匹配
|
||||
var setDefaultMatchMethod=function (obj){
|
||||
@@ -760,3 +764,54 @@ function validateDataIsLicit(){
|
||||
var fdfz = $.trim($("#tags_1").val()).replace(/,/g,"");
|
||||
return isLicit(fdfz);
|
||||
}
|
||||
//导入文件提示框
|
||||
var toImport=function (cfgRegionCode,cfgType){
|
||||
$("#cfgRegionCode").val(cfgRegionCode);
|
||||
$("#cfgType").val(cfgType);
|
||||
if(cfgType){//针对要下发到不同配置的处理
|
||||
$('.radio-inline').children('span').each(function(){
|
||||
if($(this).hasClass(cfgType)){
|
||||
$(this).find("input").removeAttr("disabled");
|
||||
if($('.radio-inline').children('span').size()==1){
|
||||
$(this).find("input").click();
|
||||
}
|
||||
}else{
|
||||
$(this).find("input").attr("disabled",true).attr("checked",false);
|
||||
}
|
||||
})
|
||||
}
|
||||
$("#import_modal").modal({
|
||||
backdrop:"static",
|
||||
keyboard:false,
|
||||
show:true
|
||||
});
|
||||
}
|
||||
//下载模板
|
||||
var downLoadXLS=function(){
|
||||
var pathName=window.document.location.pathname.substring(0,window.document.location.pathname.lastIndexOf("/"));
|
||||
window.location =pathName+"/import/template?functionId="+$("#functionId").val()+"&cfgRegionCode="+$("#cfgRegionCode").val();
|
||||
}
|
||||
//导入配置
|
||||
var importCfg=function(){
|
||||
if($("#serviceId").val()==""){
|
||||
alert("请选择action");
|
||||
return ;
|
||||
}
|
||||
var fileName = $(".fileupload-preview", $("#importForm1")).text();
|
||||
var $error = $('.alert-error', $("#importForm1"));
|
||||
if(fileName==""){
|
||||
|
||||
$("span",$error).html("请选择xls或者xlsx格式文件进行导入...");
|
||||
$error.removeClass("hide");
|
||||
$error.addClass("show");
|
||||
return false;
|
||||
|
||||
}else if(fileName.lastIndexOf("\.")==-1||fileName.substring(fileName.lastIndexOf("\.")+1).toLowerCase()!='xls' &&fileName.substring(fileName.lastIndexOf("\.")+1).toLowerCase()!='xlsx'){
|
||||
$("span",$error).html("导入的文件后缀,必须为xls或者xlsx...");
|
||||
$error.removeClass("hide");
|
||||
$error.addClass("show");
|
||||
return false;
|
||||
}
|
||||
$("#import_modal").modal('hide');//导入文件隐藏
|
||||
$("#importForm1").submit();
|
||||
}
|
||||
Reference in New Issue
Block a user