index.blade.php 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. @extends('base.base')
  2. @section('base')
  3. <!-- 内容区域 -->
  4. <div class="main-panel">
  5. <div class="content-wrapper">
  6. <div class="page-header">
  7. <h3 class="page-title">
  8. <span class="page-title-icon bg-gradient-primary text-white mr-2">
  9. <i class="mdi mdi-wrench"></i>
  10. </span>
  11. IP{{ __('auto.白名单列表') }}
  12. </h3>
  13. <nav aria-label="breadcrumb">
  14. <ol class="breadcrumb">
  15. <li class="breadcrumb-item"><a href="#">{{ __('auto.系统设置') }}</a></li>
  16. <li class="breadcrumb-item active" aria-current="page">IP{{ __('auto.白名单') }}</li>
  17. </ol>
  18. </nav>
  19. </div>
  20. <div class="row">
  21. <div class="col-lg-12 grid-margin stretch-card">
  22. <div class="card">
  23. <div class="card-body">
  24. <h4 class="card-title">IP{{ __('auto.白名单列表') }}</h4>
  25. <p class="card-description">
  26. <button type="button" class="btn btn-sm btn-gradient-success btn-icon-text" onclick="add()">
  27. <i class="mdi mdi-plus btn-icon-prepend"></i>
  28. {{ __('auto.添加') }}IP
  29. </button>
  30. </p>
  31. <table class="table table-bordered">
  32. <thead>
  33. <tr>
  34. <th>{{ __('auto.序号') }}</th>
  35. <th>{{ __('auto.创建时间') }}</th>
  36. <th>IP</th>
  37. <th>{{ __('auto.创建者') }}</th>
  38. <th>{{ __('auto.操作') }}</th>
  39. </tr>
  40. </thead>
  41. <tbody>
  42. @foreach($list as $k=>$v)
  43. <tr>
  44. <td>{{ $v->id }}</td>
  45. <td>{{ $v->create_at }}</td>
  46. <td>{{ $v->ip }}</td>
  47. <td>{{ $v->admin_id }}</td>
  48. <td>
  49. <button type="button" class="btn btn-sm btn-gradient-dark btn-icon-text" onclick="update({{ $v->id }})">
  50. {{ __('auto.修改') }}
  51. <i class="mdi mdi-file-check btn-icon-append"></i>
  52. </button>
  53. <button type="button" class="btn btn-sm btn-gradient-danger btn-icon-text" onclick="del({{ $v->id }})">
  54. <i class="mdi mdi-delete btn-icon-prepend"></i>
  55. {{ __('auto.删除') }}
  56. </button>
  57. </td>
  58. </tr>
  59. @endforeach
  60. </tbody>
  61. </table>
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. <script>
  69. function add(){
  70. var page = layer.open({
  71. type: 2,
  72. title: '{{ __('auto.添加IP白名单') }}',
  73. shadeClose: true,
  74. shade: 0.8,
  75. area: ['70%', '90%'],
  76. content: '/admin/IpWhiteList/add'
  77. });
  78. }
  79. function update(id){
  80. var page = layer.open({
  81. type: 2,
  82. title: '{{ __('auto.修改IP白名单') }}',
  83. shadeClose: true,
  84. shade: 0.8,
  85. area: ['70%', '90%'],
  86. content: '/admin/IpWhiteList/update/'+id
  87. });
  88. }
  89. function del(id){
  90. myConfirm("{{ __('auto.删除操作不可逆,是否继续') }}?",function(){
  91. myRequest("/admin/IpWhiteList/del/"+id,"post",{},function(res){
  92. layer.msg(res.msg)
  93. setTimeout(function(){
  94. window.location.reload();
  95. },1500)
  96. });
  97. });
  98. }
  99. </script>
  100. @endsection