apzl_leasing/WebContent/Tenwa/Core/DocConfig/LBDocConfigRelation.jsp
2018-06-03 22:26:41 +08:00

97 lines
2.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@ page contentType="text/html; charset=GBK"%>
<%@ page import="com.tenwa.doc.util.DocListUtil" %>
<%@
include file="/IncludeBegin.jsp"%>
<%
String id=CurPage.getAttribute("id");
String relation=DocListUtil.getRelation(id);
String treeid=DocListUtil.getSelectTree(relation);
//定义Treeview
OHTMLTreeView tviTemp = new OHTMLTreeView(CurPage, "选择资料清单","right");
tviTemp.MultiSelect = true;//设置树图为多选
//通过insertFolder和insertPage生成树图
DocListUtil.initTree(tviTemp);
String sButtons[][] = {
{"true","","Button","确定","","save(getBottomCheckItems())","","","",""},
};
%>
<html>
<body style="overflow: hidden;">
<table width=100% height=100% cellspacing="0" cellpadding="0" border="0">
<tr style="height: 30px;">
<td><%@ include file="/Frame/resources/include/ui/include_buttonset_dw.jspf"%></td>
</tr>
<tr>
<td id="myleft" align=center width=100%><iframe name="left" src="" width=100% height=100% frameborder=0 scrolling=no ></iframe></td>
</tr>
</table>
</body>
</html>
<script type="text/javascript">
window.onload=function(){
initTreeView();
var relation="<%=relation%>";
relation=relation.split(",");
for(var r in relation){
setCheckTVItem(relation[r], true);
}
var treeid="<%=relation%>";
treeid=treeid.split(",");
for(var t in treeid){
expandNode(treeid[t]);
}
}
function save(nodes){
var str="";
for(var o in nodes){
str+=nodes[o].id+"@";
}
if(str.length>0){
str=str.substring(0,str.length-1);
}
var sParams="configid=<%=id%>,relationid="+str;
var sReturnInfo = RunJavaMethodTrans("com.tenwa.doc.action.DocListAction","updateRelation",sParams);
parent.AsDialog.ClosePage(sReturnInfo);
}
function TreeViewOnClick(){
var node = getCurTVItem();
var str = "";
for(var o in node){
str += o + " = " + node[o] + "\n";
}
//alert(str);
}
function testChecked(nodes){
if(nodes.length < 1){
alert("未选择节点");
return;
}
var str = "";
for(var i = 0; i < nodes.length; i++){
if(i != 0) str += "";
str += nodes[i].name;
}
//alert("您选择了节点【"+str+"】,共【"+nodes.length+"】个记录")
}
function initTreeView(){
<%=tviTemp.generateHTMLTreeView()%>
//expandNode('root');
//expandNode('1');
//expandNode('2');
}
//initTreeView();
//setCheckTVItem('211', true);
</script>
<%@ include file="/IncludeEnd.jsp"%>