(1)修复特定服务新增时无法选择上级节点的bug

(2)特定服务加入验证,当前节点的配置类型应当与上级配置一致
This commit is contained in:
wangxin
2018-07-25 15:19:24 +08:00
parent 4e0be5b70b
commit 76b7122c21
13 changed files with 68 additions and 13 deletions

View File

@@ -51,6 +51,23 @@
}
}
});
if("${specificServiceCfg.parentType}"){
$("[name=cfgType]").each(function(){
$(this).attr("parent-type","${specificServiceCfg.parentType}");
});
}
$("#specificServiceCfgId").on("change",function(){
var data=$(this).attr("cfgtype");
if(data!=0){
$("[name=cfgType]").each(function(){
$(this).attr("parent-type",data);
if($(this).val()==data){
$(this).click();
}
})
}
});
});
</script>
</head>
@@ -99,7 +116,7 @@
<div class="col-md-4">
<c:set var="fatherName"><spring:message code="root_node"/></c:set>
<sys:treeselect id="specificServiceCfg" name="parent.specServiceId" value="${specificServiceCfg.parent.specServiceId}" labelName="parent.specServiceName" labelValue="${specificServiceCfg.parent.specServiceId eq '0'?fatherName:fns:getBySpecServiceId(specificServiceCfg.parent.specServiceId).specServiceName}"
title="" url="/specific/specificServiceCfg/treeData?isLeafShow=false" extId="${specificServiceCfg.specServiceId}" cssClass="required form-control"/>
title="" url="/specific/specificServiceCfg/treeData?isLeafShow=false&cfgType=0" extId="${specificServiceCfg.specServiceId}" cssClass="required form-control"/>
</div>
</div>
<div class="form-group">
@@ -134,7 +151,7 @@
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="cfg_type"/>:</label>
<div class="col-md-4">
<c:forEach items="${fns:getDictList('SPECIFIC_SERVICE_CFG_TYPE') }" var="dict">
<label class="radio-inline"><form:radiobutton path="cfgType" class="required" value="${dict.itemCode}"/><spring:message code="${dict.itemValue}"/></label>
<label class="radio-inline"><form:radiobutton path="cfgType" class="required checkParent" value="${dict.itemCode}"/><spring:message code="${dict.itemValue}"/></label>
</c:forEach>
</div>
</div>