Merge branch 'develop' of http://10.0.6.99/gwall/gwall.git into develop

This commit is contained in:
duandongmei
2018-08-30 19:07:11 +08:00
22 changed files with 199 additions and 54 deletions

View File

@@ -27,6 +27,7 @@
<%@ attribute name="checkedPS" type="java.lang.String" required="false" description="复选框选中时是否关联父子节点ps关联父子p关联父s关联子,都不关联为空"%>
<%@ attribute name="unCheckedPS" type="java.lang.String" required="false" description="复选框取消选中时是否关联父子节点ps关联父子p关联父s关联子,都不关联为空"%>
<%@ attribute name="enableAddBtn" type="java.lang.Boolean" required="false" description="节点是否可编辑"%>
<%@ attribute name="enableSearch" type="java.lang.Boolean" required="false" description="是否开启节点搜索功能"%>
<div class="input-group">
<input id="${id}Id" name="${name}" class="${cssClass} singleClass" type="hidden" value="${value}" />
<input id="${id}Name" name="${labelName}" ${allowInput?'':'readonly="readonly"'} type="text" value="<spring:message code='${empty value?"":labelValue}'/>" data-msg-required="${dataMsgRequired}" placeholder="${empty value?labelValue:value}"
@@ -46,7 +47,7 @@
return true;
}
// 正常打开
top.$.jBox.open("iframe:${ctx}/tag/treeselect?url="+encodeURIComponent("${url}")+"&selectIds="+$("#${id}Id").val()+"&module=${module}&checked=${checked}&extId=${extId}&isAll=${isAll}&title=${title}&enableAddBtn=${enableAddBtn}", "<spring:message code='choose'/> <spring:message code='${title}'/>", 320, 420, {
top.$.jBox.open("iframe:${ctx}/tag/treeselect?url="+encodeURIComponent("${url}")+"&selectIds="+$("#${id}Id").val()+"&module=${module}&checked=${checked}&extId=${extId}&isAll=${isAll}&title=${title}&enableAddBtn=${enableAddBtn}&enableSearch=${enableSearch}", "<spring:message code='choose'/> <spring:message code='${title}'/>", 320, 420, {
ajaxData:{selectIds: $("#${id}Id").val()},buttons:{"<spring:message code='ok'/>":"ok", "<spring:message code='clear'/>":"clear","<spring:message code='close'/>":true}, submit:function(v, h, f){
if (v == "ok"){
var tree = h.find("iframe")[0].contentWindow.tree;//h.find("iframe").contents();

View File

@@ -177,7 +177,7 @@ var delContent = function(contentClassName, addBtnClassName) {
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="basic_protocol"/></label>
<div class="col-md-6">
<sys:treeselect id="specServiceId" name="specServiceId" value="${_cfg.specServiceId}"
labelName="parent.specServiceName"
labelName="parent.specServiceName" notAllowSelectParent="true"
labelValue="${empty _cfg.specServiceId?spec_service_id:fns:getBySpecServiceId(_cfg.specServiceId).specServiceName}"
title="${spec_service_id}" url="/specific/specificServiceCfg/treeData?isLeafShow=false&cfgType=${app}" extId="0"
notAllowSelectRoot="true" cssClass="form-control required"/>

View File

@@ -135,7 +135,7 @@
<div class="pull-left">
<c:set var="spec_service_id"><spring:message code="basic_protocol"/></c:set>
<sys:treeselect id="specServiceId" name="specServiceId" value="${cfg.specServiceId}"
labelName="parent.specServiceName"
labelName="parent.specServiceName" notAllowSelectParent="true" notAllowSelectRoot="true"
labelValue="${empty cfg.specServiceId?spec_service_id:fns:getBySpecServiceId(cfg.specServiceId).specServiceName}"
title="${spec_service_id}" url="/specific/specificServiceCfg/treeData?isLeafShow=false&cfgType=${app}" extId=""
cssClass="form-control input-small"/>

View File

@@ -135,7 +135,7 @@
<div class="pull-left">
<c:set var="spec_service_id"><spring:message code="encrypted_tunnel_behavior"/></c:set>
<sys:treeselect id="specServiceId" name="specServiceId" value="${cfg.specServiceId}"
labelName="parent.specServiceName"
labelName="parent.specServiceName" notAllowSelectRoot="true"
labelValue="${empty cfg.specServiceId?spec_service_id:fns:getBySpecServiceId(cfg.specServiceId).specServiceName}"
title="${spec_service_id}" url="/specific/specificServiceCfg/treeData?isLeafShow=false&cfgType=${app}" extId=""
cssClass="form-control input-small"/>

View File

@@ -56,9 +56,9 @@
}); */
if(flag){
//将disable属性的元素删除
/* $(".disabled").each(function(){
$(".disabled").each(function(){
$(this).remove();
}); */
});
$("input[name$='exprType']").attr("disabled",false);
/* if($("[name='behavCode']")&&$("[name='behavCode']").val()!=""){
$("input[name$='exprType']").val(1);
@@ -130,10 +130,10 @@
<!-- 配置域类型 -->
<c:forEach items="${regionList}" var="region">
<c:if test="${_cfg.functionId eq region.functionId}">
<input type="hidden" name="cfgType"
value="${region.configRegionValue}">
<input type="hidden" name="cfgRegionCode"
value="${region.configRegionCode}">
<c:if test="${region.configServiceType ne 'subscribe_id'}">
<input type="hidden" name="cfgType" value="${region.configRegionValue}">
<input type="hidden" name="cfgRegionCode" value="${region.configRegionCode}">
</c:if>
</c:if>
</c:forEach>
<div class="form-body">

View File

@@ -159,7 +159,8 @@ var ajaxReport=function(url,target){
data:{
"action":$('[name="action"]').val(),
"reportType":$('[name="reportType"]').val(),
"reportTime":$('[name="reportTime"]').val()
"reportTime":$('[name="reportTime"]').val(),
"functionId":$('[name="functionId"]').val()
},
dataType:"html",
success:function(data){
@@ -215,13 +216,26 @@ function customColumnClick(){
<c:forEach items="${fns:getDictList('SERVICE_ACTION')}" var="action">
<c:forEach items="${serviceList}" var="service" varStatus="status">
<c:if test="${service.functionId eq bean.functionId and action.itemCode eq service.action}">
<div data-service="${service.serviceId}" class="service btn
<c:if test="${status.index%2==0}">btn-primary</c:if>
<c:if test="${status.index%2!=0}">btn-default</c:if>">
<spring:message code="${action.itemValue}"/>
<spring:message code="log_total"/>
<span>0</span>
</div>
<c:if test="${service.serviceId ne 5}">
<c:if test="${(service.action ne 128) && (service.action ne 32)}" >
<div data-service="${service.serviceId}" class="service btn
<c:if test="${status.index%2==0}">btn-primary</c:if>
<c:if test="${status.index%2!=0}">btn-default</c:if>">
<spring:message code="${action.itemValue}"/>
<spring:message code="log_total"/>
<span>0</span>
</div>
</c:if>
</c:if>
<c:if test="${service.serviceId eq 5}">
<div data-service="${service.serviceId}" class="service btn
<c:if test="${status.index%2==0}">btn-primary</c:if>
<c:if test="${status.index%2!=0}">btn-default</c:if>">
<spring:message code="${action.itemValue}"/>
<spring:message code="log_total"/>
<span>0</span>
</div>
</c:if>
</c:if>
</c:forEach>
</c:forEach>
@@ -253,7 +267,14 @@ function customColumnClick(){
<c:forEach items="${fns:getDictList('SERVICE_ACTION')}" var="action" >
<c:forEach items="${serviceList}" var="service" >
<c:if test="${service.functionId eq bean.functionId and action.itemCode eq service.action}">
<form:option value="${action.itemCode}" ><spring:message code="${action.itemValue}"/></form:option>
<c:if test="${service.serviceId ne 5}">
<c:if test="${(service.action ne 128) && (service.action ne 32)}" >
<form:option value="${action.itemCode}" ><spring:message code="${action.itemValue}"/></form:option>
</c:if>
</c:if>
<c:if test="${service.serviceId eq 5}">
<form:option value="${action.itemCode}" ><spring:message code="${action.itemValue}"/></form:option>
</c:if>
</c:if>
</c:forEach>
</c:forEach>

View File

@@ -250,7 +250,7 @@
<c:if test="${dict.itemCode==1}">
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="app_business_type"/>:</label>
<div class="col-md-4">
<select id="businessType1" name="businessType" class="form-control required" data-live-search="true" data-live-search-placeholder="search">
<select id="businessType1" name="businessType" class="selectpicker form-control required" data-live-search="true" data-live-search-placeholder="search">
<option value=""><spring:message code="select"/></option>
<c:forEach items="${fns:getDictList('APP_BUSINESS_TYPE')}" var="dict">
<option value="${dict.itemCode}"
@@ -263,7 +263,7 @@
<c:if test="${dict.itemCode==3}">
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="basic_protocol_business_type"/>:</label>
<div class="col-md-4">
<select id="businessType3" name="businessType" class="form-control required" data-live-search="true" data-live-search-placeholder="search">
<select id="businessType3" name="businessType" class="selectpicker form-control required" data-live-search="true" data-live-search-placeholder="search">
<option value=""><spring:message code="select"/></option>
<c:forEach items="${fns:getDictList('APP_BUSINESS_TYPE')}" var="dict">
<option value="${dict.itemCode}"

View File

@@ -158,7 +158,7 @@
<div class="col-md-12">
<div class="pull-left">
<form:select path="cfgType" class="selectpicker select2 input-middle" >
<form:option value=""><spring:message code='cfg_type'/></form:option>
<%-- <form:option value=""><spring:message code='cfg_type'/></form:option> --%>
<c:forEach items="${fns:getDictList('SPECIFIC_SERVICE_CFG_TYPE') }" var="dict">
<form:option value="${dict.itemCode}"><spring:message code='${dict.itemValue}'/></form:option>
</c:forEach>
@@ -168,7 +168,16 @@
<div class="input-group">
<div class="input-group-btn">
<select id="seltype" class="selectpicker select2 input-middle" >
<option value="specServiceName"><spring:message code="protocol_name"/></option>
<c:if test="${specificServiceCfg.cfgType==1}">
<option value="specServiceName"><spring:message code="app_name"/>
</c:if>
<c:if test="${specificServiceCfg.cfgType==3}">
<option value="specServiceName"><spring:message code="protocol_name"/>
</c:if>
<c:if test="${specificServiceCfg.cfgType==2}">
<option value="specServiceName"><spring:message code="tunnel_name"/>
</c:if>
</option>
</select>
</div>
<input id="intype" class="form-control input-medium" placeholder="<spring:message code='input_protocol_name'/>" type="text" onchange="casec()" maxlength="60">
@@ -270,9 +279,39 @@
<th><input type="checkbox" class="ckboxs" id="selAll" onclick="selectAll()"></th>
<!-- <th>序号</th> -->
<th><spring:message code="business_type"/></th>
<th><spring:message code="protocol_code"/></th>
<th><spring:message code="protocol_name"/></th>
<th><spring:message code="protocol_desc"/></th>
<th>
<c:if test="${specificServiceCfg.cfgType==1}">
<spring:message code="app_code"/>
</c:if>
<c:if test="${specificServiceCfg.cfgType==2}">
<spring:message code="tunnel_code"/>
</c:if>
<c:if test="${specificServiceCfg.cfgType==3}">
<spring:message code="protocol_code"/>
</c:if>
</th>
<th>
<c:if test="${specificServiceCfg.cfgType==1}">
<spring:message code="app_name"/>
</c:if>
<c:if test="${specificServiceCfg.cfgType==2}">
<spring:message code="tunnel_name"/>
</c:if>
<c:if test="${specificServiceCfg.cfgType==3}">
<spring:message code="protocol_name"/>
</c:if>
</th>
<th>
<c:if test="${specificServiceCfg.cfgType==1}">
<spring:message code="app_desc"/>
</c:if>
<c:if test="${specificServiceCfg.cfgType==2}">
<spring:message code="tunnel_desc"/>
</c:if>
<c:if test="${specificServiceCfg.cfgType==3}">
<spring:message code="protoco_desc"/>
</c:if>
</th>
<%-- <th><spring:message code="group_id"/></th> --%>
<th><spring:message code="is_leaf"/></th>
<th><spring:message code="cfg_type"/></th>

View File

@@ -91,6 +91,14 @@
var nodes = tree.getNodesByParam("level", 1);
for(var i=0; i<nodes.length; i++) {
tree.expandNode(nodes[i], true, false, false);
var nodeId=nodes[i].id;
//处理特定服务业务类型的图标
if(typeof nodeId=='string'&&nodeId.indexOf("businessType")==0){
if(!nodes[i].isParent){//强制改变没有子节点的特定服务业务类型为父节点,让其改变样式
nodes[i].isParent=true;
tree.updateNode(nodes[i],false);
}
}
}
nodes=tree.getNodesByParam("level", 0);
for(var i=0; i<nodes.length; i++) {
@@ -217,8 +225,8 @@
// 开始搜索
function search() {
$("#search").slideToggle(200);
$("#txt").toggle();
//$("#search").slideToggle(200);
//$("#txt").toggle();
$("#key").focus();
}
function beforeEditName(treeId, treeNode) {
@@ -362,10 +370,12 @@
<div style="position:absolute;right:8px;top:5px;cursor:pointer;" onclick="search();">
<i class="icon-search"></i><label id="txt">搜索</label>
</div> -->
<div id="search" class="form-search hide" style="padding:10px 0 0 13px;">
<label for="key" class="control-label" style="padding:5px 5px 3px 0;">关键字:</label>
<input type="text" class="empty" id="key" name="key" maxlength="50" style="width:110px;">
<button class="btn" id="btn" onclick="searchNode()"> <i class="icon-search"></i> &nbsp;搜索 </button>
<c:if test="${enableSearch ne null and enableSearch==true}">
<div id="search" class="form-search input-group" style="padding:10px 0 0 13px;">
<label for="key" class="control-label" style="padding:5px 5px 3px 0;"><spring:message code="keywords"/>:</label>
<input type="text" class="empty input-small" id="key" name="key" maxlength="50" style="width:170px;" placeholder="<spring:message code='search'/>...">
<!-- <button class="btn" id="btn" onclick="searchNode()"> <i class="icon-search"></i> &nbsp;搜索 </button> -->
</div>
</c:if>
<div id="tree" class="ztree" style="padding:15px 20px;"></div>
</body>

View File

@@ -215,7 +215,7 @@ jQuery.validator.addMethod("ipCheck",function(value, element) {
var ipv4_ip_subnet_regexp=/^(0|1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|[1-9])\.(0|1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)\.(0|1\d{2}|2[0-4]\d|25[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