f3b3c408a903e9b087e28c4ffa5b1c07.php 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. <?php /*a:2:{s:59:"D:\phpstudy_pro\WWW\caiping\app\admin\view\admin\index.html";i:1723541257;s:59:"D:\phpstudy_pro\WWW\caiping\app\admin\view\common\base.html";i:1723541257;}*/ ?>
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <meta name="renderer" content="webkit">
  7. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  8. <meta name="360-site-verification" content="a7c876fae8b6e3175a52ea9f19543f51" />
  9. <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=0">
  10. <script src="/static/dist/xm-select.js"></script>
  11. <link rel="mobile-prefetch" href=""/>
  12. <title><?php echo get_system_config('web','admin_title'); ?></title>
  13. <meta name="keywords" content="<?php echo get_system_config('web','keywords'); ?>"/>
  14. <meta name="description" content="<?php echo get_system_config('web','desc'); ?>"/>
  15. <link rel="stylesheet" href="/static/assets/gougu/css/gougu.css?v=<?php echo get_system_config('web','version'); ?>" media="all">
  16. <style>
  17. .footer{
  18. width: 100%;
  19. height: 25px;
  20. text-align: center;
  21. position: fixed;
  22. bottom: 0;
  23. }
  24. </style>
  25. </head>
  26. <body class="main-body">
  27. <!-- 主体 -->
  28. <div class="p-3">
  29. <form class="layui-form gg-form-bar border-t border-x">
  30. <div class="layui-input-inline" style="width: 320px;">
  31. <input type="text" name="keywords" placeholder="登录账户/用户名/手机号码" class="layui-input" autocomplete="off"/>
  32. </div>
  33. <div class="layui-input-inline">
  34. <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform">提交搜索</button>
  35. </div>
  36. </form>
  37. <table class="layui-hide" id="admin" lay-filter="admin"></table>
  38. </div>
  39. <script type="text/html" id="thumb">
  40. <img src="{{d.thumb}}" width="30" height="30" />
  41. </script>
  42. <script type="text/html" id="status">
  43. <i class="layui-icon {{# if(d.status == 1){ }}layui-icon-ok{{# } else { }}layui-icon-close{{# } }}"></i>
  44. </script>
  45. <script type="text/html" id="toolbarDemo">
  46. <div class="layui-btn-container">
  47. <span class="layui-btn layui-btn-sm add-user">+ 添加管理员</span>
  48. </div>
  49. </script>
  50. <script type="text/html" id="barDemo">
  51. <div class="layui-btn-group"><span class="layui-btn layui-btn-xs layui-btn-normal" lay-event="view">详情</span><span class="layui-btn layui-btn-xs" lay-event="edit">编辑</span><span class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</span></div>
  52. </script>
  53. <!-- /主体 -->
  54. <!-- 底部 -->
  55. <div class="footer">
  56. 逸管工程项目管理系统 © www.yiguanfep.com
  57. <img src="/static/home/images/police.png" alt="" style="width:14.5px;height:16px;">
  58. <a href="https://beian.mps.gov.cn/#/query/websearch?code=45030202000160 " rel="\&quot;noreferrer'target=\”blank\&quot;" onclick="window.open(this.href); return false;">桂公网安备45030202000160号</a>
  59. <a href="https://beian.miit.gov.cn/#/Integrated/index" onclick="window.open(this.href); return false;">桂ICP备17000971号</a>
  60. </div>
  61. <!-- /底部 -->
  62. <!-- 脚本 -->
  63. <script>
  64. const moduleInit = ['tool'];
  65. function gouguInit() {
  66. var table = layui.table, tool = layui.tool, form = layui.form;
  67. var allcount;
  68. layui.pageTable = table.render({
  69. elem: '#admin',
  70. title: '管理员列表',
  71. toolbar: '#toolbarDemo',
  72. url: '/admin/admin/index', //数据接口
  73. page: true, //开启分页
  74. limit: 20,
  75. parseData: function(res) { // 数据解析回调函数
  76. // 在这里可以获取数据总数
  77. allcount = res.count;
  78. return {
  79. code: res.code, // 数据状态码
  80. msg: res.msg, // 状态信息
  81. count: res.count, // 数据总数
  82. data: res.data // 当前页数据
  83. };
  84. },
  85. cols: [
  86. [
  87. {fixed: 'left', field: 'id', title: '编号', align: 'center', width: 80,
  88. templet: function(d){
  89. return allcount - (d.LAY_NUM-1);
  90. }
  91. }, {
  92. field: 'username',
  93. title: '登录账号',
  94. width: 120
  95. }, {
  96. field: 'thumb',
  97. title: '头像',
  98. toolbar: '#thumb',
  99. align: 'center',
  100. width: 60
  101. }, {
  102. field: 'nickname',
  103. title: '用户名',
  104. width: 120
  105. }, {
  106. field: 'groupName',
  107. title: '权限角色'
  108. },
  109. <?php if($user_type == -1 || $user_type == -2): ?>
  110. {
  111. field: 'department_title',
  112. title: '所属单位',
  113. width: 200
  114. },
  115. <?php endif; ?>
  116. {
  117. field: 'login_num',
  118. title: '累计登录',
  119. align: 'center',
  120. width: 80
  121. }, {
  122. field: 'last_login_time',
  123. title: '最后登录时间',
  124. align: 'center',
  125. width: 142
  126. }, {
  127. field: 'last_login_ip',
  128. title: '最后登录IP',
  129. width: 130
  130. }, {
  131. field: 'status',
  132. title: '状态',
  133. toolbar: '#status',
  134. align: 'center',
  135. width: 60
  136. }, {
  137. field: 'right',
  138. fixed: 'right',
  139. title: '操作',
  140. toolbar: '#barDemo',
  141. width: 132,
  142. align: 'center'
  143. }
  144. ]
  145. ]
  146. });
  147. //表头工具栏事件
  148. $('body').on('click','.add-user', function () {
  149. tool.side("/admin/admin/add");
  150. return;
  151. });
  152. //监听行工具事件
  153. table.on('tool(admin)', function (obj) {
  154. var data = obj.data;
  155. if (obj.event === 'view') {
  156. tool.side('/admin/admin/view?id='+data.id);
  157. return;
  158. }
  159. else if (obj.event === 'edit') {
  160. tool.side('/admin/admin/add?id='+data.id);
  161. return;
  162. }
  163. else if (obj.event === 'del') {
  164. if (data.id == 1) {
  165. layer.msg('超级管理员不能删除');
  166. return;
  167. }
  168. layer.confirm('您确定要删除该账户', {
  169. icon: 3,
  170. title: '提示'
  171. }, function (index) {
  172. let callback = function (e) {
  173. layer.msg(e.msg);
  174. if (e.code == 0) {
  175. obj.del();
  176. }
  177. }
  178. tool.delete("/admin/admin/delete", { id: data.id }, callback);
  179. layer.close(index);
  180. });
  181. }
  182. });
  183. //监听搜索提交
  184. form.on('submit(webform)', function (data) {
  185. layui.pageTable.reload({
  186. where: {
  187. keywords: data.field.keywords
  188. },
  189. page: {
  190. curr: 1
  191. }
  192. });
  193. return false;
  194. });
  195. }
  196. </script>
  197. <!-- /脚本 -->
  198. <!-- <script src="/static/assets/layui/layui.js"></script> -->
  199. <script src="/static/assets/layui/layui.js"></script>
  200. <script src="/static/assets/third_party/echart/echarts.min.js"></script>
  201. <script src="/static/assets/gougu/gouguInit.js"></script>
  202. <script src="https://unpkg.com/pinyin-pro"></script>
  203. <script>
  204. var { pinyin } = pinyinPro;
  205. </script>
  206. <!-- 统计代码 -->
  207. <!-- /统计代码 -->
  208. </body>
  209. </html>