-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshareRole.html
263 lines (208 loc) · 9.8 KB
/
shareRole.html
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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="myplugs/css/checkbox.css">
</head>
<body>
<div class="panel panel-default" style="margin: 40px;padding-top: 50px;">
<div class="panel-header">
分配权限
</div>
<div class="panel-body">
<div id="dvpagecontent" style="padding: 10px; width: 80%; margin: 0px auto;">
<div class="content-box">
<div class="content-box-content">
<form action="sysfun/shareSysfun.action" method="post">
<input name="roleId" value="201" type="hidden">
<div style="overflow: hidden; margin: 20px auto;">
<span class="parentChk spcheckboxCheck">
<input value="1" checked="checked" name="sysfunids" class="subchk" type="checkbox"> <label class="labelfor">
人事管理
</label> </span>
<div style="margin: 40px auto 10px 30px; clear: both; overflow: hidden;width:800px;">
<div style="width: 195px; padding 5px; float: left;">
<span class="childChk spcheckboxCheck">
<input checked="checked" value="3" name="sysfunids" class="subchk" type="checkbox"> <label class="labelfor">
部门管理
</label> </span>
</div>
<div style="float: left; margin: 5px; border-right: 1px solid #efefef; padding: 10px;">
</div>
<div style="width: 195px; padding 5px; float: left;">
<span class="childChk spcheckboxCheck">
<input checked="checked" value="4" name="sysfunids" class="subchk" type="checkbox"> <label class="labelfor">
员工管理
</label> </span>
</div>
<div style="float: left; margin: 5px; border-right: 1px solid #efefef; padding: 10px;">
</div>
</div>
</div>
<div style="overflow: hidden; margin: 20px auto;">
<span class="parentChk spcheckboxCheck">
<input value="5" checked="checked" name="sysfunids" class="subchk" type="checkbox"> <label class="labelfor">
日程管理
</label> </span>
<div style="margin: 40px auto 10px 30px; clear: both; overflow: hidden;width:800px;">
<div style="width: 195px; padding 5px; float: left;">
<span class="childChk spcheckboxCheck">
<input checked="checked" value="6" name="sysfunids" class="subchk" type="checkbox"> <label class="labelfor">
我的日程
</label> </span>
</div>
<div style="float: left; margin: 5px; border-right: 1px solid #efefef; padding: 10px;">
</div>
<div style="width: 195px; padding 5px; float: left;">
<span class="childChk spcheckboxCheck">
<input checked="checked" value="7" name="sysfunids" class="subchk" type="checkbox"> <label class="labelfor">
部门日程
</label> </span>
</div>
<div style="float: left; margin: 5px; border-right: 1px solid #efefef; padding: 10px;">
</div>
</div>
</div>
<div style="overflow: hidden; margin: 20px auto;">
<span class="parentChk spcheckboxCheck">
<input value="9" checked="checked" name="sysfunids" class="subchk" type="checkbox"> <label class="labelfor">
系统管理
</label> </span>
<div style="margin: 40px auto 10px 30px; clear: both; overflow: hidden;width:800px;">
<div style="width: 195px; padding 5px; float: left;">
<span class="childChk spcheckboxCheck">
<input checked="checked" value="10" name="sysfunids" class="subchk" type="checkbox"> <label class="labelfor">
角色管理
</label> </span>
</div>
<div style="float: left; margin: 5px; border-right: 1px solid #efefef; padding: 10px;">
</div>
<div style="width: 195px; padding 5px; float: left;">
<span class="childChk spcheckboxCheck">
<input checked="checked" value="11" name="sysfunids" class="subchk" type="checkbox"> <label class="labelfor">
登录日志
</label> </span>
</div>
<div style="float: left; margin: 5px; border-right: 1px solid #efefef; padding: 10px;">
</div>
</div>
</div>
<div style="overflow: hidden; margin: 20px auto;">
<span class="parentChk spcheckboxCheck">
<input value="14" checked="checked" name="sysfunids" class="subchk" type="checkbox"> <label class="labelfor">
考勤管理
</label> </span>
<div style="margin: 40px auto 10px 30px; clear: both; overflow: hidden;width:800px;">
<div style="width: 195px; padding 5px; float: left;">
<span class="childChk spcheckboxCheck">
<input checked="checked" value="15" name="sysfunids" class="subchk" type="checkbox"> <label class="labelfor">
考勤统计
</label> </span>
</div>
<div style="float: left; margin: 5px; border-right: 1px solid #efefef; padding: 10px;">
</div>
<div style="width: 195px; padding 5px; float: left;">
<span class="childChk spcheckboxCheck">
<input checked="checked" value="16" name="sysfunids" class="subchk" type="checkbox"> <label class="labelfor">
考勤历史记录
</label> </span>
</div>
<div style="float: left; margin: 5px; border-right: 1px solid #efefef; padding: 10px;">
</div>
</div>
</div>
<div style="overflow: hidden; margin: 20px auto;">
<span class="parentChk spcheckboxCheck">
<input value="21" checked="checked" name="sysfunids" class="subchk" type="checkbox"> <label class="labelfor">
消息传递
</label> </span>
<div style="margin: 40px auto 10px 30px; clear: both; overflow: hidden;width:800px;">
<div style="width: 195px; padding 5px; float: left;">
<span class="childChk spcheckboxCheck">
<input checked="checked" value="22" name="sysfunids" class="subchk" type="checkbox"> <label class="labelfor">
消息管理
</label> </span>
</div>
<div style="float: left; margin: 5px; border-right: 1px solid #efefef; padding: 10px;">
</div>
<div style="width: 195px; padding 5px; float: left;">
<span class="childChk spcheckboxCheck">
<input checked="checked" value="23" name="sysfunids" class="subchk" type="checkbox"> <label class="labelfor">
信箱
</label> </span>
</div>
<div style="float: left; margin: 5px; border-right: 1px solid #efefef; padding: 10px;">
</div>
</div>
</div>
<input style="display: inline-block; margin-bottom: 0; padding: .5em 1em; vertical-align: middle; font-size: 1.0rem; font-weight: 400; line-height: 1.2; text-align: center; white-space: nowrap; background-image: none; border: 1px solid transparent; border-radius: 0; color: #fff; background-color: #5eb95e; border-color: #5eb95e;" value="分配权限" type="submit">
</form>
</div>
</div>
</div>
</div>
</div>
</body>
<script src="js/jquery-1.11.3.min.js"></script>
<script type="text/javascript">
$(function() {
//父级选中 子集联动
$(".parentChk")
.click(function() {
if(!$(this).hasClass("spcheckbox")) { //如果取消
$(this).next().find(".childChk,.childchildChk").removeClass(
"spcheckboxCheck");
$(this).next().find(".childChk,.childchildChk").addClass("spcheckbox");
$(this).next().find(".subchk").removeAttr("checked");
$(this).removeClass("spcheckboxCheck");
$(this).addClass("spcheckbox");
$(this).children(0).removeAttr("checked");
} else {
$(this).next().find(".childChk,.childchildChk").removeClass(
"spcheckbox");
$(this).next().find(".childChk,.childchildChk").addClass(
"spcheckboxCheck");
$(this).next().find(".subchk").attr("checked",
"checked");
$(this).removeClass("spcheckbox");
$(this).addClass("spcheckboxCheck");
$(this).children(0).attr("checked", "checked");
}
});
$(".childChk").click(function() {
if($(this).hasClass("spcheckbox")) { //如果子元素取消选中
var part = $(this).parent().parent();
part.siblings().removeClass("spcheckbox");
part.siblings().addClass("spcheckboxCheck");
part.siblings().find(".subchk").attr("checked", "checked");
$(this).removeClass("spcheckbox");
$(this).addClass("spcheckboxCheck");
$(this).children(0).attr("checked", "checked");
} else {
var part = $(this).parent().parent();
$(this).removeClass("spcheckboxCheck");
$(this).addClass("spcheckbox");
$(this).children(0).removeAttr("checked");
if(part.find(".spcheckboxCheck").length == 0) {
part.siblings().removeClass("spcheckboxCheck");
part.siblings().addClass("spcheckbox");
part.siblings().find(".subchk").removeAttr("checked");
}
}
}); //---------------//子集选中或者取消 父级联动选中或者取消
$(".childchildChk").click(function() {
if($(this).hasClass("spcheckbox")) {
var part = $(this).parent().parent();
$(this).removeClass("spcheckbox");
$(this).addClass("spcheckboxCheck");
$(this).children(0).attr("checked", "checked");
} else {
$(this).removeClass("spcheckboxCheck");
$(this).addClass("spcheckbox");
$(this).children(0).removeAttr("checked");
}
});
});
</script>
</html>