(1)没有分类的特定服务追加到ztree树的末尾
(2)业务类别下有特定服务的时候更改样式,与有特定服务一致 (3)树修改搜索属性,当页面上的sys:treeselect标签配置了enableSearch="true"属性的时候,开启搜索节点的功能
This commit is contained in:
@@ -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> 搜索 </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> 搜索 </button> -->
|
||||
</div>
|
||||
</c:if>
|
||||
<div id="tree" class="ztree" style="padding:15px 20px;"></div>
|
||||
</body>
|
||||
Reference in New Issue
Block a user