CustomSearchShare.jsp
11.1 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
<%@page import="weaver.formmode.virtualform.VirtualFormHandler"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ include file="/systeminfo/init_wev8.jsp" %>
<%@ include file="/formmode/pub_detach.jsp"%>
<jsp:useBean id="RecordSet" class="weaver.conn.RecordSet" scope="page" />
<jsp:useBean id="FormModeRightInfo" class="weaver.formmode.search.FormModeRightInfo" scope="page" />
<HTML><HEAD>
<LINK href="/css/Weaver_wev8.css" type=text/css rel=STYLESHEET>
<style>
*{
font: 12px Microsoft YaHei;
}
.e8_tblForm{
width: 100%;
margin: 0 0;
border-collapse: collapse;
}
.e8_tblForm .e8_tblForm_label{
vertical-align: top;
border-bottom: 1px solid #e6e6e6;
padding: 5px 2px;
}
.e8_tblForm .e8_tblForm_field{
border-bottom: 1px solid #e6e6e6;
padding: 5px 7px;
background-color: #f8f8f8;
}
.e8_label_desc{
color: #aaa;
}
</style>
<script language=javascript src="/js/weaver_wev8.js"></script>
</head>
<%
if(!HrmUserVarify.checkUserRight("FORMMODEAPP:ALL", user)){
response.sendRedirect("/notice/noright.jsp");
return;
}
int pageid = Util.getIntValue(request.getParameter("id"),0);
String imagefilename = "/images/hdMaintenance_wev8.gif";
//自定义查询:权限设置
String titlename = SystemEnv.getHtmlLabelName(20773,user.getLanguage()) + ":" + SystemEnv.getHtmlLabelName(16526,user.getLanguage());
String needfav ="";
String needhelp ="";
String subCompanyIdsql = "SELECT b.subcompanyid FROM mode_customsearch a,modeTreeField b WHERE a.appid=b.id AND a.id="+pageid;
RecordSet recordSet = new RecordSet();
recordSet.executeSql(subCompanyIdsql);
int subCompanyId = -1;
if(recordSet.next()){
subCompanyId = recordSet.getInt("subCompanyId");
}
String userRightStr = "FORMMODEAPP:ALL";
Map rightMap = getCheckRightSubCompanyParam(userRightStr,user,fmdetachable, subCompanyId,"",request,response,session);
int operatelevel = Util.getIntValue(Util.null2String(rightMap.get("operatelevel")),-1);
subCompanyId = Util.getIntValue(Util.null2String(rightMap.get("subCompanyId")),-1);
%>
<%@ include file="/systeminfo/TopTitle_wev8.jsp" %>
<BODY>
<%@ include file="/systeminfo/RightClickMenuConent_wev8.jsp" %>
<%
//RCMenu += "{"+SystemEnv.getHtmlLabelName(1290,user.getLanguage())+",javascript:doback(this),_top} " ;//返回
//RCMenuHeight += RCMenuHeightStep ;
%>
<%@ include file="/systeminfo/RightClickMenu_wev8.jsp" %>
<%
int formId = Util.getIntValue(Util.null2String(request.getParameter("formId")));
int modeId = Util.getIntValue(Util.null2String(request.getParameter("modeId")));
String norightlist=Util.toScreen(Util.null2String(request.getParameter("norightlist")),user.getLanguage());
FormModeRightInfo.setUser(user);
FormModeRightInfo.setPageid(pageid);
Map allRightMap = FormModeRightInfo.getAllRightList(); //所有权限
List viewRightList = FormModeRightInfo.getViewRightList(); //查看权限
List monitorRightList = FormModeRightInfo.getMonitorRightList();//监控权限
List editRightList = FormModeRightInfo.getEditRightList();//批量修改权限
%>
<FORM id=weaver name=weaver action="ModeCommonRightOperation.jsp" method=post>
<input type=hidden name="method" value="addNew">
<input type=hidden name=pageid value="<%=pageid %>">
<input type=hidden name=formId value="<%=formId %>">
<input type=hidden name=modeId value="<%=modeId %>">
<input type=hidden name=mainids >
<table class="e8_tblForm">
<tr><td colspan="2" style="height:8px;"></td></tr>
<TR>
<td colspan="2" style="padding-bottom: 8px;color: #888888;">
<%=SystemEnv.getHtmlLabelName(31851,user.getLanguage())%><!-- 在此页面设置查看或监控权限后,模块中设置的共享或监控权限将不能访问对应的菜单页面 -->
</td>
</TR>
<tr><td colspan="2" style="border-bottom:1px solid #e6e6e6;"></td></tr>
<TR>
<td style="font-weight: bold;"><%=SystemEnv.getHtmlLabelName(18932,user.getLanguage())%></td><!-- 查看权限 -->
<td align=right>
<%if(operatelevel>1){%>
<input type="checkbox" name="chkPermissionAll1" onclick="chkAllClick(this,1)">(<%=SystemEnv.getHtmlLabelName(2241,user.getLanguage())%>)<!-- 全部选中 -->
<%} %>
<%if(operatelevel>0){%>
<a href="CustomSearchShareAdd.jsp?righttype=1&pageid=<%=pageid%>&formId=<%=formId%>&modeId=<%=modeId%>"><%=SystemEnv.getHtmlLabelName(611,user.getLanguage())%></a><!-- 添加 -->
<%} %>
<%if(operatelevel>1){%>
<a href="javascript:void(0);" onclick="javaScript:doDelShare(1);"><%=SystemEnv.getHtmlLabelName(91,user.getLanguage())%></a> <!-- 删除 -->
<%} %>
</td>
</TR>
<tr><td colspan="2" style="border-bottom:1px solid #e6e6e6;"></td></tr>
<%
Map datamap = null;
for(int i=0 ;i < viewRightList.size();i++){
datamap = (Map)viewRightList.get(i);
String rightid = (String)datamap.get("rightId");
String sharetypetext = (String)datamap.get("sharetypetext");
String detailText = (String)datamap.get("detailText");
%>
<tr>
<td class="e8_tblForm_label" width="20%"><input type="checkbox" name="rightid1" id="rightid1" value="<%=rightid %>"></td>
<td class="e8_tblForm_field"><%=sharetypetext %> <%=detailText%></td>
</tr>
<%
}
%>
<tr><td colspan="2" style="height:8px;"></td></tr>
<TR style="display: <%=VirtualFormHandler.isVirtualForm(formId)?"none":""%>">
<td style="font-weight: bold;"><%=SystemEnv.getHtmlLabelName(20305,user.getLanguage())%></td><!-- 监控权限 -->
<td align=right>
<%if(operatelevel>1){%>
<input type="checkbox" name="chkPermissionAll4" onclick="chkAllClick(this,4)">(<%=SystemEnv.getHtmlLabelName(2241,user.getLanguage())%>)<!-- 全部选中 -->
<%} %>
<%if(operatelevel>0){%>
<a href="CustomSearchShareAdd.jsp?righttype=4&pageid=<%=pageid%>&formId=<%=formId%>&modeId=<%=modeId%>"><%=SystemEnv.getHtmlLabelName(611,user.getLanguage())%></a><!-- 添加 -->
<%} %>
<%if(operatelevel>1){%>
<a href="javascript:void(0);" onclick="javaScript:doDelShare(4);"><%=SystemEnv.getHtmlLabelName(91,user.getLanguage())%></a> <!-- 删除 -->
<%} %>
</td>
</TR>
<tr style="display: <%=VirtualFormHandler.isVirtualForm(formId)?"none":""%>"><td colspan="2" style="border-bottom:1px solid #e6e6e6;"></td></tr>
<%
for(int i=0 ;i < monitorRightList.size();i++){
datamap = (Map)monitorRightList.get(i);
String rightid = (String)datamap.get("rightId");
String sharetypetext = (String)datamap.get("sharetypetext");
String detailText = (String)datamap.get("detailText");
%>
<tr>
<td class="e8_tblForm_label" width="20%"><input type="checkbox" name="rightid4" id="rightid4" value="<%=rightid %>"></td>
<td class="e8_tblForm_field"><%=sharetypetext %> <%=detailText%></td>
</tr>
<%
}
%>
<tr><td colspan="2" style="height:8px;"></td></tr>
<TR style="display: <%=VirtualFormHandler.isVirtualForm(formId) || "1".equals(norightlist)?"none":""%>">
<td style="font-weight: bold;"><%=SystemEnv.getHtmlLabelNames("25465,385",user.getLanguage())%></td><!-- 批量修改 -->
<td align=right>
<%if(operatelevel>1){%>
<input type="checkbox" name="chkPermissionAll2" onclick="chkAllClick(this,2)">(<%=SystemEnv.getHtmlLabelName(2241,user.getLanguage())%>)<!-- 全部选中 -->
<%} %>
<%if(operatelevel>0){%>
<a href="CustomSearchShareAdd.jsp?righttype=2&pageid=<%=pageid%>&formId=<%=formId%>&modeId=<%=modeId%>"><%=SystemEnv.getHtmlLabelName(611,user.getLanguage())%></a><!-- 添加 -->
<%} %>
<%if(operatelevel>1){%>
<a href="javascript:void(0);" onclick="javaScript:doDelShare(2);"><%=SystemEnv.getHtmlLabelName(91,user.getLanguage())%></a> <!-- 删除 -->
<%} %>
</td>
</TR>
<tr style="display: <%=VirtualFormHandler.isVirtualForm(formId) || "1".equals(norightlist)?"none":""%>"><td colspan="2" style="border-bottom:1px solid #e6e6e6;"></td></tr>
<%
for(int i=0 ;i < editRightList.size();i++){
datamap = (Map)editRightList.get(i);
String rightid = (String)datamap.get("rightId");
String sharetypetext = (String)datamap.get("sharetypetext");
String detailText = (String)datamap.get("detailText");
%>
<tr style="display: <%=VirtualFormHandler.isVirtualForm(formId) || "1".equals(norightlist)?"none":""%>">
<td class="e8_tblForm_label" width="20%"><input type="checkbox" name="rightid2" id="rightid2" value="<%=rightid %>"></td>
<td class="e8_tblForm_field"><%=sharetypetext %> <%=detailText%></td>
</tr>
<%
}
%>
</TBODY>
</TABLE>
</form>
<script language="javascript">
$(document).ready(function(){//onload事件
$(".loading", window.parent.document).hide(); //隐藏加载图片
})
function onSave(){
weaver.submit();
}
function chkAllClick(obj,types){
var chks = document.getElementsByName("rightid"+types);
for (var i=0;i<chks.length;i++){
var chk = chks[i];
changeCheckboxStatus(chk, obj.checked);
}
}
function doback(){
location.href = "/formmode/search/CustomSearchEdit.jsp?id=<%=pageid%>";
}
function doDelShare(type){
var mainids = "";
var chks = document.getElementsByName("rightid"+type);
for (var i=0;i<chks.length;i++){
var chk = chks[i];
if(chk.checked)
mainids = mainids + "," + chk.value;
}
if(mainids == '') {
window.top.Dialog.alert("<%=SystemEnv.getHtmlLabelName(22346,user.getLanguage())%>",function(){displayAllmenu();});//请选择要删除的信息
return false;
}else{
window.top.Dialog.confirm("<%=SystemEnv.getHtmlNoteName(7,user.getLanguage())%>",function(){
weaver.method.value="delete";
weaver.mainids.value=mainids;
weaver.action="CustomShareOperation.jsp";
weaver.submit();
});
}
}
function onSelectChange(obj1,obj2){
var selectValue = obj1.value;
if (selectValue!=99) obj2.style.display="";
else obj2.style.display="none";
}
</script>
</BODY></HTML>