users.html 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. <!DOCTYPE html>
  2. <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
  3. <head>
  4. <th:block th:include="include :: header('用户查询列表')" />
  5. </head>
  6. <body class="gray-bg">
  7. <div class="container-div">
  8. <div class="row">
  9. <div class="col-sm-12 search-collapse">
  10. <form id="role-form">
  11. <div class="select-list">
  12. <ul>
  13. <li>
  14. <textarea type="text" name="erBanNo" class="form-control" style="resize:none;" placeholder="请输入卿卿号,多个卿卿号请用英文逗号隔开"></textarea>
  15. </li>
  16. <li>
  17. <textarea type="text" name="uid" class="form-control" style="resize:none;" placeholder="请输入uid,多个uid请用英文逗号隔开" ></textarea>
  18. </li>
  19. <li>
  20. 性别:<select name="gender" th:with="type=${@dict.getType('sys_user_sex')}">
  21. <option value="">所有</option>
  22. <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
  23. </select>
  24. </li>
  25. <li>
  26. 账号类型:<select name="defUser" th:with="type=${@dict.getType('account_type')}">
  27. <option value="">所有</option>
  28. <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
  29. </select>
  30. </li>
  31. <li class="select-time">
  32. <label>创建时间: </label>
  33. <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="beginTime"/>
  34. <span>-</span>
  35. <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="endTime"/>
  36. </li>
  37. <li>
  38. <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
  39. <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
  40. </li>
  41. </ul>
  42. </div>
  43. </form>
  44. </div>
  45. <div class="col-sm-12 select-table table-striped" style="overflow:scroll;">
  46. <table id="bootstrap-table" data-mobile-responsive="false" style="min-width:1500px;"></table>
  47. </div>
  48. </div>
  49. </div>
  50. <th:block th:include="include :: footer" />
  51. <script th:inline="javascript">
  52. var editFlag = [[${@permission.hasPermi('users:user:edit')}]];
  53. var detailFlag = [[${@permission.hasPermi('users:user:detail')}]];
  54. var bannedFlag = [[${@permission.hasPermi('users:user:block')}]];
  55. var offlineFlag = [[${@permission.hasPermi('users:user:offline')}]];
  56. var sexs = [[${@dict.getType('sys_user_sex')}]];
  57. var types = [[${@dict.getType('account_type')}]];
  58. var prefix = ctx + "users/user";
  59. $(function() {
  60. var options = {
  61. url: prefix + "/list",
  62. detailUrl: prefix + "/detail/{id}",
  63. updateUrl: prefix + "/edit/{id}",
  64. bannedUrl: prefix + "/banned",
  65. offlineUrl: prefix + "/offline",
  66. modalName: "用户列表",
  67. height: 600,
  68. columns: [
  69. {
  70. field: 'erbanNo',
  71. title: '卿卿号'
  72. },
  73. {
  74. field: 'avatar',
  75. title: '头像',
  76. align : 'center',
  77. formatter:function (value,row,index) {
  78. return '<img src='+value+' width="60" height="60" class="img-rounded" >';
  79. }
  80. },
  81. {
  82. field: 'uid',
  83. title: 'uid',
  84. align : 'center'
  85. },
  86. {
  87. field: 'nick',
  88. title: '用户昵称',
  89. align : 'center'
  90. },
  91. {
  92. field: 'diamondNum',
  93. title: '钻石数',
  94. align : 'center'
  95. },
  96. {
  97. field: 'goldNum',
  98. title: '金币数',
  99. align : 'center'
  100. },
  101. {
  102. field: 'levelExperience',
  103. title: '财富等级',
  104. align : 'center'
  105. },
  106. {
  107. field: 'levelCharm',
  108. title: '魅力等级',
  109. align : 'center'
  110. },
  111. {
  112. field: 'phone',
  113. title: '手机号码',
  114. align : 'center'
  115. },
  116. {
  117. field: 'birth',
  118. title: '出生日期',
  119. align : 'center'
  120. },
  121. {
  122. field: 'gender',
  123. title: '性别',
  124. align: 'center',
  125. formatter: function(value, row, index) {
  126. return $.table.selectDictLabel(sexs, value);
  127. }
  128. },
  129. {
  130. field: 'defUser',
  131. title: '账号类型',
  132. align: 'center',
  133. formatter: function(value, row, index) {
  134. return $.table.selectDictLabel(types, value);
  135. }
  136. },
  137. {
  138. field: 'createTime',
  139. title: '创建时间',
  140. align : 'center'
  141. },
  142. {
  143. field: 'appVersion',
  144. title: '版本号',
  145. align : 'center'
  146. },
  147. {
  148. title: '操作',
  149. align: 'center',
  150. formatter: function(value, row, index) {
  151. var actions = [];
  152. actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="edit(\'' + row.uid + '\')"><i class="fa fa-edit"></i>编辑</a> ');
  153. actions.push('<a class="btn btn-primary btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="detail(\'' + row.uid + '\')"><i class="fa fa-address-card"></i>详情</a> ');
  154. actions.push('<a class="btn btn-info btn-xs ' + bannedFlag + '" href="javascript:void(0)" onclick="banned(\'' + row.uid + '\')"><i class="fa fa-ban"></i>一键封禁</a> ');
  155. actions.push('<a class="btn btn-danger btn-xs ' + offlineFlag + '" href="javascript:void(0)" onclick="offline(\'' + row.uid + '\')"><i class="fa fa-power-off"></i>强制下线</a> ');
  156. return actions.join('');
  157. }
  158. }]
  159. };
  160. $.table.init(options);
  161. });
  162. /* 用户管理-编辑 */
  163. function edit(userId) {
  164. var url = prefix + '/edit/' + userId;
  165. $.modal.open("编辑用户信息", url, '800', '600');
  166. }
  167. /* 用户管理-明细 */
  168. function detail(uid) {
  169. var url = prefix + "/detail/" + uid;
  170. $.modal.open("用户详情",url,'600','650');
  171. }
  172. function banned(uid){
  173. $.modal.confirm("确认要一键封禁用户吗?", function() {
  174. $.operate.post(prefix + "/banned/" + uid);
  175. })
  176. }
  177. function offline(uid) {
  178. $.modal.confirm("确认要强制用户下线吗?", function() {
  179. $.operate.post(prefix + "/offline/" + uid);
  180. })
  181. }
  182. </script>
  183. </body>
  184. </html>