funcintegration.jsp
14.3 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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
<%@ page language="java" contentType="text/html; charset=UTF-8"%>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<%@ page import="com.weaver.upgrade.FunctionUpgradeUtil" %>
<%@ page import="weaver.system.License" %>
<%@ page import="weaver.systeminfo.menuconfig.*" %>
<%@ page import="weaver.conn.RecordSet"%>
<%@ page import="java.lang.reflect.Method" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><%=SystemEnv.getHtmlLabelName(32213,user.getLanguage()) %></title><!-- 功能集成 -->
<style type="text/css">
html,body,ul,li,ol,dl,dd,dt,form,table,tr,td,p,b,span,a,img,h1,h2,h3,h4,h5,h6,em,input,select,option,textarea,div{margin:0;padding:0;}
body{font-family:Microsoft Yahei; font-size:12px;background:#f7f7fa;background-color: #f7f7fa;}
h1,h2,h3,h4,h5,h6{line-height:100%;}
a{ color:#666; text-decoration:none;}
.fl{ float:left}
.fr{ float:right;}
li{list-style:none;}
img{border:none;}
.clear{clear:both;}
p{ font-size:12px; color:#666;}
.lable th{ width:70px; text-align:right;}
.contenta{ background: url(../images/contenta_wev8.gif) repeat-x; height:132px; width:100%;margin:0px auto; padding-top:20px; padding-bottom:20px;}
ul li{
cursor:hand;
width:191px; height:100px;
float:left;
margin-top:10px;margin-left: 10px;
}
.content{
height:100px;
text-align:left;
vertical-align:bottom;
font-family:"微软雅黑"!important;
font-size:12px;
color:white;
font-weight:bold;
position:relative;
cursor:pointer!important;cursor:hand;
}
.content span{
width:100%;
height:24px;
vertical-align:bottom;
text-align:center;
bottom:0px;
padding:5px 0px 0px 0px;
margin:0px;
color:white;
position:absolute;
cursor:pointer!important;cursor:hand;
}
</style>
</head>
<body onload='resetDiv();'>
<div id='content' style="width:100%; margin:0px auto;text-align:center;position:absolute;">
<ul style="width:862px;margin:0px auto;text-align:center;">
<%
String sysCId = new License().getCId();
MenuUtil mu=new MenuUtil("top", 3,user.getUID(),user.getLanguage()) ;
mu.setUser(user);
//rs.executeSql("SELECT m.id,m.labelId,m.linkAddress FROM MainMenuInfo m where m.parentId = 10110 and not exists(select 1 from menucontrollist i where m.id=i.menuid and i.isopen=-1) ORDER BY m.defaultIndex asc");
//rs.executeSql("SELECT * FROM MainMenuInfo m where m.parentId = 10110 ORDER BY m.defaultIndex asc");
ArrayList menuIds = new ArrayList();
RecordSet rs=mu.getMenuRs(10110);
while(rs.next())
{
int infoid=rs.getInt("infoid");
if(menuIds.contains(String.valueOf(infoid))){
continue;
}
menuIds.add(String.valueOf(infoid));
int menuid = rs.getInt("id");
int needResourcetype=rs.getInt("resourcetype");
int needResourceid=rs.getInt("resourceid");
if(!mu.hasShareRight(infoid,needResourceid,needResourcetype)){
continue;
}
boolean _needRightToVisible = rs.getString("needRightToVisible").equals("1") ? true : false;
boolean _needSwitchToVisible = rs.getString("needSwitchToVisible").equals("1") ? true : false;
String _rightDetailToVisible = rs.getString("rightDetailToVisible");
String _switchMethodNameToVisible = rs.getString("switchMethodNameToVisible");
int _relatedModuleId = rs.getInt("relatedModuleId");
String visibility = isDisplay(_needRightToVisible,_needSwitchToVisible,_rightDetailToVisible,_switchMethodNameToVisible,_relatedModuleId,user);
if("hidden".equals(visibility)) {
continue;
}
// int resMenuId = FunctionUpgradeUtil.getMenuId(menuid, Integer.parseInt(sysCId));
// int isopen = FunctionUpgradeUtil.getMenuStatus(menuid, -1, Integer.parseInt(sysCId));
// //System.out.println("resMenuId:"+resMenuId);
// //System.out.println("isopen:"+isopen);
// rs2.executeSql("select 1 from menucontrollist i where i.menuid="+resMenuId+" and i.isopen="+isopen);
// if(rs2.next()) {
// continue;
// }
String linkAddress = Util.null2String(rs.getString("linkAddress")).trim();
int lableid = rs.getInt("lableid");
/*
/integration/integrationTab.jsp?urlType=3 数据源设置
/integration/integrationTab.jsp?urlType=1 WebService注册
/integration/integrationTab.jsp?urlType=6 集成登录
/integration/integrationTab.jsp?urlType=2 LDAP集成
/integration/integrationTab.jsp?urlType=4 HR同步
/integration/integrationTab.jsp?urlType=7 计划任务
/integration/integrationTab.jsp?urlType=8 财务凭证
/integration/icontent.jsp?showtype=12 流程触发集成
/integration/icontent.jsp?showtype=10 流程流转集成
/integration/integrationTab.jsp?urlType=10 数据展现集成
/integration/integrationTab.jsp?urlType=18 IM集成设置
/integration/integrationTab.jsp?urlType=27 WebSEAL集成设置
/integration/integrationTab.jsp?urlType=28 CAS集成设置
/integration/integrationTab.jsp?urlType=100 流程归档集成
/integration/integrationTab.jsp?urlType=101 统一代办中心集成
*/
%>
<%
if(linkAddress.endsWith("urlType=3"))
{
%>
<li style="background:url(images/a1_wev8.png) no-repeat center;background-color:#019AAC;" onclick="toSetting(1);"><div class="content"><span><%=SystemEnv.getHtmlLabelName(32264,user.getLanguage())%></span></div></li>
<%
}
else if(linkAddress.endsWith("urlType=1"))
{
%>
<li style="background:url(images/a12_wev8.png) no-repeat center;background-color:#2C84EE;" onclick="toSetting(17);"><div class="content"><span><%=SystemEnv.getHtmlLabelName(33717,user.getLanguage())%></span></div></li>
<%
}
else if(linkAddress.endsWith("urlType=4"))
{
%>
<li style="background:url(images/a4_wev8.png) no-repeat center;background-color:#009F00;" onclick="toSetting(10);"><div class="content"><span><%=SystemEnv.getHtmlLabelName(33719,user.getLanguage())%></span></div></li>
<%
}
else if(linkAddress.endsWith("urlType=2"))
{
%>
<li style="background:url(images/a3_wev8.png) no-repeat center;background-color:#BE1E4A;" onclick="toSetting(7);"><div class="content"><span><%=SystemEnv.getHtmlLabelName(33718,user.getLanguage())%></span></div></li>
<%
}
else if(linkAddress.endsWith("urlType=6"))
{
%>
<li style="background:url(images/a2_wev8.png) no-repeat center;background-color:#668100;" onclick="toSetting(4);"><div class="content"><span><%=SystemEnv.getHtmlLabelName(20960,user.getLanguage())%></span></div></li>
<!-- li style="background:url(images/a5_wev8.png) no-repeat;background-color:#92D050;" onclick="toSetting(12);"><div class="content">SAP集成</div></li -->
<%
}
else if(linkAddress.endsWith("urlType=7"))
{
%>
<li style="background:url(images/a7_wev8.png) no-repeat center;background-color:#0097AA;" onclick="toSetting(8);"><div class="content"><span><%=SystemEnv.getHtmlLabelName(16539,user.getLanguage())%></span></div></li>
<%
}
else if(linkAddress.endsWith("urlType=8"))
{
%>
<li style="background:url(images/a8_wev8.png) no-repeat center;background-color:#2C84EE;" onclick="toSetting(3);"><div class="content"><span><%=SystemEnv.getHtmlLabelName(32265,user.getLanguage())%></span></div></li>
<%
}
else if(linkAddress.endsWith("showtype=12"))
{
%>
<li style="background:url(images/a9_wev8.png) no-repeat center;background-color:#019AAC;" onclick="toSetting(2);"><div class="content"><span><%=SystemEnv.getHtmlLabelName(33720,user.getLanguage())%></span></div></li>
<%
}
else if(linkAddress.endsWith("showtype=10"))
{
%>
<li style="background:url(images/a10_wev8.png) no-repeat center;background-color:#633EBF;" onclick="toSetting(6);"><div class="content"><span><%=SystemEnv.getHtmlLabelName(32338,user.getLanguage())%></span></div></li>
<%
}
else if(linkAddress.endsWith("urlType=10"))
{
%>
<li style="background:url(images/a11_wev8.png) no-repeat center;background-color:#2C84EE;" onclick="toSetting(9);"><div class="content"><span><%=SystemEnv.getHtmlLabelName(32303,user.getLanguage())%></span></div></li>
<%
}
else if(linkAddress.endsWith("urlType=18"))
{
%>
<li style="background:url(images/a18_wev8.png) no-repeat center;background-color:#668100;" onclick="toSetting(18);"><div class="content"><span><%=SystemEnv.getHtmlLabelName(33387,user.getLanguage())%></span></div></li>
<%
}
else if(linkAddress.endsWith("urlType=100"))
{
//System.out.println("linkAddress==="+linkAddress);
%>
<li style="background:url(images/a100_wev8.png) no-repeat center;background-color:#2C84EE;" onclick="toSetting(100);"><div class="content"><span><%=SystemEnv.getHtmlLabelName(83203,user.getLanguage())%></span></div></li>
<%
}
else if(linkAddress.endsWith("urlType=101"))
{
%>
<li style="background:url(images/a101_wev8.png) no-repeat center;background-color:#BE1E4A;" onclick="toSetting(101);"><div class="content"><span><%=SystemEnv.getHtmlLabelName(127357,user.getLanguage())%></span></div></li>
<%
}
else if(linkAddress.endsWith("urlType=27"))
{
%>
<li style="background:url(images/a27_wev8.png) no-repeat center;background-color:#2C84EE;" onclick="toSetting(27);"><div class="content"><span><%=SystemEnv.getHtmlLabelName(128510,user.getLanguage())%></span></div></li>
<%
}
else if(linkAddress.endsWith("urlType=28"))
{
%>
<li style="background:url(images/a28_wev8.png) no-repeat center;background-color:#009F00;" onclick="toSetting(28);"><div class="content"><span><%=SystemEnv.getHtmlLabelName(128653,user.getLanguage())%></span></div></li>
<%
} else {
boolean useCustomName = rs.getInt("useCustomName") == 1 ? true: false;
String customName = rs.getString("customName");
String customName_e = rs.getString("customName_e");
String customName_t = rs.getString("customName_t");
boolean infoUseCustomName = rs.getInt("infoUseCustomName") == 1 ? true : false;
String infoCustomName = rs.getString("infoCustomName");
String infoCustomName_e = rs.getString("infoCustomName_e");
String infoCustomName_t = rs.getString("infoCustomName_t");
String text = mu.getMenuText(lableid, useCustomName, customName, customName_e, customName_t, infoUseCustomName, infoCustomName, infoCustomName_e,infoCustomName_t,user.getLanguage());
%>
<li style="background:url(images/a8_wev8.png) no-repeat center;background-color:#2C84EE;"
onclick="toUrl('<%=linkAddress%>');">
<div class="content"><span><%=text%></span></div>
</li>
<%
}
}
%>
<!-- li style="background:url(images/a13_wev8.png) no-repeat center;background-color:#DA542E;"><div class="content"><span>ecology集成中心</span></div></li -->
</ul>
</div>
</body>
</html>
<script language="javascript">
function toUrl(url){
document.location = url;
}
function resetDiv()
{
var height = document.body.clientHeight;
//alert(document.getElementById("content").offsetHeight);
if(height>365)
{
document.getElementById("content").style.top = (height-400)/2+"px";
}
}
function toSetting(type)
{
var tourl = "";
if("1"==type)
{
tourl = "/integration/integrationTab.jsp?urlType=3";
}
else if("2"==type)
{
tourl = "/integration/icontent.jsp?showtype=12";
}
else if("3"==type)
{
tourl = "/integration/integrationTab.jsp?urlType=8";
}
else if("4"==type)
{
tourl = "/integration/integrationTab.jsp?urlType=6";
}
else if("5"==type)
{
tourl = "/integration/icontent.jsp?showtype=6&type=1";
}
else if("6"==type)
{
tourl = "/integration/icontent.jsp?showtype=10";
}
else if("7"==type)
{
tourl = "/integration/integrationTab.jsp?urlType=2";
}
else if("8"==type)
{
tourl = "/integration/integrationTab.jsp?urlType=7";
}
else if("9"==type)
{
tourl = "/integration/integrationTab.jsp?urlType=10";
}
else if("10"==type)
{
tourl = "/integration/integrationTab.jsp?urlType=4";
}
else if("11"==type)
{
tourl = "http://www.baidu.com";
}
else if("12"==type)
{
tourl = "/integration/icontent.jsp?type=1&showtype=1";
}
else if("13"==type)
{
tourl = "/integration/icontent.jsp?showtype=2&type=1";
}
else if("14"==type)
{
tourl = "/integration/icontent.jsp?showtype=3&type=1";
}
else if("15"==type)
{
tourl = "/integration/icontent.jsp?showtype=4&type=1";
}
else if("16"==type)
{
tourl = "/integration/icontent.jsp?showtype=5&type=1";
}
else if("17"==type)
{
tourl = "/integration/integrationTab.jsp?urlType=1";
}
else if("18"==type)
{
tourl = "/integration/integrationTab.jsp?urlType=18";
}
else if("100"==type)
{
tourl = "/integration/integrationTab.jsp?urlType=100";
}
else if("101"==type)
{
tourl = "/integration/integrationTab.jsp?urlType=101";
}
else if("27"==type)
{
tourl = "/integration/integrationTab.jsp?urlType=27";
}
else if("28"==type)
{
tourl = "/integration/integrationTab.jsp?urlType=28";
}
document.location = tourl;
}
</script>
<%!
String visibility = "";
private String isDisplay(boolean needRightToVisible,boolean needSwitchToVisible,String rightDetailToVisible,String switchMethodNameToVisible,int relatedModuleId,User user){
visibility = "visible";
//通过开关控制可见
if(needSwitchToVisible){
try {
Class cls = Class.forName("weaver.systeminfo.menuconfig.MenuSwitch");
//some error here, modify by xiaofeng
Method meth = cls.getMethod(switchMethodNameToVisible,new Class[]{User.class });
MenuSwitch methobj = new MenuSwitch();
Object retobj = meth.invoke(methobj,new Object[]{user});
Boolean retval = (Boolean) retobj;
boolean switchToVisible = retval.booleanValue();
//visible = visible&&switchToVisible;
if(!switchToVisible)
visibility = "hidden";
} catch (Throwable e) {
System.err.println(e);
}
}
//通过权限控制菜单可见
if(needRightToVisible){
ArrayList rightDetails = Util.TokenizerString(rightDetailToVisible,"&&");
for(int a=0;a<rightDetails.size();a++){
String rightDetail = (String)rightDetails.get(a);
//visible = visible&&HrmUserVarify.checkUserRight(rightDetail,user);
if(!HrmUserVarify.checkUserRight(rightDetail,user)){
break;
}
}
visibility = "noright";
}
return visibility;
}
%>