peternameyakj
2024-10-15 19d0fd2c0e7860e2d5d075f926df0d190ebb34cc
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
<%@ page language="java" pageEncoding="utf-8" isELIgnored="false"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
 
<%@ include file="include/pagetop.jsp"%>
 
<!DOCTYPE html>
<html>
 
<head>
<%@ include file="include/head.jsp"%>
</head>
 
<body>
 
    <%@ include file="include/loading.jsp"%>
<%--     <%@ include file="include/top.jsp"%> --%>
<%--     <%@ include file="include/menu_left.jsp"%> --%>
 
    <!-- //////////////////////////////////////////////////////////////////////////// -->
    <!-- START CONTENT -->
    <div class="ifr-dody">
 
        <!-- //////////////////////////////////////////////////////////////////////////// -->
        <!-- START CONTAINER -->
        <div class="ifr-con">
            <h3>系统用户管理</h3>
            
            <%@ include file="include/alert.jsp"%>
 
            <!-- //////////////////////////////////////////////////////////////////////////// -->
            <!-- START queryForm -->
            <div class="row">
                <div class="col-md-12">
                    <div class="panel panel-default">
 
                        <div class="panel-title">查询条件</div>
                        <div class="panel-body">
 
                            <form class="form-horizontal"
                                action="<%=basePath%>normal/adminSystemUserAction!list.action" method="post"
                                id="queryForm">
                                
                                <input type="hidden" name="pageNo" id="pageNo" value="${pageNo}">
                                    
                                <div class="col-md-12 col-lg-4">
                                    <fieldset>
                                        <div class="control-group">
                                            <div class="controls">
                                                <!-- <s:textfield id="username_para" name="username_para"
                                                    cssClass="form-control " placeholder="用户名" /> -->
                                                <input id="username_para" name="username_para" class="form-control " placeholder="用户名" value="${username_para}"/>
                                            </div>
                                        </div>
                                    </fieldset>
                                </div>
                                
                                <div class="col-md-12 col-lg-2">
                                    <button type="submit" class="btn btn-light btn-block">查询</button>
                                </div>
                                
                            </form>
 
                        </div>
 
                    </div>
                </div>
            </div>
            <!-- END queryForm -->
            <!-- //////////////////////////////////////////////////////////////////////////// -->
 
            <div class="row">
                <div class="col-md-12">
                    <!-- Start Panel -->
                    <div class="panel panel-default">
 
                        <div class="panel-title">查询结果</div>
                        <a
                            href="<%=basePath%>normal/adminSystemUserAction!toAdd.action?username_para=${username_para}"
                            class="btn btn-light" style="margin-bottom: 10px"><i
                            class="fa fa-pencil"></i>新增系统用户</a>
                            
                        <div class="panel-body">
                            <table class="table table-bordered table-striped">
                            
                                <thead>
                                    <tr>
                                        <td>用户名</td>
                                        <td>角色</td>
                                        <td>邮箱</td>
                                        <td>谷歌验证器</td>
                                        <td>登录权限</td>
                                        <td>备注</td>
                                        <td style="width: 130px;"></td>
                                    </tr>
                                </thead>
                                
                                <tbody>
                                    <!-- <s:iterator value="page.elements" status="stat"> -->
                                    <c:forEach items="${page.getElements()}" var="item" varStatus="stat">
                                        <tr>
                                            <td>${item.username}</td>
                                            <td>
                                                <c:choose>
                                                   <c:when test="${item.id == 'SADMIN'}">
                                                           管理员
                                                   </c:when>
                                                   <c:otherwise>
                                                           ${role_map.get(item.roleName)}
                                                   </c:otherwise>
                                                </c:choose>
                                            </td>
                                            <td>${item.email}</td>
                                            <td>
                                                <c:if test="${item.google_auth_bind}">
                                                    <span class="right label label-success">已绑定</span>                                                
                                                </c:if>
                                                <c:if test="${!item.google_auth_bind}">
                                                    未绑定
                                                </c:if>
                                            </td>
                                            <td>
                                                <c:if test="${item.enabled}">开启</c:if>
                                                <c:if test="${!item.enabled}">
                                                    <span class="right label label-danger">关闭</span>
                                                </c:if>
                                            </td>
                                            <td>${item.remarks}</td>
                                            
                                            <c:if test="${item.id != 'SADMIN'}">
                                                <td>
                                                    <div class="btn-group">
                                                        <button type="button" class="btn btn-light">操作</button>
                                                        <button type="button" class="btn btn-light dropdown-toggle"
                                                            data-toggle="dropdown" aria-expanded="false">
                                                            <span class="caret"></span> 
                                                            <span class="sr-only">Toggle Dropdown</span>
                                                        </button>
                                                        <ul class="dropdown-menu" role="menu">
                                                            <li><a href="<%=basePath%>normal/adminSystemUserAction!toUpdate.action?secAdmin_id=${item.id}&username_para=${username_para}">修改</a></li>
                                                            <li><a href="<%=basePath%>normal/adminSystemUserAction!toUpdatePassword.action?secAdmin_id=${item.id}&username_para=${username_para}">修改密码</a></li>
                                                            <li><a href="<%=basePath%>normal/adminSystemUserAction!toUpdateSafePassword.action?secAdmin_id=${item.id}&username_para=${username_para}">修改资金密码</a></li>
                                                            <li><a href="<%=basePath%>normal/adminGoogleAuthAction!toUpdateGoogleAuth.action?username=${item.username}">谷歌验证器</a></li>
                                                            <li><a href="javascript:del('${item.id}')">删除</a></li>
                                                        </ul>
                                                    </div>
                                                </td>
                                            </c:if>
                                            
                                        </tr>
                                    <!-- </s:iterator> -->
                                    </c:forEach>
                                </tbody>
                                
                            </table>
                            
                            <%@ include file="include/page_simple.jsp"%>
                            
                            <!-- <nav> -->
                        </div>
 
                    </div>
                    <!-- End Panel -->
 
                </div>
            </div>
 
        </div>
        <!-- END CONTAINER -->
        <!-- //////////////////////////////////////////////////////////////////////////// -->
 
        <%@ include file="include/footer.jsp"%>
 
    </div>
    <!-- End Content -->
    <!-- //////////////////////////////////////////////////////////////////////////// -->
 
    <%@ include file="include/js.jsp"%>
    
    <form action="<%=basePath%>normal/adminSystemUserAction!delete.action"
        method="post" id="deleteform">
        
        <input type="hidden" name="secAdmin_id" id="delete_id" value="${secAdmin_id}"/>
        
        <div class="col-sm-1 form-horizontal">
            <!-- 模态框(Modal) -->
            <div class="modal fade" id="modal_delete" tabindex="-1" role="dialog"
                aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content">
                    
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                            <h4 class="modal-title" id="myModalLabel">确认删除</h4>
                        </div>
                        
                        <div class="modal-body">
                        
                            <div class="form-group">
                                <label for="input002" class="col-sm-3 control-label form-label">登录人资金密码</label>
                                <div class="col-sm-4">
                                    <input id="login_safeword" type="password" name="login_safeword" class="login_safeword"
                                        placeholder="请输入登录人资金密码">
                                </div>
                            </div>
                            
                            <div class="form-group">
                                <label for="input002" class="col-sm-3 control-label form-label">超级谷歌验证码</label>
                                <div class="col-sm-4">
                                    <input id="super_google_auth_code" name="super_google_auth_code" placeholder="请输入超级谷歌验证码">
                                </div>
                            </div>
                            
                        </div>
                        
                        <div class="modal-footer" style="margin-top: 0;">
                            <button type="button" class="btn " data-dismiss="modal">关闭</button>
                            <button id="sub" type="submit" class="btn btn-default">确认</button>
                        </div>
                        
                    </div>
                    <!-- /.modal-content -->
                </div>
                <!-- /.modal -->
            </div>
        </div>
    </form>
 
    <script>
        function del(id) {
            $("#delete_id").val(id);
            $('#modal_delete').modal("show");    
        }
    </script>
    
</body>
 
</html>