Merge branch 'demostration_08' into 'develop'
(1)tag根节点替换root_node See merge request !15
This commit is contained in:
@@ -26,6 +26,7 @@ public class TagController extends BaseController {
|
|||||||
model.addAttribute("selectIds", request.getParameter("selectIds")); // 指定默认选中的ID
|
model.addAttribute("selectIds", request.getParameter("selectIds")); // 指定默认选中的ID
|
||||||
model.addAttribute("isAll", request.getParameter("isAll")); // 是否读取全部数据,不进行权限过滤
|
model.addAttribute("isAll", request.getParameter("isAll")); // 是否读取全部数据,不进行权限过滤
|
||||||
model.addAttribute("module", request.getParameter("module")); // 过滤栏目模型(仅针对CMS的Category树)
|
model.addAttribute("module", request.getParameter("module")); // 过滤栏目模型(仅针对CMS的Category树)
|
||||||
|
model.addAttribute("title", request.getParameter("title"));
|
||||||
return "/sys/tagTreeselect";
|
return "/sys/tagTreeselect";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1086,3 +1086,6 @@ reject_ip=IP Block
|
|||||||
monit_ip=IP Monitor
|
monit_ip=IP Monitor
|
||||||
ir_ip=IP Reuseing
|
ir_ip=IP Reuseing
|
||||||
ratelimit_ip=IP Ratelimit
|
ratelimit_ip=IP Ratelimit
|
||||||
|
app_code=Application No
|
||||||
|
app_name=Application Name
|
||||||
|
app_desc=Application Description
|
||||||
@@ -1090,3 +1090,6 @@ reject_ip=IP\u963B\u65AD
|
|||||||
monit_ip=IP\u76D1\u6D4B
|
monit_ip=IP\u76D1\u6D4B
|
||||||
ir_ip=IP\u590D\u7528
|
ir_ip=IP\u590D\u7528
|
||||||
ratelimit_ip=IP\u9650\u6D41
|
ratelimit_ip=IP\u9650\u6D41
|
||||||
|
app_code=\u5E94\u7528\u5E8F\u53F7
|
||||||
|
app_name=\u5E94\u7528\u540D\u79F0
|
||||||
|
app_desc=\u5E94\u7528\u63CF\u8FF0
|
||||||
@@ -26,6 +26,7 @@
|
|||||||
<%@ attribute name="showParentName" type="java.lang.String" required="false" description="显示父类名称"%>
|
<%@ attribute name="showParentName" type="java.lang.String" required="false" description="显示父类名称"%>
|
||||||
<%@ attribute name="checkedPS" type="java.lang.String" required="false" description="复选框选中时是否关联父子节点,ps关联父子,p关联父,s关联子,都不关联为空"%>
|
<%@ 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="unCheckedPS" type="java.lang.String" required="false" description="复选框取消选中时是否关联父子节点,ps关联父子,p关联父,s关联子,都不关联为空"%>
|
||||||
|
<%@ attribute name="rootNodeName" type="java.lang.String" required="false" description="根节点显示的名称"%>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input id="${id}Id" name="${name}" class="${cssClass} singleClass" type="hidden" value="${value}" />
|
<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='${labelValue}'/>" data-msg-required="${dataMsgRequired}" placeholder="${value}"
|
<input id="${id}Name" name="${labelName}" ${allowInput?'':'readonly="readonly"'} type="text" value="<spring:message code='${labelValue}'/>" data-msg-required="${dataMsgRequired}" placeholder="${value}"
|
||||||
@@ -45,7 +46,7 @@
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// 正常打开
|
// 正常打开
|
||||||
top.$.jBox.open("iframe:${ctx}/tag/treeselect?url="+encodeURIComponent("${url}")+"&selectIds="+$("#${id}Id").val()+"&module=${module}&checked=${checked}&extId=${extId}&isAll=${isAll}", "<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}", "<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){
|
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"){
|
if (v == "ok"){
|
||||||
var tree = h.find("iframe")[0].contentWindow.tree;//h.find("iframe").contents();
|
var tree = h.find("iframe")[0].contentWindow.tree;//h.find("iframe").contents();
|
||||||
@@ -87,14 +88,12 @@
|
|||||||
data:{'deptId':nodes[i].id},
|
data:{'deptId':nodes[i].id},
|
||||||
dateType:"json",
|
dateType:"json",
|
||||||
success:function(data){
|
success:function(data){
|
||||||
|
|
||||||
var data=eval('('+data+')');
|
var data=eval('('+data+')');
|
||||||
names.push(data[0].parentName);
|
names.push(data[0].parentName);
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
error: function(e) {
|
error: function(e) {
|
||||||
|
|
||||||
names.push(nodes[i].name);
|
names.push(nodes[i].name);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -109,14 +108,14 @@
|
|||||||
break; // 如果为非复选框选择,则返回第一个选择 </c:if>
|
break; // 如果为非复选框选择,则返回第一个选择 </c:if>
|
||||||
}
|
}
|
||||||
$("#${id}Id").val(ids.join(",").replace(/u_/ig,""));
|
$("#${id}Id").val(ids.join(",").replace(/u_/ig,""));
|
||||||
if(types.length>0){
|
//if(types.length>0){
|
||||||
$("#${id}Id").attr('cfgtype',types.join(","));
|
// $("#${id}Id").attr('cfgtype',types.join(","));
|
||||||
}
|
//}
|
||||||
$("#${id}Id").change();//手动触发change事件,使Id的值得变化可以被监听到
|
$("#${id}Id").change();//手动触发change事件,使Id的值得变化可以被监听到
|
||||||
$("#${id}Name").val(names.join(","));
|
$("#${id}Name").val(names.join(","));
|
||||||
}else if (v == "clear"){
|
}else if (v == "clear"){
|
||||||
$("#${id}Id").val("");
|
$("#${id}Id").val("");
|
||||||
$("#${id}Id").removeAttr('cfgtype');
|
//$("#${id}Id").removeAttr('cfgtype');
|
||||||
$("#${id}Id").change();//手动触发change事件,使Id的值得变化可以被监听到
|
$("#${id}Id").change();//手动触发change事件,使Id的值得变化可以被监听到
|
||||||
$("#${id}Name").val("");
|
$("#${id}Name").val("");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<%@ page contentType="text/html;charset=UTF-8" %>
|
laow<%@ page contentType="text/html;charset=UTF-8" %>
|
||||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
@@ -92,7 +92,9 @@
|
|||||||
$(this).find("a").unbind("click");
|
$(this).find("a").unbind("click");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
$(".protocol_code").html('<font color="red">*</font><spring:message code="app_code"/>:');
|
||||||
|
$(".protocol_name").html('<font color="red">*</font><spring:message code="app_name"/>:');
|
||||||
|
$(".protocol_desc").html('<font color="red">*</font><spring:message code="app_desc"/>:');
|
||||||
}else{
|
}else{
|
||||||
$(".cfgType").each(function(){
|
$(".cfgType").each(function(){
|
||||||
if($(this).attr("cfgType")!=$("[name='cfgType']").val()){
|
if($(this).attr("cfgType")!=$("[name='cfgType']").val()){
|
||||||
@@ -104,6 +106,15 @@
|
|||||||
$(this).find("input").unbind("click");
|
$(this).find("input").unbind("click");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if($("[name='cfgType']").val()==1){
|
||||||
|
$(".protocol_code").html('<font color="red">*</font><spring:message code="app_code"/>:');
|
||||||
|
$(".protocol_name").html('<font color="red">*</font><spring:message code="app_name"/>:');
|
||||||
|
$(".protocol_desc").html('<font color="red">*</font><spring:message code="app_desc"/>:');
|
||||||
|
}else{
|
||||||
|
$(".protocol_code").html('<font color="red">*</font><spring:message code="protocol_code"/>:');
|
||||||
|
$(".protocol_name").html('<font color="red">*</font><spring:message code="protocol_name"/>:');
|
||||||
|
$(".protocol_desc").html('<font color="red">*</font><spring:message code="protocol_desc"/>:');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$(".tabs-left li").on("click",function(){
|
$(".tabs-left li").on("click",function(){
|
||||||
var cfgType=$(this).attr("cfgType");
|
var cfgType=$(this).attr("cfgType");
|
||||||
@@ -118,6 +129,15 @@
|
|||||||
$(this).find("[name='parent.specServiceName']").removeAttr("name");
|
$(this).find("[name='parent.specServiceName']").removeAttr("name");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if(cfgType==1){
|
||||||
|
$(".protocol_code").html('<font color="red">*</font><spring:message code="app_code"/>:');
|
||||||
|
$(".protocol_name").html('<font color="red">*</font><spring:message code="app_name"/>:');
|
||||||
|
$(".protocol_desc").html('<font color="red">*</font><spring:message code="app_desc"/>:');
|
||||||
|
}else{
|
||||||
|
$(".protocol_code").html('<font color="red">*</font><spring:message code="protocol_code"/>:');
|
||||||
|
$(".protocol_name").html('<font color="red">*</font><spring:message code="protocol_name"/>:');
|
||||||
|
$(".protocol_desc").html('<font color="red">*</font><spring:message code="protocol_desc"/>:');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@@ -164,30 +184,30 @@
|
|||||||
</c:forEach>
|
</c:forEach>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
<c:set var="fatherName"><spring:message code="root_node"/></c:set>
|
|
||||||
<c:forEach items="${fns:getDictList('SPECIFIC_SERVICE_CFG_TYPE') }" var="dict">
|
<c:forEach items="${fns:getDictList('SPECIFIC_SERVICE_CFG_TYPE') }" var="dict">
|
||||||
|
<c:set var="fatherName"><spring:message code="${dict.itemValue}"/></c:set>
|
||||||
<div class="form-group cfgType" cfgType="${dict.itemCode}">
|
<div class="form-group cfgType" cfgType="${dict.itemCode}">
|
||||||
<label class="col-md-3 control-label"><spring:message code="superior_config"/>:</label>
|
<label class="col-md-3 control-label"><spring:message code="root_node"/>:</label>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<c:if test="${empty specificServiceCfg.specServiceId}">
|
<c:if test="${empty specificServiceCfg.specServiceId}">
|
||||||
<sys:treeselect id="${'specificServiceCfg'.concat(dict.itemCode)}" name="parent.specServiceId" value="${specificServiceCfg.parent.specServiceId}" labelName="parent.specServiceName" labelValue="${fatherName}"
|
<sys:treeselect id="${'specificServiceCfg'.concat(dict.itemCode)}" name="parent.specServiceId" value="${specificServiceCfg.parent.specServiceId}" labelName="parent.specServiceName" labelValue="${fatherName}" title="${dict.itemValue}"
|
||||||
title="" url="/specific/specificServiceCfg/treeData?isLeafShow=false&cfgType=${dict.itemCode}" extId="${specificServiceCfg.specServiceId}" cssClass="required form-control"/>
|
url="/specific/specificServiceCfg/treeData?isLeafShow=false&cfgType=${dict.itemCode}" extId="${specificServiceCfg.specServiceId}" cssClass="required form-control"/>
|
||||||
</c:if>
|
</c:if>
|
||||||
<c:if test="${not empty specificServiceCfg.specServiceId}">
|
<c:if test="${not empty specificServiceCfg.specServiceId}">
|
||||||
<sys:treeselect id="${'specificServiceCfg'.concat(dict.itemCode)}" name="parent.specServiceId" value="${specificServiceCfg.cfgType eq dict.itemCode?specificServiceCfg.parent.specServiceId:0}" labelName="parent.specServiceName" labelValue="${(specificServiceCfg.cfgType eq dict.itemCode and specificServiceCfg.parent.specServiceId ne '0')?fns:getBySpecServiceId(specificServiceCfg.parent.specServiceId).specServiceName:fatherName}"
|
<sys:treeselect id="${'specificServiceCfg'.concat(dict.itemCode)}" name="parent.specServiceId" value="${specificServiceCfg.cfgType eq dict.itemCode?specificServiceCfg.parent.specServiceId:0}" labelName="parent.specServiceName" labelValue="${(specificServiceCfg.cfgType eq dict.itemCode and specificServiceCfg.parent.specServiceId ne '0')?fns:getBySpecServiceId(specificServiceCfg.parent.specServiceId).specServiceName:fatherName}"
|
||||||
title="" url="/specific/specificServiceCfg/treeData?isLeafShow=false&cfgType=${dict.itemCode}" extId="${specificServiceCfg.specServiceId}" cssClass="required form-control"/>
|
title="${dict.itemValue}" url="/specific/specificServiceCfg/treeData?isLeafShow=false&cfgType=${dict.itemCode}" extId="${specificServiceCfg.specServiceId}" cssClass="required form-control"/>
|
||||||
</c:if>
|
</c:if>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="protocol_code"/>:</label>
|
<label class="col-md-3 control-label protocol_code"><font color="red">*</font><spring:message code="protocol_code"/>:</label>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<input id="specServiceCode" name="specServiceCode" maxlength="50" range="[0,2147483647]" class="form-control required digits specServiceCodeCheck" value="${specificServiceCfg.specServiceCode}" ctx="${ctx}"/>
|
<input id="specServiceCode" name="specServiceCode" maxlength="50" range="[0,2147483647]" class="form-control required digits specServiceCodeCheck" value="${specificServiceCfg.specServiceCode}" ctx="${ctx}"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="protocol_name"/>:</label>
|
<label class="col-md-3 control-label protocol_name"><font color="red">*</font><spring:message code="protocol_name"/>:</label>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<form:input path="specServiceName" htmlEscape="false" maxlength="64" class="form-control required noBlankSpace"/>
|
<form:input path="specServiceName" htmlEscape="false" maxlength="64" class="form-control required noBlankSpace"/>
|
||||||
</div>
|
</div>
|
||||||
@@ -217,7 +237,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div> --%>
|
</div> --%>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-md-3 control-label"><spring:message code="protocol_desc"/>:</label>
|
<label class="col-md-3 control-label protocol_desc"><spring:message code="protocol_desc"/>:</label>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<form:textarea path="specServiceDesc" htmlEscape="false" maxlength="64" class="form-control"/>
|
<form:textarea path="specServiceDesc" htmlEscape="false" maxlength="64" class="form-control"/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -56,10 +56,14 @@
|
|||||||
for(var i=0;i<zNodes.length;i++){
|
for(var i=0;i<zNodes.length;i++){
|
||||||
var map = zNodes[i];
|
var map = zNodes[i];
|
||||||
if(map.id==0&&map.pId==0&&map.name=="root_node"){
|
if(map.id==0&&map.pId==0&&map.name=="root_node"){
|
||||||
map.name="<spring:message code='root_node' />";
|
if('${title}'){
|
||||||
|
map.name="<spring:message code='${title}' />";
|
||||||
|
}else{
|
||||||
|
map.name="<spring:message code='root_node' />";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tree = $.fn.zTree.init($("#tree"), setting, zNodes);
|
tree = $.fn.zTree.init($("#tree"), setting, zNodes);
|
||||||
// 默认展开一级节点
|
// 默认展开一级节点
|
||||||
var nodes = tree.getNodesByParam("level", 0);
|
var nodes = tree.getNodesByParam("level", 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user