organizationTree.jsp
4.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<%@ page language="java" contentType="text/html; charset=GBK" %>
<%@ page import="weaver.general.Util" %>
<%@ page import="java.util.*" %>
<%@ include file="/systeminfo/init.jsp" %>
<jsp:useBean id="DepartmentComInfo" class="weaver.hrm.company.DepartmentComInfo" scope="page" />
<jsp:useBean id="RoleComInfo" class="weaver.hrm.roles.RolesComInfo" scope="page" />
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="SubCompanyComInfo" class="weaver.hrm.company.SubCompanyComInfo" scope="page" />
<jsp:useBean id="CompanyComInfo" class="weaver.hrm.company.CompanyComInfo" scope="page" />
<HTML><HEAD>
<LINK REL=stylesheet type=text/css HREF=/css/Weaver.css>
<link href="/css/deepTree.css" rel="stylesheet" type="text/css">
</HEAD>
<%
int uid=user.getUID();
int tabid=0;
String nodeid=null;
%>
<BODY onload="initTree()">
<%@ include file="/systeminfo/RightClickMenuConent.jsp" %>
<%@ include file="/systeminfo/RightClickMenu.jsp" %>
<script>
rightMenu.style.visibility='hidden'
</script>
<FORM NAME=SearchForm STYLE="margin-bottom:0" action="/hrm/performance/targetPlan/myPlanMain.jsp" method=post target="contentframe">
<table width=100% class="ViewForm" valign="top" height=100%>
<!--######## init tree########-->
<TR>
<td height=100%>
<div id="deeptree" class="deeptree" CfgXMLSrc="/css/TreeConfig.xml" />
<td>
</tr>
</table>
<input class=inputstyle type="hidden" name="resourceids" >
<input class=inputstyle type="hidden" name="tabid" >
<input class=inputstyle type="hidden" name="nodeid" >
<input class=inputstyle type="hidden" name="companyid" >
<input class=inputstyle type="hidden" name="subcompanyid" >
<input class=inputstyle type="hidden" name="departmentid" >
<input class=inputstyle type="hidden" name="hrmid" >
<input class=inputstyle type="hidden" name="objId">
<input class=inputstyle type="hidden" name="type_d" >
<!--########//init tree########-->
</FORM>
<script language="javascript">
function initTree(){
deeptree.init("/hrm/performance/ResourceHrmXML.jsp<%if(nodeid!=null){%>?init=true&nodeid=<%=nodeid%><%}%>");
}
//to use xtree,you must implement top() and showcom(node) functions
function top(){
<%if(nodeid!=null){%>
deeptree.scrollTop=<%=nodeid%>.offsetTop;
deeptree.HighlightNode(<%=nodeid%>.parentElement);
deeptree.ExpandNode(<%=nodeid%>.parentElement);
<%}%>
}
function showcom(node){
}
function check(node){
}
function replaceStr(){
var re=new RegExp("[ ]*[|][^|]*[|]","g")
resourcenames=resourcenames.replace(re,"|")
re=new RegExp("[|][^,]*","g")
resourcenames=resourcenames.replace(re,"")
}
function doSearch(id)
{
//setResourceStr();
//document.all("resourceids").value = resourceids.substring(1) ;
var iframeSrc = parent.document.getElementById("contentframe").src;
if(iframeSrc=="myGoalList.jsp"){
document.SearchForm.action = "/hrm/performance/goal/"+iframeSrc;
}
else if (iframeSrc=="MyPlanMain.jsp")
{
document.SearchForm.action = "/hrm/performance/targetPlan/"+iframeSrc;
}
else if (iframeSrc=="MyReportMain.jsp")
{
document.SearchForm.action = "/hrm/performance/targetReport/"+iframeSrc;
}
else if (iframeSrc=="MyCheckMain.jsp")
{
document.SearchForm.action = "/hrm/performance/targetCheck/"+iframeSrc;
}
//setResourceStr();
//document.all("resourceids").value = resourceids.substring(1) ;
//alert(id);
document.SearchForm.submit();
}
function setCompany(id){
document.all("type_d").value="0" //
document.all("departmentid").value=""
document.all("subcompanyid").value=""
document.all("companyid").value=id
document.all("objId").value=id
document.all("tabid").value=0
doSearch(id)
}
function setSubcompany(nodeid){
document.all("type_d").value="1" //ֲ
subid=nodeid.substring(nodeid.lastIndexOf("_")+1)
document.all("companyid").value=""
document.all("departmentid").value=""
document.all("subcompanyid").value=subid
document.all("objId").value=subid
document.all("tabid").value=0
document.all("nodeid").value=nodeid
doSearch(subid)
}
function setDepartment(nodeid){
document.all("type_d").value="2" //
deptid=nodeid.substring(nodeid.lastIndexOf("_")+1)
document.all("subcompanyid").value=""
document.all("companyid").value=""
document.all("departmentid").value=deptid
document.all("objId").value=deptid
document.all("tabid").value=0
document.all("nodeid").value=nodeid
doSearch(deptid)
}
function setHrm(nodeid){
document.all("type_d").value="3" //Դ
hrmid=nodeid.substring(nodeid.lastIndexOf("_")+1)
document.all("subcompanyid").value=""
document.all("companyid").value=""
document.all("departmentid").value=""
document.all("hrmid").value=hrmid
document.all("objId").value=hrmid
document.all("tabid").value=0
document.all("nodeid").value=nodeid
doSearch(hrmid)
}
</script>
</BODY>
</HTML>