display.html 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. {template 'common/header'}
  2. {template 'user/user-header'}
  3. <div class="search-box clearfix we7-margin-bottom">
  4. <form action="" class="search-form search-box" method="get">
  5. <input type="hidden" name="c" value="user">
  6. <input type="hidden" name="a" value="display">
  7. <input type="hidden" name="do" value="{$_GPC['do']}">
  8. <input type="hidden" name="type" value="{$_GPC['type']}">
  9. <select name="expire" class="we7-margin-right">
  10. <option value="0" data-url="{php echo filter_url('expire:0');}" {if $_GPC['expire'] == 0}selected="selected"{/if}>用户状态</option>
  11. <option value="1" data-url="{php echo filter_url('expire:1');}" {if $_GPC['expire'] == 1}selected="selected"{/if}>未到期</option>
  12. <option value="2" data-url="{php echo filter_url('expire:2');}" {if $_GPC['expire'] == 2}selected="selected"{/if}>已到期</option>
  13. </select>
  14. <select name="user_type" class="we7-margin-right">
  15. <option value="0" data-url="{php echo filter_url('user_type:0');}" >用户类型</option>
  16. <option value="1" data-url="{php echo filter_url('user_type:1');}" {if $_GPC['user_type'] == 1}selected="selected"{/if}>普通用户</option>
  17. <option value="3" data-url="{php echo filter_url('user_type:3');}" {if $_GPC['user_type'] == 3}selected="selected"{/if}>应用操作员</option>
  18. </select>
  19. <div class="search-form">
  20. <div class="input-group ">
  21. <input type="text" name="search" id="" value="{$_GPC['search']}" class="form-control" placeholder="搜索用户名或手机号" />
  22. <span class="input-group-btn"><button class="btn btn-default"><i class="fa fa-search"></i></button></span>
  23. </div>
  24. </div>
  25. <!-- <label for="" class="col-sm-1 control-label" style="width: 50px;">用户组</label>
  26. <div class="input-controls col-sm-3">
  27. <select name="groupid" class="we7-select form-control">
  28. <option value="" selected="selected">不限</option>
  29. {loop $user_groups $group}
  30. <option value="{$group['id']}"{if $group['id'] == $_GPC['groupid']} selected="selected"{/if}>{$group['name']}</option>
  31. {/loop}
  32. </select>
  33. </div> -->
  34. </form>
  35. {if $_GPC['type'] == 'display' || $_GPC['type'] == ''}<a href="{url 'user/create/post'}" class="btn btn-primary">+添加用户</a>{/if}
  36. </div>
  37. <table class="table we7-table table-hover table-manage vertical-middle" id="js-users-display" ng-controller="UsersDisplay" ng-cloak>
  38. <col width="90px"/>
  39. <col width="150px">
  40. <!-- <col width="170px"/>
  41. <col width="100px"/>
  42. <col width="100px"/>
  43. <col width="80px"/>
  44. <col width="80px"/> -->
  45. <col width="200px"/>
  46. <col width="130px"/>
  47. <col width=""/>
  48. <tr>
  49. <th></th>
  50. <th class="text-left">用户名</th>
  51. <!-- <th>用户权限组</th>
  52. <th>公众号</th>
  53. <th>小程序</th>
  54. <th>pc</th>
  55. <th>APP</th> -->
  56. <th>注册时间</th>
  57. <th>到期时间</th>
  58. <th>类型</th>
  59. <th class="text-right">操作</th>
  60. </tr>
  61. <tr ng-repeat="user in users" ng-if="users">
  62. <td class="td-link">
  63. <a ng-href="{{links.edit}}uid={{user.uid}}">
  64. <img ng-src="{{user.avatar}}" alt="" class="img-responsive icon"/>
  65. </a>
  66. </td>
  67. <td><span ng-bind="user.username"></span><br/><span ng-bind="user.mobile"></span></td>
  68. <!-- <td>
  69. <span class="color-default" ng-if="user.founder">管理员</span>
  70. <span class="color-default" ng-if="user.groupname && !user.founder" ng-bind="user.groupname"></span>
  71. <span class="color-default" ng-if="!user.groupname && !user.founder">未分配</span>
  72. </td>
  73. <td class="color-default" ng-bind="user.maxaccount"></td>
  74. <td class="color-default" ng-bind="user.maxwxapp"></td>
  75. <td class="color-default" ng-bind="user.maxwebapp"></td>
  76. <td class="color-default" ng-bind="user.maxphoneapp"></td> -->
  77. <td>
  78. <span ng-bind="user.joindate"></span>
  79. </td>
  80. <td>
  81. <span ng-bind="user.endtime"></span>
  82. </td>
  83. <td>
  84. <span ng-if="user.type == 1">普通用户</span>
  85. <span ng-if="user.type == 3">应用操作员</span>
  86. </td>
  87. <td class="vertical-middle table-manage-td">
  88. <div class="link-group" ng-if="!user.founder">
  89. <a ng-href="{{links.edit}}uid={{user.uid}}" ng-if="type == 'display' || type == 'clerk'">编辑</a>
  90. <a href="javascript:;" ng-click="operate(user.uid, 'recycle')" ng-if="type == 'display' || type == 'clerk'" data-toggle="tooltip" data-placement="left" data-container="body" title="禁用后可在用户回收站查找到并重新启用。">禁用</a>
  91. <a href="javascript:;" ng-click="operate(user.uid, 'check_pass')" ng-if="type == 'check'">通过</a>
  92. <a href="javascript:;" ng-click="operate(user.uid, 'recycle')" ng-if="type == 'check'" data-toggle="tooltip" data-placement="left" title="拒绝后可在用户回收站查找到并启用。">拒绝</a>
  93. <a href="javascript:;" ng-click="operate(user.uid, 'recycle_restore')" ng-if="type == 'recycle'">启用</a>
  94. <a href="javascript:;" ng-click="deleteUser(user.uid, 'recycle_delete')" class="del" ng-if="type == 'recycle'">删除</a>
  95. </div>
  96. <div class="manage-option text-right" ng-if="!user.founder && type != 'recycle' && type != 'check'">
  97. <a href="{{links.edit}}uid={{user.uid}}">基础信息</a>
  98. <a href="{{links.edit}}&do=edit_modules_tpl&uid={{user.uid}}">应用模板权限</a>
  99. <a href="{{links.edit}}&do=edit_create_account_list&uid={{user.uid}}">帐号创建权限</a>
  100. <a href="{{links.edit}}&do=edit_account_dateline&uid={{user.uid}}">帐号使用期限</a>
  101. <a href="{{links.edit}}&do=edit_account&uid={{user.uid}}">使用账号列表</a>
  102. </div>
  103. </td>
  104. </tr>
  105. <tr ng-if="!users">
  106. <td colspan="100" >
  107. <div class="we7-empty-block">暂无数据</div>
  108. </td>
  109. </tr>
  110. </table>
  111. <div class="text-right pager-pagination-float">
  112. {$pager}
  113. </div>
  114. <span class="pager-total">共{php echo $total}个</span>
  115. <script type="text/javascript">
  116. $(function(){
  117. $('[data-toggle="tooltip"]').tooltip();
  118. });
  119. angular.module('userManageApp').value('config', {
  120. type: "{php echo !empty($_GPC['type']) ? $_GPC['type'] : 'display'}",
  121. users: {php echo !empty($users) ? json_encode($users) : 'null'},
  122. usergroups: {php echo !empty($usergroups) ? json_encode($usergroups) : 'null'},
  123. links: {
  124. link: "{php echo url('user/display/operate')}",
  125. edit: "{php echo url('user/edit')}",
  126. },
  127. });
  128. angular.bootstrap($('#js-users-display'), ['userManageApp']);
  129. </script>
  130. {template 'common/footer'}