0000020: 基本配置-特定服务管理 问题解决:新增 选上级时不再出现叶子节点,修改 存在下级不得改为叶子节点,

0000022: 基本配置-特征作用域 问题解决:新增修改页面及列表展示页面取消叶子节点信息,该字典所有配置均为根节点,叶子节点。
This commit is contained in:
zhangshilin
2018-03-21 18:19:03 +08:00
parent a62a7ce2c7
commit 19d346e2de
5 changed files with 32 additions and 24 deletions

View File

@@ -76,6 +76,9 @@ public class SysDictInfoController extends BaseController {
for(int i=0;i<strArr.length;i++){
intArr[i] = Integer.valueOf(strArr[i]);
}
if(intArr.length==1){
model.addAttribute("specType", intArr[0]);
}
String searchType = null;
String searchContent = null;
if(!StringUtils.isBlank(sysDictInfo.getItemCode())){
@@ -164,6 +167,9 @@ public class SysDictInfoController extends BaseController {
for(int i=0;i<strArr.length;i++){
intArr[i] = Integer.valueOf(strArr[i]);
}
if(intArr.length==1){
model.addAttribute("specType", intArr[0]);
}
model.addAttribute("intArr", Arrays.asList(intArr));
model.addAttribute("sysDictInfo", sysDictInfo);
model.addAttribute("itType", itType);

View File

@@ -206,7 +206,7 @@ public class SpecificServiceCfgController extends BaseController {
for (int i=0; i<list.size(); i++){
SpecificServiceCfg specificServiceCfg = list.get(i);
if(StringUtils.isBlank(extId)||(extId!=null&&!extId.equals(specificServiceCfg.getSpecServiceId().toString()))){
if(specificServiceCfg.getIsValid().equals(0)&&specificServiceCfg.getIsLeaf().equals(1)){
if(specificServiceCfg.getIsValid().equals(0)||specificServiceCfg.getIsLeaf().equals(1)){
continue;
}
Map<String, Object> map = Maps.newHashMap();

View File

@@ -235,15 +235,19 @@
<form:input path="itemValue" htmlEscape="false" maxlength="2000" class="form-control"/>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="is_leaf"/>:</label>
<div class="col-md-4">
<%-- <form:radiobuttons path="isLeaf" items="${fns:getDictOption('SYS_YES_NO')}" /> --%>
<form:select path="isLeaf" class="form-control">
<form:options items="${fns:getDictList('SYS_YES_NO')}" itemLabel="itemValue" itemValue="itemCode" htmlEscape="false"/>
</form:select>
<c:if test="${specType != null and specType==3 }">
<form:hidden path="isLeaf" value="0"/>
</c:if>
<c:if test="${specType != null and specType!=3 }">
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font><spring:message code="is_leaf"/>:</label>
<div class="col-md-4">
<form:select path="isLeaf" class="form-control">
<form:options items="${fns:getDictList('SYS_YES_NO')}" itemLabel="itemValue" itemValue="itemCode" htmlEscape="false"/>
</form:select>
</div>
</div>
</div>
</c:if>
<div class="form-group">
<label class="col-md-3 control-label"><spring:message code="desc"/>:</label>
<div class="col-md-4">

View File

@@ -258,7 +258,9 @@
<th><spring:message code="config_content"/></th>
<th><spring:message code="desc"/></th>
<th><spring:message code="item_type"/></th>
<c:if test="${specType != null and specType!=3 }">
<th><spring:message code="is_leaf"/></th>
</c:if>
<th><spring:message code="creator"/></th>
<th class="sort-column create_time"><spring:message code="create_time"/>
</th><th><spring:message code="editor"/></th>
@@ -275,7 +277,9 @@
<td>${sysDictInfo.itemValue}</td>
<td title="${sysDictInfo.itemDesc}">${fns:abbr(sysDictInfo.itemDesc,15)}</td>
<td>${fns:getDictLabel("SYS_DICT_ITM_TYPE",sysDictInfo.itemType,"0")}</td>
<c:if test="${specType != null and specType!=3 }">
<td>${fns:getDictLabel("SYS_YES_NO",sysDictInfo.isLeaf,"0")}</td>
</c:if>
<td><c:if test="${sysDictInfo.sysDictCreator != null}">
${fns:getUserById(sysDictInfo.sysDictCreator.id).name}
</c:if></td>

View File

@@ -43,45 +43,39 @@
$("#name").focus();
$("#inputForm").validate({
rules:{
'specServiceId':{
specServiceId:{
required:true,
digits:true,
maxValue: true,
remote:'${ctx}/specific/specificServiceCfg/isIdRepeat?oldId=${specificServiceCfg.specServiceId}'
},
'specServiceName':{
specServiceName:{
required:true
},
'groupId':{
groupId:{
digits:true,
maxValue:true
},
'specServiceDesc':{
required:true
},
'isLeaf':{
isLeaf:{
leafHasTree:true,
leafChange:true
}
},
messages: {
'specServiceId':{
specServiceId:{
required:'请填写协议ID',
digits:"请填写整数数字",
maxValue: "请填写正确的协议ID(0~210000000)",
remote:'该协议ID已存在'
},
'specServiceName':{
specServiceName:{
required:'请填写协议名称'
},
'groupId':{
groupId:{
digits:'请填写整数数值',
maxValue:'请填写正确的分组Id(0~210000000)'
},
'specServiceDesc':{
required:'请填写协议描述'
},
'isLeaf':{
isLeaf:{
leafHasTree:'该配置上级为根节点,不得设为叶子节点',
leafChange:'该配置包含下级配置,不得改为叶子节点'
}
@@ -181,7 +175,7 @@
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"><font color="red">*</font>协议描述:</label>
<label class="col-md-3 control-label">协议描述:</label>
<div class="col-md-4">
<form:textarea path="specServiceDesc" htmlEscape="false" maxlength="2000" class="form-control"/>
</div>