list.html 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. <!DOCTYPE html>
  2. <html xmlns:th="http://www.thymeleaf.org"
  3. xmlns:sec="http://www.pollix.at/thymeleaf/shiro">
  4. <head th:replace="admin/common/html/head :: head_Normal(~{::title},~{::link},~{::style})">
  5. <title th:text=${title}></title>
  6. <!-- 这儿引用单独的css link -->
  7. <!-- Ladda for Bootstrap 3按钮加载进度插件 -->
  8. <link rel="stylesheet" th:href="@{/static/admin/assets/js/button/ladda/ladda.min.css}">
  9. <!-- bootstrap-table表单样式 -->
  10. <link th:href="@{/static/admin/assets/js/bootstrap/css/bootstrap-table/bootstrap-table.min.css}" rel="stylesheet"/>
  11. <style type="text/css">
  12. /**
  13. *这里写单独的css样式
  14. */
  15. .select-list ul li{
  16. list-style-type: none;
  17. float: left;
  18. }
  19. </style>
  20. </head>
  21. <body id="listbody">
  22. <!-- ###############################代码编写处############################### -->
  23. <!-- 右边内容 -->
  24. <div class="wrap-fluid">
  25. <div class="container-fluid paper-wrap bevel tlbr">
  26. <!-- 内容 -->
  27. <!--标题 通用-->
  28. <div th:replace="admin/common/html/title :: title(${title},${parenttitle},${isMsg},${msgHTML})">
  29. </div>
  30. <!-- 结束标题 通用-->
  31. <div class="content-wrap">
  32. <!-- 结束内容 -->
  33. <div class="row">
  34. <div class="col-sm-12">
  35. <!-- 搜索条件 -->
  36. <div class="nest" id="inlineClose">
  37. <div class="title-alt">
  38. <h6>搜索条件</h6>
  39. <div class="titleClose">
  40. <a class="gone" href="#inlineClose">
  41. <span class="entypo-cancel"></span>
  42. </a>
  43. </div>
  44. <div class="titleToggle">
  45. <a class="nav-toggle-alt" href="#search_div">
  46. <span class="entypo-down-open"></span>
  47. </a>
  48. </div>
  49. </div>
  50. <div class="body-nest" id="search_div" style="display: none">
  51. <div class="form_left">
  52. <form role="form" class="form-inline">
  53. <div class="form-group">
  54. <label for="exampleInputEmail2" class="sr-only">用户名字</label>
  55. <input type="text" name="searchText" placeholder="用户名字"class="form-control">
  56. </div>
  57. <button onclick="$.table.search(this)" class="btn btn-success" type="button"><i class="fa fa-search"></i>&nbsp;搜索</button>
  58. </form>
  59. </div>
  60. </div>
  61. </div>
  62. <!-- END搜索条件 -->
  63. <!-- 空白页开始-->
  64. <div class="nest" id="Blank_PageClose">
  65. <div class="title-alt">
  66. <h6>表单</h6>
  67. <div class="titleClose">
  68. <a class="gone" href="#Blank_PageClose">
  69. <span class="entypo-cancel"></span>
  70. </a>
  71. </div>
  72. <div class="titleToggle">
  73. <a class="nav-toggle-alt" href="#Blank_Page_Content">
  74. <span class="entypo-up-open"></span>
  75. </a>
  76. </div>
  77. </div>
  78. <div class="body-nest" id="Blank_Page_Content">
  79. <!-- 工具条 -->
  80. <div class="btn-group hidden-xs" id="exampleTableEventsToolbar" role="group">
  81. <button onclick="$.operate.add()" type="button" class="btn btn-primary">
  82. <span class="entypo-plus-squared"></span>&nbsp;&nbsp;新增
  83. </button>
  84. <button onclick="$.operate.batRemove()" type="button" class="btn btn-info">
  85. <span class="entypo-trash"></span>&nbsp;&nbsp;删除
  86. </button>
  87. <button onclick="updatePwd()" type="button" class="btn btn-danger">
  88. <span class="entypo-tools"></span>&nbsp;&nbsp;修改密码
  89. </button>
  90. </div>
  91. <!-- 工具条 end-->
  92. <table id="dataTable" class="table-striped footable-res footable metro-blue" data-page-size="6">
  93. </table>
  94. </div>
  95. </div>
  96. </div>
  97. <!-- 空白页结束 -->
  98. </div>
  99. <!-- 结束内容 -->
  100. </div>
  101. </div>
  102. </div>
  103. <!-- 结束右边内容 -->
  104. <!-- ###############################代码编写处############################### -->
  105. <!-- 通用js -->
  106. <div th:include="admin/common/html/js :: onload_js">
  107. </div>
  108. <!-- bootstarp 表格 -->
  109. <script th:src="@{/static/admin/assets/js/bootstrap/js/bootstrap-table/bootstrap-table.min.js}" type="text/javascript"></script>
  110. <script th:src="@{/static/admin/assets/js/bootstrap/js/bootstrap-table/locale/bootstrap-table-zh-CN.min.js}" type="text/javascript"></script>
  111. <script th:src="@{/static/admin/assets/js/bootstrap/js/base_list.js}" type="text/javascript"></script>
  112. <!-- 导出 -->
  113. <script th:src="@{/static/admin/assets/js/bootstrap/extensions/export/bootstrap-table-export.js}" type="text/javascript"></script>
  114. <script th:src="@{/static/admin/assets/js/bootstrap/extensions/export/tableExport.js}" type="text/javascript"></script>
  115. <!-- 弹窗 -->
  116. <script th:src="@{/static/admin/assets/js/layer/layer.js}" type="text/javascript"></script>
  117. <!-- 遮罩层 -->
  118. <script th:src="@{/static/admin/assets/js/blockUI/jquery.blockUI.js}" type="text/javascript"></script>
  119. <script type="text/javascript">
  120. var dataUrl=window.rootPath+"/UserVueController/list";
  121. var removeUrl=window.rootPath+"/UserVueController/remove";
  122. var createUrl=window.rootPath+"/UserVueController/add";
  123. var updateUrl=window.rootPath+"/UserVueController/edit/{id}";
  124. var exportUrl=window.rootPath+"/UserVueController/export";
  125. var options = {
  126. dataUrl: dataUrl,
  127. createUrl: createUrl,
  128. updateUrl: updateUrl,
  129. removeUrl:removeUrl,
  130. exportUrl: exportUrl,
  131. sortName: "roleSort",
  132. modalName: "用户",
  133. search: false,
  134. dataColumns: [
  135. {
  136. checkbox: true
  137. },
  138. {
  139. field: 'id',
  140. title: '序号'
  141. },
  142. {
  143. field: 'nickname',
  144. title: '昵称'
  145. },
  146. {
  147. field: 'username',
  148. title: '账号'
  149. },
  150. {
  151. field: 'depName',
  152. title: '部门名称'
  153. },
  154. {
  155. field: 'posName',
  156. title: '岗位名称'
  157. },
  158. {
  159. title: '操作',
  160. formatter: function (value, row, index) {
  161. var id = row.id;
  162. var actions = [];
  163. actions.push('<a class="btn btn-success btn-xs" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
  164. actions.push('<a class="btn btn-danger btn-xs" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
  165. return actions.join('');
  166. //return '<a class="btn btn-xs btn-danger" onclick="delPermission(' + "'" + id + "'" + ')"><i class="fa fa-remove"></i>删除</a>';
  167. }
  168. }]
  169. };
  170. $(function(){
  171. var oTab=$.table.oTableInit(options);
  172. oTab.Init();
  173. })
  174. </script>
  175. <script type="text/javascript">
  176. var editPwdUrl=window.rootPath+"/UserVueController/editPwd/{id}";
  177. function updatePwd(){
  178. var rows = $.common.isEmpty($.table._option.id) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.id);
  179. if (rows.length == 0) {
  180. $.modal.alertWarning("请至少选择一条记录");
  181. return
  182. }else if(rows.length>1){
  183. $.modal.alertWarning("请选择一条记录");
  184. return
  185. }
  186. var url = editPwdUrl.replace("{id}", rows.join());
  187. var data = {
  188. "id":rows.join()
  189. };
  190. $.modal.open("修改密码", url);
  191. }
  192. </script>
  193. </body>
  194. </html>