复制代码 代码如下:
// 业务类型树
var settingOther = {
edit: {
enable: false
},
// 异步加载树
async: {
enable: true,
url:"initCoagencyTree.action",
autoParam:["id", "name=n"],
otherParam:{"otherParam":"zTreeAsyncTest"},
dataFilter: filter
},
// 简单数据格式
data: {
simpleData: {
enable: true
}
},
// 回调函数
callback: {
beforeClick: beforeClick,
onClick: onClick
}
};
// 鼠标事件
function beforeClick(treeId, treeNode, clickFlag) {
// 普通选中
if(clickFlag==1){
parent.document.getElementById("coagencyId").value=treeNode.id;
parent.document.getElementById("parentId").value=treeNode.pId;
parent.document.getElementById("name").value=treeNode.name;
$("#coagencyId").attr("value",treeNode.id);
$("#parentId").attr("value",treeNode.pId);
}else{
// 取消选中 把值置空
$("#coagencyId").attr("value",null);
$("#parentId").attr("value",null);
}
return (treeNode.click != false);
}
// 鼠标解除节点的方法
function onClick(event, treeId, treeNode, clickFlag) {
// 默认执行的方法 显示节点的详细信息
parent.showCoagencyDetail();
}
// 异步加载需要是函数
function filter(treeId, parentNode, childNodes) {
if (!childNodes) return null;
for (var i=0; i<childNodes.length; i++) {
childNodes[i].name = childNodes[i].name.replace(/\.n/g, '.');
}
return childNodes;
}
// 异步加载需要是函数
function beforeAsync(treeId, treeNode) {
return treeNode ? treeNode.level < 5 : true;
}
// 初始化树
$(document).ready(function(){
$.fn.zTree.init($("#coagencyTree"),settingOther);
});
</SCRIPT>
<!-- 树节点id -->
<s:hidden name="coagencyForm.coagencyId" id="coagencyId"/>
<!-- 树节点 父id -->
<s:hidden name="coagencyForm.parentId" id="parentId"/>
<div class="zTreeDemoBackground left">
<ul id="coagencyTree" class="ztree" style="height: 640px"></ul>
</div>
华山资源网 Design By www.eoogi.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
华山资源网 Design By www.eoogi.com

RTX 5090要首发 性能要翻倍!三星展示GDDR7显存

三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。

首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。

据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。