index.html 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. {extend name='main'}
  2. {block name="button"}
  3. {if isset($type) and $type eq 'all'}
  4. <!--{if auth("add")}-->
  5. <button data-modal='{:url("add")}' data-title="添加用户" class='layui-btn layui-btn-sm layui-btn-primary'>添加用户</button>
  6. <!--{/if}-->
  7. <!--{if auth("state")}-->
  8. <a data-confirm="确定要启用该用户吗?" data-action="{:url('state')}" data-rule="id#{key};status#0" data-csrf="{:systoken('state')}" class='layui-btn layui-btn-sm layui-btn-primary'>批量禁用</a>
  9. <!--{/if}-->
  10. {else}
  11. <!--{if auth("state")}-->
  12. <a data-confirm="确定要恢复这些账号吗?" data-action="{:url('state')}" data-rule="id#{key};status#1" data-csrf="{:systoken('state')}" class='layui-btn layui-btn-sm layui-btn-primary'>批量恢复</a>
  13. <!--{/if}-->
  14. <!--{if auth("remove")}-->
  15. <a data-confirm="确定要永久删除这些账号吗?" data-action='{:url("remove")}' data-rule="id#{key}" data-csrf="{:systoken('remove')}" class='layui-btn layui-btn-sm layui-btn-primary'>批量删除</a>
  16. <!--{/if}-->
  17. {/if}
  18. {/block}
  19. {block name="content"}
  20. <div class="layui-tab layui-tab-card think-bg-white table-block">
  21. <ul class="layui-tab-title">
  22. {foreach ['all'=>'系统用户','recycle'=>'回 收 站'] as $k=>$v}
  23. {if isset($type) and $type eq $k}
  24. <li data-open="{:url('index')}?type={$k}" class="layui-this">{$v}</li>
  25. {else}
  26. <li data-open="{:url('index')}?type={$k}">{$v}</li>
  27. {/if}{/foreach}
  28. </ul>
  29. <div class="layui-tab-content think-box-shadow table-block table-block">
  30. {include file='user/index_search'}
  31. <table class="layui-table margin-top-10" lay-skin="line">
  32. {notempty name='list'}
  33. <thead>
  34. <tr>
  35. <th class='list-table-check-td think-checkbox'>
  36. <label><input data-auto-none data-check-target='.list-check-box' type='checkbox'></label>
  37. </th>
  38. <th class='list-table-sort-td'>
  39. <button type="button" data-reload class="layui-btn layui-btn-xs">刷 新</button>
  40. </th>
  41. <th class='text-left nowrap'></th>
  42. <th class='text-left nowrap'></th>
  43. <th class='text-left nowrap'></th>
  44. <th></th>
  45. </tr>
  46. </thead>
  47. {/notempty}
  48. <tbody>
  49. {foreach $list as $key=>$vo}
  50. <tr data-dbclick>
  51. <td class='list-table-check-td think-checkbox'>
  52. <label><input class="list-check-box" value='{$vo.id}' type='checkbox'></label>
  53. </td>
  54. <td class='list-table-sort-td'>
  55. <label><input data-action-blur="{:request()->url()}" data-value="id#{$vo.id};action#sort;sort#{value}" data-loading="false" value="{$vo.sort}" class="list-sort-input"></label>
  56. </td>
  57. <td class='text-left nowrap'>
  58. <div class="headimg" data-tips-image data-lazy-src="{$vo.headimg|default=''}"></div>
  59. <div class="inline-block sub-span-blue">
  60. 登录账号:<span><b>{$vo.username|default=''}</b></span><br>
  61. 用户昵称:<span><b>{$vo.nickname|default='-'}</b></span><br>
  62. </div>
  63. </td>
  64. <td class='text-left nowrap'>
  65. 联系手机:<span class="color-blue">{$vo.contact_phone|default='<i class="color-desc">未配置手机</i>'|raw}</span><br>
  66. 联系邮箱:<span class="color-blue">{$vo.contact_mail|default='<i class="color-desc">未配置邮箱</i>'|raw}</span><br>
  67. </td>
  68. <td class='text-left nowrap'>
  69. 创建时间:<span class="color-blue">{$vo.create_at|format_datetime}</span>( {eq name='vo.status' value='0'}<span class="color-red">已禁用</span>{else}<span class="color-green">已激活</span>{/eq} )<br>
  70. {if $vo.login_at}
  71. 最后登录:<span class="color-blue">{$vo.login_at|format_datetime}</span>( 已登录 <span class="color-blue">{$vo.login_num|default=0}</span> 次 )<br>
  72. {else}
  73. <span class="color-desc">该账号还没有登录过哦,登录之后才会有记录!</span>
  74. {/if}
  75. </td>
  76. <td class='text-left nowrap'>
  77. {if isset($type) and $type eq 'all'}
  78. <!--{if auth("pass")}-->
  79. <a class="layui-btn layui-btn-sm layui-btn-normal" data-title="设置密码" data-modal='{:url("pass")}?id={$vo.id}'>密 码</a>
  80. <!--{/if}-->
  81. <!--{if auth("edit")}-->
  82. <a data-dbclick class="layui-btn layui-btn-sm" data-title="编辑用户" data-modal='{:url("edit")}?id={$vo.id}'>编 辑</a>
  83. <!--{/if}-->
  84. <!--{if auth("state") and $vo.status eq 1}-->
  85. <a class="layui-btn layui-btn-sm layui-btn-warm" data-confirm="确定要禁用该禁用账号吗?" data-action="{:url('state')}" data-value="id#{$vo.id};status#0" data-csrf="{:systoken('state')}">禁 用</a>
  86. <!--{/if}-->
  87. {else}
  88. <!--{if auth("edit")}-->
  89. <a data-dbclick class="layui-btn layui-btn-sm" data-title="编辑用户" data-modal='{:url("edit")}?id={$vo.id}'>编 辑</a>
  90. <!--{/if}-->
  91. <!--{if auth("state") and $vo.status eq 0}-->
  92. <a class="layui-btn layui-btn-sm layui-btn-warm" data-confirm="确定要恢复该账号吗?" data-action="{:url('state')}" data-value="id#{$vo.id};status#1" data-csrf="{:systoken('state')}">恢 复</a>
  93. <!--{/if}-->
  94. <!--{if auth("remove")}-->
  95. <a class="layui-btn layui-btn-sm layui-btn-danger" data-confirm="确定要永久删除此账号吗?" data-action="{:url('remove')}" data-value="id#{$vo.id}" data-csrf="{:systoken('remove')}">删 除</a>
  96. <!--{/if}-->
  97. {/if}
  98. </td>
  99. </tr>
  100. {/foreach}
  101. </tbody>
  102. </table>
  103. {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}
  104. </div>
  105. </div>
  106. {/block}