buttonrights_list_r.jsp
5.54 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
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
<base href="<%=basePath%>">
<!-- jsp文件头和头部 -->
<%@ include file="../index/top.jsp"%>
</head>
<body class="no-skin">
<!-- /section:basics/navbar.layout -->
<div class="main-container" id="main-container">
<!-- /section:basics/sidebar -->
<div class="main-content">
<div class="main-content-inner">
<div class="page-content">
<div class="row">
<div class="col-xs-12">
<table style="margin-top: 8px;">
<tr height="35">
<td style="width:50px;">角色组:</td>
<c:choose>
<c:when test="${not empty roleList}">
<!-- 角色组循环 -->
<c:forEach items="${roleList}" var="role" varStatus="vs">
<td style="width:100px;" class="center" <c:choose><c:when test="${pd.ROLE_ID == role.ROLE_ID}">bgcolor="#FFC926" onMouseOut="javascript:this.bgColor='#FFC926';"</c:when><c:otherwise>bgcolor="#E5E5E5" onMouseOut="javascript:this.bgColor='#E5E5E5';"</c:otherwise></c:choose> onMouseMove="javascript:this.bgColor='#FFC926';" >
<a href="buttonrights/list.do?ROLE_ID=${role.ROLE_ID }" style="text-decoration:none; display:block;"><i class="menu-icon fa fa-users"></i><font color="#666666">${role.ROLE_NAME }</font></a>
</td>
<td style="width:5px;"></td>
</c:forEach>
</c:when>
<c:otherwise>
<tr>
<td colspan="100">没有相关数据</td>
</tr>
</c:otherwise>
</c:choose>
<td></td>
</tr>
</table>
<div style="overflow-x: scroll; scrolling: auto;width: 100%;">
<table id="dynamic-table" class="table table-striped table-bordered table-hover" style="margin-top:7px;">
<thead>
<tr>
<th class="center" style="width: 50px;">序号</th>
<th class='center'>按钮名称</th>
<c:if test="${QX.edit == 1 }">
<!-- 角色循环 -->
<c:forEach items="${roleList_z}" var="var" varStatus="vs">
<th class='center'>${var.ROLE_NAME }</th>
</c:forEach>
</c:if>
</tr>
</thead>
<c:choose>
<c:when test="${not empty buttonlist}">
<c:if test="${QX.cha == 1 }">
<!-- 按钮循环 -->
<c:forEach items="${buttonlist}" var="fhbutton" varStatus="vsb">
<tr>
<td class='center' style="width:30px;">${vsb.index+1}</td>
<td class='center' >${fhbutton.NAME }</td>
<c:if test="${QX.edit == 1 }">
<!-- 角色循环 -->
<c:forEach items="${roleList_z}" var="var" varStatus="vs">
<!-- 关联表循环 -->
<c:forEach items="${roleFhbuttonlist}" var="varRb" varStatus="vsRb">
<c:if test="${var.ROLE_ID == varRb.ROLE_ID && fhbutton.FHBUTTON_ID == varRb.BUTTON_ID }">
<c:set value="1" var="rbvalue"></c:set>
</c:if>
</c:forEach>
<td class='center' style="height: 20px;">
<label>
<input name="switch-field-1" onclick="upRb('${var.ROLE_ID}','${fhbutton.FHBUTTON_ID}')" class="ace ace-switch ace-switch-3" type="checkbox" <c:if test="${rbvalue == 1 }">checked="checked"</c:if> >
<span class="lbl"></span>
</label>
</td>
<c:set value="0" var="rbvalue"></c:set>
</c:forEach>
</c:if>
</tr>
</c:forEach>
</c:if>
<c:if test="${QX.cha == 0 }">
<tr>
<td colspan="100" class="center">您无权查看</td>
</tr>
</c:if>
</c:when>
<c:otherwise>
<tr>
<td colspan="100" class="center" >没有相关数据</td>
</tr>
</c:otherwise>
</c:choose>
</table>
</div>
<div class="page-header position-relative">
<table style="width:100%;">
<tr>
<td style="vertical-align:top;">
<c:if test="${QX.cha == 1 }">
<a class="btn btn-mini btn-success" onclick="window.location.href='<%=basePath%>buttonrights/list.do';">切换视图</a>
</c:if>
</td>
</tr>
</table>
</div>
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</div>
<!-- /.page-content -->
</div>
</div>
<!-- /.main-content -->
<!-- 返回顶部 -->
<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
<i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
</a>
</div>
<!-- /.main-container -->
<!-- basic scripts -->
<!-- 页面底部js¨ -->
<%@ include file="../index/foot.jsp"%>
<!-- ace scripts -->
<script src="static/ace/js/ace/ace.js"></script>
<!-- inline scripts related to this page -->
<script type="text/javascript">
$(top.hangge());
//处理按钮点击
function upRb(ROLE_ID,FHBUTTON_ID){
$.ajax({
type: "POST",
url: "<%=basePath%>buttonrights/upRb.do?ROLE_ID="+ROLE_ID+"&BUTTON_ID="+FHBUTTON_ID+"&guid="+new Date().getTime(),
data: encodeURI(""),
dataType:'json',
//beforeSend: validateData,
cache: false,
success: function(data){
}
});
}
</script>
</body>
</html>