diff --git a/src/main/java/com/nis/web/service/configuration/AvContentCfgService.java b/src/main/java/com/nis/web/service/configuration/AvContentCfgService.java index 82a6a68fc..167deb870 100644 --- a/src/main/java/com/nis/web/service/configuration/AvContentCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/AvContentCfgService.java @@ -353,7 +353,6 @@ public class AvContentCfgService extends BaseService{ if(isAudit==1){ if(!StringUtil.isEmpty(voipIpList)){ //TODO DELETE后期删除 - entity.setAreaEffectiveIds(StringUtils.isEmpty(entity.getAreaEffectiveIds()) ? "0":entity.getAreaEffectiveIds()); for (AvVoipIpCfg ipCfg : voipIpList) { ipCfg.setCfgType("MM_VOIP_IP"); } @@ -364,7 +363,6 @@ public class AvContentCfgService extends BaseService{ if(!StringUtil.isEmpty(voipAccountList)){ //TODO DELETE后期删除 - entity.setAreaEffectiveIds(StringUtils.isEmpty(entity.getAreaEffectiveIds()) ? "0":entity.getAreaEffectiveIds()); for (AvVoipAccountCfg accountCfg : voipAccountList) { accountCfg.setCfgType("MM_VOIP_ACCOUNT"); } @@ -395,8 +393,6 @@ public class AvContentCfgService extends BaseService{ maatCfg.setDigestRegionList(digestRegionList); maatCfg.setGroupRelationList(groupRelationList); maatCfg.setGroupNum(groupRelationList.size()); - //TODO 后期修改 - maatCfg.setUserRegion(entity.getCompileId()+""); maatCfg.setAreaIpRegionList(areaIpRegionList); maatCfg.setIsValid(entity.getIsValid()); configCompileList.add(maatCfg); @@ -657,7 +653,6 @@ public class AvContentCfgService extends BaseService{ if(isAudit==1){ if(!StringUtil.isEmpty(list)){ //TODO DELETE后期删除 - entity.setAreaEffectiveIds(StringUtils.isEmpty(entity.getAreaEffectiveIds()) ? "0":entity.getAreaEffectiveIds()); for (BaseIpCfg ipCfg : list) { ipCfg.setCfgType("MM_AV_IP"); } @@ -665,10 +660,6 @@ public class AvContentCfgService extends BaseService{ groupRelationList=ipMap.get("groupList"); ipRegionList=ipMap.get("dstList"); } - //TODO DELETE后期删除 - for (AreaIpCfg areaIpCfga : areaIpCfgList) { - areaIpCfga.setCfgType("NTC_IP_RANGE"); - } if(!StringUtil.isEmpty(areaIpCfgList)){ //TODO DELETE后期删除 for (AreaIpCfg areaIpCfga : areaIpCfgList) { @@ -692,8 +683,6 @@ public class AvContentCfgService extends BaseService{ maatCfg.setDigestRegionList(digestRegionList); maatCfg.setGroupRelationList(groupRelationList); maatCfg.setGroupNum(groupRelationList.size()); - //TODO 后期修改 - maatCfg.setUserRegion(entity.getCompileId()+""); maatCfg.setAreaIpRegionList(areaIpRegionList); maatCfg.setIsValid(entity.getIsValid()); configCompileList.add(maatCfg); @@ -952,7 +941,6 @@ public class AvContentCfgService extends BaseService{ if(!StringUtil.isEmpty(list)){ //TODO DELETE后期删除 - entity.setAreaEffectiveIds(StringUtils.isEmpty(entity.getAreaEffectiveIds()) ? "0":entity.getAreaEffectiveIds()); for (BaseIpCfg ipCfg : list) { ipCfg.setCfgType("MM_PIC_IP"); } @@ -984,8 +972,6 @@ public class AvContentCfgService extends BaseService{ maatCfg.setDigestRegionList(digestRegionList); maatCfg.setGroupRelationList(groupRelationList); maatCfg.setGroupNum(groupRelationList.size()); - //TODO 后期修改 - maatCfg.setUserRegion(entity.getCompileId()+""); maatCfg.setAreaIpRegionList(areaIpRegionList); maatCfg.setIsValid(entity.getIsValid()); configCompileList.add(maatCfg); @@ -1209,7 +1195,6 @@ public class AvContentCfgService extends BaseService{ if(isAudit==1){ if(!StringUtil.isEmpty(list)){ //TODO DELETE后期删除 - entity.setAreaEffectiveIds(StringUtils.isEmpty(entity.getAreaEffectiveIds()) ? "0":entity.getAreaEffectiveIds()); for (BaseStringCfg strCfg : list) { strCfg.setCfgType("MM_AV_URL"); } @@ -1241,8 +1226,6 @@ public class AvContentCfgService extends BaseService{ maatCfg.setDigestRegionList(digestRegionList); maatCfg.setGroupRelationList(groupRelationList); maatCfg.setGroupNum(groupRelationList.size()); - //TODO 后期修改 - maatCfg.setUserRegion(entity.getCompileId()+""); maatCfg.setAreaIpRegionList(areaIpRegionList); maatCfg.setIsValid(entity.getIsValid()); configCompileList.add(maatCfg); @@ -1465,7 +1448,6 @@ public class AvContentCfgService extends BaseService{ if(isAudit==1){ if(!StringUtil.isEmpty(list)){ //TODO DELETE后期删除 - entity.setAreaEffectiveIds(StringUtils.isEmpty(entity.getAreaEffectiveIds()) ? "0":entity.getAreaEffectiveIds()); for (BaseStringCfg strCfg : list) { strCfg.setCfgType("MM_PIC_URL"); } @@ -1497,8 +1479,6 @@ public class AvContentCfgService extends BaseService{ maatCfg.setDigestRegionList(digestRegionList); maatCfg.setGroupRelationList(groupRelationList); maatCfg.setGroupNum(groupRelationList.size()); - //TODO 后期修改 - maatCfg.setUserRegion(entity.getCompileId()+""); maatCfg.setAreaIpRegionList(areaIpRegionList); maatCfg.setIsValid(entity.getIsValid()); configCompileList.add(maatCfg); diff --git a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp index 3a353d42f..5c8f89bbb 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp @@ -112,6 +112,24 @@ html+=""; html+=""; html+=""; + html+=""; + html+="
"; + html+="
"; + html+="
"; + html+=""; + html+=""; + html+="
"; + html+="
"; html+="
"; html+="
"; html+=""; @@ -145,38 +163,6 @@ html+="
"; html+="
"; html+="
"; - html+="
"; - html+="
"; - html+="
"; - html+=""; - html+=""; - html+="
"; - html+="
"; - html+="
"; - html+="
"; - html+=""; - html+=""; - html+="
"; - html+="
"; - html+="
"; - html+="
"; - html+=""; - html+=""; - html+="
"; - html+="
"; - html+="
"; /* if(index < (data.ip.length-1) && index != 0){ alert("下一行"); } diff --git a/src/main/webapp/static/global/scripts/common.js b/src/main/webapp/static/global/scripts/common.js index 8cbbbd322..8840a5712 100644 --- a/src/main/webapp/static/global/scripts/common.js +++ b/src/main/webapp/static/global/scripts/common.js @@ -11,6 +11,9 @@ $(function(){ $("select[name$='ipType']").each(function(){ switchIpInfo(this); }) + $("select[name$='exprType']").each(function(){ + switchIpInfo(this); + }) $("select[name$='ipType']").on("change",function(){ switchIpInfo(this); }); @@ -206,6 +209,9 @@ $(function(){ var objNamePrefix = $(this).attr("name").split("cfgKeywords")[0]; var isTags = $(this).hasClass("tags");//有tags样式的关键字输入框才需处理 if(typeof(tagsId)!=='undefined' && tagsId.indexOf("tags_")!=-1 && isTags){ + if($("input:radio[name='"+objNamePrefix+"exprType']").val()==1){ + $("select[name='"+objNamePrefix+"matchMethod']").find("option[value!=0]").attr("disabled",true); + } //表单中如果有关键字内容可能输入多个关键字的情况,根据输入关键字个数确定表达式选中情况,不允许手动选中 $("input:radio[name='"+objNamePrefix+"exprType']").attr("disabled",true); tagsInputSettings = tagsInputSettings+",#"+tagsId; @@ -271,9 +277,27 @@ $(function(){ } }); - + $("input[name$='exprType']").on("change",function(){ + setDefaultMatchMethod(this); + }); + $("input[name$='exprType']:checked").each(function(){ + setDefaultMatchMethod(this); + }); }); +//与表达式时,只允许为子串匹配 +var setDefaultMatchMethod=function (obj){ + var exprType = $(obj).val(); + if(exprType == 1){ + $(obj).parents(".row").parent(".row").find("select[name$='matchMethod']").find("option").removeAttr("selected"); + $(obj).parents(".row").parent(".row").find("select[name$='matchMethod']").find("option[value=0]").attr("selected","selected"); + $(obj).parents(".row").parent(".row").find("select[name$='matchMethod']").find("option[value!=0]").attr("disabled",true); + $(obj).parents(".row").parent(".row").find("select[name$='matchMethod']").selectpicker("refresh"); + }else{ + $(obj).parents(".row").parent(".row").find("select[name$='matchMethod']").find("option").removeAttr("disabled"); + $(obj).parents(".row").parent(".row").find("select[name$='matchMethod']").selectpicker("refresh"); + } +} var switchIpType=function(obj){ var type=$(obj).val(); var row=$(obj).parents('.row'); @@ -650,8 +674,14 @@ function isLicit(str,regStr) {//判断是否为合格字符 //s 包括空格回 function exprTypeChecked(objNamePrefix,size){ if(size>1) { $("input:radio[name='"+objNamePrefix+"exprType'][value=1]").prop("checked",true); //选中是 + $("select[name='"+objNamePrefix+"matchMethod']").find("option").removeAttr("selected",false); + $("select[name='"+objNamePrefix+"matchMethod']").find("option[value=0]").attr("selected",true); + $("select[name='"+objNamePrefix+"matchMethod']").find("option[value!=0]").attr("disabled",true); + $("select[name='"+objNamePrefix+"matchMethod']").selectpicker("refresh"); }else { $("input:radio[name='"+objNamePrefix+"exprType'][value=0]").prop("checked",true); //选中否 + $("select[name='"+objNamePrefix+"matchMethod']").find("option").removeAttr("disabled"); + $("select[name='"+objNamePrefix+"matchMethod']").selectpicker("refresh"); } } function validateDataIsLicit(){