| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- <!DOCTYPE HTML>
- <html xmlns:th="http://www.thymeleaf.org"
- xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
- layout:decorate="~{admin/common/common}">
- <head>
- <title>添加用户</title>
- </head>
- <body layout:fragment="content">
- <form id="myForm" th:action="@{'/admin/group/userList?groupId='+${groupId}}" th:method="get">
- <div class="page-container">
- <div class="text-c" style="padding-bottom: 20px">
- <input type="text" class="input-text" style="width:250px" placeholder="输入用户名或姓名" name="keyword"
- th:value="${keyword}"/>
- <button type="submit" class="btn btn-primary">
- 搜索
- </button>
- </div>
- <table class="table table-border table-bordered table-hover table-bg">
- <thead>
- <tr class="text-c">
- <th width="40"><input name="" type="checkbox" value=""></th>
- <th>用户名</th>
- <th>姓名</th>
- <th>角色</th>
- <th>所属部门</th>
- </tr>
- </thead>
- <tbody>
- <tr class="text-c" th:each="model:${pageInfo?.list}" th:object="${model}">
- <td>
- <input type="checkbox" class="checkbox" th:value="*{id}" name="id"
- th:attr="nick_name=*{nick_name},user_name=*{user_name},role_names=*{role_names},department_name=*{department_name}"/>
- </td>
- <td th:text="*{nick_name}" itemAttr="nick_name"></td>
- <td th:text="*{user_name}" itemAttr="user_name"></td>
- <td th:text="*{role_names}" itemAttr="role_names"></td>
- <td th:text="*{department_name}" itemAttr="department_name"></td>
- </tbody>
- </table>
- <input type="hidden" name="user_selected" id="user_selected" value=""/>
- <div th:replace="admin/common/page :: page"></div>
- </div>
- <div class="row cl">
- <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
- <a class="btn btn-primary radius" onClick="saveSelect();"><i class="Hui-iconfont"></i>确定</a>
- <button onClick="removeIframe();" class="btn btn-default radius" type="button"> 取消
- </button>
- </div>
- </div>
- </form>
- <script type="text/javascript" th:src="@{/js/common/page.js}"></script>
- <script th:inline="javascript">
-
- /**
- * 取消
- */
- function removeIframe() {
- var index = parent.layer.getFrameIndex(window.name);
- parent.layer.close(index);
- }
- function saveSelect() {
- var userList = getSelectedItem();
- /* $(".checkbox:checked").each(function () {
- var id = $(this).val();
- var nick_name = $(this).attr("nick_name");
- if(typeof nick_name == "undefined"){
- nick_name='';
- }
- var user_name = $(this).attr("user_name");
- if(typeof user_name == "undefined"){
- user_name='';
- }
- var role_names = $(this).attr("role_names");
- if(typeof role_names == "undefined"){
- role_names='';
- }
- var department_name = $(this).attr("department_name");
- if(typeof department_name == "undefined"){
- department_name='';
- }
- userList.push({
- id: id,
- nick_name: nick_name,
- user_name: user_name,
- role_names: role_names,
- department_name: department_name
- })
- }); */
- parent.addUsers(userList);
- index = parent.layer.getFrameIndex(window.name);
- parent.layer.close(index);
- }
- </script>
- </body>
- </html>
|