index.blade.php 3.8 KB

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