index.blade.php 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. @extends('admin.layout')
  2. @section('content')
  3. <div class="wrapper wrapper-content animated fadeInRight">
  4. <div class="row">
  5. <div class="col-sm-12">
  6. <div class="ibox float-e-margins">
  7. <div class="ibox-title">
  8. <h5>用户管理</h5>
  9. <div class="ibox-tools">
  10. <a class="collapse-link"> <i class="fa fa-chevron-up"></i>
  11. </a>
  12. </div>
  13. </div>
  14. <div class="ibox-content">
  15. <div class="row">
  16. <form method="GET" action="" accept-charset="UTF-8">
  17. <div class="col-sm-4">
  18. <div class="input-group">
  19. <input type="text" value="{{Request::get('keyword')}}" placeholder="请输入关键词"
  20. name="keyword" class="input-sm form-control">
  21. <span class="input-group-btn">
  22. <button type="submit" class="btn btn-sm btn-primary">搜索</button>
  23. </span>
  24. </div>
  25. </div>
  26. </form>
  27. @if(role('User/Info/create'))
  28. <div class="col-sm-3 pull-right">
  29. <a href="{{ U('User/Info/create')}}"
  30. class="btn btn-sm btn-primary pull-right">添加</a>
  31. </div>
  32. @endif
  33. </div>
  34. <table class="table table-striped table-bordered table-hover dataTables-example dataTable">
  35. <thead>
  36. <tr>
  37. <th class="sorting" data-sort="id"> 用户ID</th>
  38. <th class="sorting" data-sort="real_name"> 姓名</th>
  39. <th class="sorting" data-sort="email"> EMAIL</th>
  40. <th class="sorting" data-sort="mobile"> 手机号</th>
  41. <th class="sorting" data-sort="idcard_back"> 工作类型</th>
  42. <th class="sorting" data-sort="educational"> 学历</th>
  43. <th class="sorting" data-sort="last_login_time"> 最后登陆时间</th>
  44. <th width="22%">相关操作</th>
  45. </tr>
  46. </thead>
  47. <tbody>
  48. @if(isset($list))
  49. @foreach($list as $key => $item)
  50. <tr>
  51. <td>{{ $item->id }}</td>
  52. <td>{{ $item->real_name }}</td>
  53. <td>{{ $item->email }}</td>
  54. <td>{{ $item->mobile }}</td>
  55. <td>{{ dict()->get('user_info','work_type',$item->work_type) }}</td>
  56. <td>{{ $item->educational }}</td>
  57. <td>{{ $item->last_login_time }}</td>
  58. <td>{{ $item->created_at->format('Y-m-d H:i:s') }}</td>
  59. <td>
  60. <div class="btn-group">
  61. <button data-toggle="dropdown"
  62. class="btn btn-warning btn-sm dropdown-toggle"
  63. aria-expanded="false">
  64. 操作 <span class="caret"></span>
  65. </button>
  66. <ul class="dropdown-menu">
  67. @if(role('User/Info/update'))
  68. <li><a href="{{ U('User/Info/update',['id'=>$item->id])}}"
  69. class="font-bold">修改</a></li>
  70. @endif
  71. @if(role('User/Info/destroy'))
  72. <li class="divider"></li>
  73. <li><a href="{{ U('User/Info/destroy',['id'=>$item->id])}}"
  74. onclick="return confirm('你确定执行删除操作?');">删除</a></li>
  75. @endif
  76. </ul>
  77. </div>
  78. @if(role('User/Info/view'))
  79. <button onclick="layer.open({type: 2,area: ['80%', '90%'],content: '{{ U('User/Info/view',['id'=>$item->id])}}'});"
  80. class="btn btn-primary ">查看
  81. </button>
  82. @endif
  83. </td>
  84. </tr>
  85. @endforeach
  86. @endif
  87. </tbody>
  88. </table>
  89. <div class="row">
  90. <div class="col-sm-6">
  91. <div class="dataTables_info" id="DataTables_Table_0_info"
  92. role="alert" aria-live="polite" aria-relevant="all">每页{{ $list->count() }}
  93. 条,共{{ $list->lastPage() }}页,总{{ $list->total() }}条。
  94. </div>
  95. </div>
  96. <div class="col-sm-6">
  97. <div class="dataTables_paginate paging_simple_numbers" id="DataTables_Table_0_paginate">
  98. {!! $list->setPath('')->appends(Request::all())->render() !!}
  99. </div>
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. </div>
  105. </div>
  106. </div>
  107. @endsection