diff --git a/src/main/webapp/WEB-INF/include/form/basicInfo.jsp b/src/main/webapp/WEB-INF/include/form/basicInfo.jsp index 4771854fe..f03ca7ae7 100644 --- a/src/main/webapp/WEB-INF/include/form/basicInfo.jsp +++ b/src/main/webapp/WEB-INF/include/form/basicInfo.jsp @@ -39,9 +39,9 @@ + labelValue="${classifyValue}" labelEmptyValue="0" + title="classification" url="/basics/serviceDictInfo/treeData?itType=1&isShowLeaf=true" notAllowSelectRoot="false" allowClear="true" notAllowSelectParent="false" + checked="true" cssClass="form-control" checkedPS="ps" unCheckedPS="s"/> <%-- > @@ -134,9 +134,9 @@ + labelValue="${lableValue}" labelEmptyValue="0" + title="label" url="/basics/serviceDictInfo/treeData?itType=3&isShowLeaf=true" notAllowSelectRoot="false" allowClear="true" notAllowSelectParent="false" + checked="true" cssClass="form-control" checkedPS="ps" unCheckedPS="s"/> <%-- " data-msg-required="${dataMsgRequired}" placeholder="${(empty value or value eq extId)?labelValue:value}" @@ -45,7 +46,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}&enableSearch=${enableSearch}", " ", 320, 420, { + top.$.jBox.open("iframe:${ctx}/tag/treeselect?url="+encodeURIComponent("${url}")+"&selectIds="+$("#${id}Id").val()+"&module=${module}&checked=${checked}&checkedPS=${checkedPS}&unCheckedPS=${unCheckedPS}&extId=${extId}&isAll=${isAll}&title=${title}&enableAddBtn=${enableAddBtn}&enableSearch=${enableSearch}", " ", 320, 420, { ajaxData:{selectIds: $("#${id}Id").val()},buttons:{"":"ok", "":"clear","":true}, submit:function(v, h, f){ if (v == "ok"){ var tree = h.find("iframe")[0].contentWindow.tree;//h.find("iframe").contents(); @@ -90,6 +91,11 @@ top.$.jBox.tip("("+nodes[i].name+")"); return false; }// + if("${labelEmptyValue}"&&""!="${labelEmptyValue}"){ + if("${extId}"==nodes[i].id){ + continue; + } + } ids.push(nodes[i].id); // if (nodes[i].id != null ){ @@ -109,7 +115,7 @@ names.push(nodes[i].name); } - }); + }); }// // @@ -119,7 +125,9 @@ break; // 如果为非复选框选择,则返回第一个选择 // } - + if(ids.length==0&&"${labelEmptyValue}"&&""!="${labelEmptyValue}"){ + ids.push("${labelEmptyValue}"); + } $("#${id}Id").val(ids.join(",").replace(/u_/ig,"")); $("#${id}Id").change();//手动触发change事件,使Id的值得变化可以被监听到 $("#${id}Name").val(names.join(",")); @@ -127,7 +135,11 @@ $("#${id}Name").attr("placeholder",""); } }else if (v == "clear"){ - $("#${id}Id").val(""); + if("${labelEmptyValue}"&&""!="${labelEmptyValue}"){ + $("#${id}Id").val("${labelEmptyValue}"); + }else{ + $("#${id}Id").val(""); + } $("#${id}Id").change();//手动触发change事件,使Id的值得变化可以被监听到 $("#${id}Name").val(""); $("#${id}Name").attr("placeholder",""); diff --git a/src/main/webapp/WEB-INF/views/basics/serviceDictForm.jsp b/src/main/webapp/WEB-INF/views/basics/serviceDictForm.jsp index c2859f844..1cfc57e5d 100644 --- a/src/main/webapp/WEB-INF/views/basics/serviceDictForm.jsp +++ b/src/main/webapp/WEB-INF/views/basics/serviceDictForm.jsp @@ -194,9 +194,18 @@ label.errorShow {
- - + + + + + + + + + +
diff --git a/src/main/webapp/static/global/scripts/common.js b/src/main/webapp/static/global/scripts/common.js index 192d5d99c..a759a1330 100644 --- a/src/main/webapp/static/global/scripts/common.js +++ b/src/main/webapp/static/global/scripts/common.js @@ -539,11 +539,11 @@ $(function(){ } }); - $("#classifyId,#attributeId,#lableId").on("change",function(){ + /*$("#classifyId,#attributeId,#lableId").on("change",function(){ if($(this).val()==0 || $(this).val()==''){ $(this).val(0); } - }); + });*/ //配置修改时已经展开的域上的加号隐藏 $(".boxSolid:visible").each(function(){ $(this).prev("h4").find(".glyphicon-plus").addClass("hidden");