Merge branch 'develop' of http://192.168.10.125/k18_web/NFS.git into develop

This commit is contained in:
leijun
2018-10-19 19:41:30 +08:00
23 changed files with 332 additions and 104 deletions

View File

@@ -1,12 +1,8 @@
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<script type="text/javascript">
$(function(){
//console.log("调用须知调用本页面函数在common.js里并且需要配置字典MAAT_SERVICE中的项")
});
</script>
<script src="${pageContext.request.contextPath}/static/pages/scripts/importExcel.js" type="text/javascript"></script>
<div class="modal fade" id="import_modal" tabindex="-1" role="dialog" aria-labelledby="mo" aria-hidden="true">
<form id="importForm1" action="${ctx}/ntc/iplist/import" method="post" enctype="multipart/form-data" class="form-horizontal"
<form id="importForm1" action="${ctx}/ntc/iplist/import?importPath=${importPath}" method="post" enctype="multipart/form-data" class="form-horizontal"
onsubmit="loading('<spring:message code='loading'/>');">
<div class="modal-dialog" role="document" style="width:700px;">
@@ -25,32 +21,34 @@ $(function(){
<button class="close" data-dismiss="alert"></button>
<span></span>
</div>
<input type="hidden" name="fucntionId" id="fucntionId" value="${cfg.functionId }">
<div class="form-group">
<label class="control-label col-md-3"> <spring:message
code="action" />
</label>
<div class="col-md-6">
<c:forEach items="${serviceList}" var="service"
varStatus="satus">
<c:if test="${(service.serviceId ne 37) && (service.serviceId ne 149)}">
<label class="radio-inline"> <c:if
test="${cfg.functionId eq service.functionId}">
<input type="radio" name="serviceDictId"
serviceId="${service.serviceId }"
functionId="${service.functionId }"
cfgRegionCodeS="${service.regionCode }"
protocolId="${service.protocolId }"
action="${service.action }"
value="${service.dictId }"
class="required action"
<c:if test="${satus.index eq 0}">checked</c:if>>
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
<c:if test="${dict.itemCode eq service.action }">
<spring:message code="${dict.itemValue }"/>
</c:if>
</c:forEach>
<c:set var="serviceIndex" value="0"></c:set>
<c:forEach items="${serviceList}" var="service" >
<c:if test="${(service.serviceId ne 37) && (service.serviceId ne 149) && (service.isImport eq 1)}">
<c:if test="${cfg.functionId eq service.functionId}">
<label class="radio-inline">
<input type="radio" name="serviceDictId"
serviceId="${service.serviceId }"
functionId="${service.functionId }"
cfgRegionCodeS="${service.regionCode }"
protocolId="${service.protocolId }"
action="${service.action }"
value="${service.dictId }"
class="required action"
<c:if test="${serviceIndex eq 0}">checked</c:if>>
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
<c:if test="${dict.itemCode eq service.action }">
<spring:message code="${dict.itemValue }"/>
</c:if>
</c:forEach>
</label>
<c:set var="serviceIndex" value="${serviceIndex+1 }"></c:set>
</c:if>
</label>
</c:if>
</c:forEach>
</div>
@@ -61,10 +59,10 @@ $(function(){
code="cfg_type" />
</label>
<div class="col-md-6">
<c:forEach items="${regionList}" var="region"
varStatus="satus">
<label class="radio-inline">
<c:if test="${cfg.functionId eq region.functionId}">
<c:set var="regionIndex" value="0"></c:set>
<c:forEach items="${regionList}" var="region" >
<c:if test="${(cfg.functionId eq region.functionId) && (region.isImport eq 1)}">
<label class="radio-inline">
<span>
<input type="radio" name="regionDictIds" class="required"
value="${region.dictId }"
@@ -81,12 +79,12 @@ $(function(){
configPortPattern="${region.configPortPattern}"
configDirection="${region.configDirection}"
configProtocol="${region.configProtocol}"
<c:if test="${regionList.size() eq 1}">checked</c:if>
>
<c:if test="${regionIndex eq 0}">checked</c:if>>
<spring:message code="${region.configRegionValue }"/>
</span>
</label>
<c:set var="regionIndex" value="${regionIndex+1 }"></c:set>
</c:if>
</label>
</c:forEach>
</div>
<div for="action"></div>
@@ -107,6 +105,59 @@ $(function(){
<div for="requestId"></div>
</div>
</br>
<!-- 63 app -->
<c:if test="${cfg.functionId eq 63 }">
<c:set var="cfgType" value="1"></c:set>
<c:set var="spec_service_id"><spring:message code="social_app"/></c:set>
</c:if>
<!-- 408 tunnel behavior -->
<c:if test="${cfg.functionId eq 408 }">
<c:set var="cfgType" value="2"></c:set>
<c:set var="spec_service_id"><spring:message code="encrypted_tunnel_behavior"/></c:set>
</c:if>
<!-- 407 basic -->
<c:if test="${cfg.functionId eq 407 }">
<c:set var="cfgType" value="3"></c:set>
<c:set var="spec_service_id"><spring:message code="basic_protocol"/></c:set>
</c:if>
<c:if test="${!empty cfgType }">
<div class="row">
<c:forEach items="${fns:getDictList('IS_SHOW_BUSINESS_TYPE') }" var="showBusinessType">
<c:if test="${showBusinessType.itemCode==1 }">
<c:set var="isShowBusinessType" value="true"/>
</c:if>
<c:if test="${showBusinessType.itemCode!=1 }">
<c:set var="isShowBusinessType" value="false"/>
</c:if>
</c:forEach>
<c:set var="spec_service_id"><spring:message code="social_app"/></c:set>
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="social_app"/></label>
<div class="col-md-6">
<sys:treeselect id="appId" name="appId" value=""
labelName="parent.specServiceName" notAllowSelectParent="true" enableSearch="true"
labelValue=""
title="${spec_service_id}" url="/specific/specificServiceCfg/treeData?isLeafShow=false&cfgType=${cfgType }&specific=${!isShowBusinessType}" extId="0"
notAllowSelectRoot="true" cssClass="form-control required"/>
</div>
<div for="parent.specServiceName"></div>
</div>
</br>
<c:if test="${cfgType eq 3}">
<div class="row hidden">
</c:if>
<c:if test="${cfgType ne 3}">
<div class="row">
</c:if>
<label class="control-label col-md-3"><spring:message code="behaviour_type"/></label>
<div class="col-md-6" id="behaviorId">
<select name="behaviorId" data-live-search="true" class="selectpicker form-control">
<option value=""><spring:message code="select"/></option>
</select>
</div>
</div>
</c:if>
</br>
<div class="col-md-12">
<div class="form-group">
<label class="col-md-2 control-label" style="margin-top:5px;"><spring:message

View File

@@ -24,7 +24,7 @@
<c:if test="${_cfg.district==_district}">selected</c:if>>${_district }</option>
</c:forEach>
</select>
<input type="hidden" name="districtShowName" placeholder="<spring:message code='please_input'/> <spring:message code='custom_region'/>" class="otherValue form-control" value="${_cfg.district}"/>
<input type="hidden" name="districtShowName" maxlength="64" placeholder="<spring:message code='please_input'/> <spring:message code='custom_region'/>" class="otherValue form-control" value="${_cfg.district}"/>
</div>
<div for="district"></div>
</div>

View File

@@ -92,8 +92,6 @@
<script src="${pageContext.request.contextPath}/static/global/plugins/jquery-validation/1.11.0/localization/messages_en.js"></script>
</c:otherwise>
</c:choose>
<script src="${pageContext.request.contextPath}/static/pages/scripts/importExcel.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/static/global/scripts/common.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/static/global/scripts/jquery.tagsinput.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/static/global/scripts/app.js" type="text/javascript"></script>

View File

@@ -165,7 +165,7 @@ $(function(){
<c:if test="${_cfg.district==_district}">selected</c:if>>${_district }</option>
</c:forEach>
</select>
<input type="hidden" name="districtShowName" placeholder="<spring:message code='please_input'/> <spring:message code='custom_region'/>" class="otherValue form-control" value="${_cfg.district}"/>
<input type="hidden" name="districtShowName" maxlength="64" placeholder="<spring:message code='please_input'/> <spring:message code='custom_region'/>" class="otherValue form-control" value="${_cfg.district}"/>
</div>
<div for="district"></div>
</div>

View File

@@ -165,7 +165,7 @@ $(function(){
<c:if test="${_cfg.district==_district}">selected</c:if>>${_district }</option>
</c:forEach>
</select>
<input type="hidden" name="districtShowName" placeholder="<spring:message code='please_input'/> <spring:message code='custom_region'/>" class="otherValue form-control" value="${_cfg.district}"/>
<input type="hidden" name="districtShowName" maxlength="64" placeholder="<spring:message code='please_input'/> <spring:message code='custom_region'/>" class="otherValue form-control" value="${_cfg.district}"/>
</div>
<div for="district"></div>
</div>

View File

@@ -164,7 +164,7 @@ $(function(){
<c:if test="${_cfg.district eq dict.itemValue}">selected</c:if>>${dict.itemValue }</option>
</c:forEach>
</select>
<input type="hidden" name="districtShowName" placeholder="<spring:message code='please_input'/> <spring:message code='custom_region'/>" class="otherValue form-control" value="${_cfg.district}"/>
<input type="hidden" name="districtShowName" maxlength="64" placeholder="<spring:message code='please_input'/> <spring:message code='custom_region'/>" class="otherValue form-control" value="${_cfg.district}"/>
</div>
<div for="district"></div>
</div>

View File

@@ -41,7 +41,7 @@
<c:if test="${cfg.district==_district}">selected</c:if>>${_district }</option>
</c:forEach>
</select>
<input type="hidden" name="${cfgName}.districtShowName" placeholder="<spring:message code='please_input'/> <spring:message code='custom_region'/>" class="otherValue form-control invisibleChar" value="${cfg.district}"/>
<input type="hidden" name="${cfgName}.districtShowName" maxlength="64" placeholder="<spring:message code='please_input'/> <spring:message code='custom_region'/>" class="otherValue form-control invisibleChar" value="${cfg.district}"/>
</div>
<div for="${cfgName}.districtShowName"></div>
<div for="${cfgName}.district"></div>

View File

@@ -99,6 +99,11 @@
onClick="javascript:window.location='${ctx}/proxy/intercept/intercept${interceptType}Form?functionId=${cfg.functionId}'">
<i class="fa fa-plus"></i>
<spring:message code="add"></spring:message></button>
<c:if test="${cfg.functionId eq 212}">
<button type="button" class="btn btn-primary import" >
<i class="fa fa-plus"></i>
<spring:message code="import"></spring:message></button>
</c:if>
</customTag:hasAnyPermissions>
</div>
@@ -531,6 +536,8 @@
</div>
</div>
</div>
<c:set var="importPath" value="/proxy/intercept/${fn:toLowerCase(interceptType)}/list?functionId=${cfg.functionId}"/>
<!-- 模板导入start -->
<%@include file="/WEB-INF/include/excel/importModal.jsp" %>
</body>
</html>

View File

@@ -85,8 +85,6 @@
<body>
<div class="page-content">
<!-- 模板导入start -->
<%@include file="/WEB-INF/include/excel/importModal.jsp" %>
<div class="theme-panel hidden-xs hidden-sm">
<shiro:hasPermission name="iplist:config">
<button type="button" class="btn btn-primary"
@@ -473,6 +471,8 @@
</div>
</div>
</div>
<c:set var="importPath" value="/ntc/iplist/list?functionId=${cfg.functionId}"/>
<!-- 模板导入start -->
<%@include file="/WEB-INF/include/excel/importModal.jsp" %>
</body>
</html>

View File

@@ -2,6 +2,7 @@ $(function(){
//增加描述新增时的文字长度限制
$("form input[name='cfgDesc']").attr("maxlength","128");
$("form input[name$='cfgKeywords']").attr("maxlength","1024");
$("form input[class~='domainCheck']").attr("maxlength","1024");
//截取过长的文字 使用id选择器;例如:tab对象->tr->td对象. 排除日志table .logTb
$("#contentTable").not(".logTb").find("td").each(function(i){
//获取td当前对象的文本,如果长度大于25;

View File

@@ -7,12 +7,30 @@ $(function(){
show:true
});
});
$("#appIdId").on("change",function(){
ajaxBehaviour($(this).val());
});
switchService();
$("input[name='serviceDictId']").click(function(){
switchService();
});
$("input[name='regionDictIds']").click(function(){
});
});
/**
* action动作切换
*/
function switchService(){
var functionId=$("#functionId").val();
if(functionId==5){//IP配置特殊处理
var cfgRegionCodeS=$("input[name='serviceDictId']:checked").attr("cfgRegionCodeS");
var cfgRegionCode=cfgRegionCodeS.split(",")[0];
$("input[name='regionDictIds'][cfgregioncoder!='"+cfgRegionCode+"']").prop("checked",false);
$("input[name='regionDictIds'][cfgRegionCodeR!='"+cfgRegionCode+"']").parents(".radio-inline").addClass("hidden");
$("input[name='regionDictIds'][cfgRegionCodeR='"+cfgRegionCode+"']").prop("checked",true);
$("input[name='regionDictIds'][cfgRegionCodeR='"+cfgRegionCode+"']").parents(".radio-inline").removeClass("hidden");
}
}
/**
* 模板下载
* TODO 后期修改为传入regionDictId
@@ -27,3 +45,46 @@ function downLoadTemplate(path){
document.location.href = path+'/ntc/iplist/import/template?' + params;
}
var ajaxBehaviour=function(val){
var pathName=window.document.location.pathname.substring(0,window.document.location.pathname.indexOf("/nis")+4);
var request=$.ajax({
type:'post',
url:pathName+'/specific/specificServiceCfg/childrenList',
data:{"parent":val},
dataType:'json',
async:true,
success:function(data,textStatus){//处理返回结果
if(textStatus=="success"){
var html='<select name="behaviorId" data-live-search="true" class="selectpicker form-control">'
+'<option value=""><spring:message code="select"/></option>';
if(data.length>0){
for(i=0;i<data.length;i++){
html+='<option value="'+data[i].code+'"';
html+='>'+data[i].name+'</option>';
}
html+='</select>';
$("#behaviorId").html(html);
$("[name='behaviorId']").selectpicker("refresh");
$("[name='behaviorId']").selectpicker("render");
}else{
html+='</select>';
$("#behaviorId").html(html);
$("[name='behaviorId']").selectpicker("refresh");
$("[name='behaviorId']").selectpicker("render");
}
}
},
complete:function(XMLHttpRequest,status){//超时设置
if(status=="timeout"){
var html='<select name="behaviorId" data-live-search="true" class="selectpicker form-control">'
+'<option value=""><spring:message code="select"/></option></select>';
$("#behaviorId").html(html);
$("[name='behaviorId']").selectpicker("refresh");
$("[name='behaviorId']").selectpicker("render");
}
}
});
}