excel.blade.php 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  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. {{ __('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">{{ __('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">{{ __('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.新增公告') }}
  29. </button>
  30. </p>
  31. <form class="forms-sample" method="post" action="/admin/punish/test" enctype="multipart/form-data">
  32. @csrf
  33. <div class="form-group">
  34. <label class="col-sm-2 control-label">{{ __('auto.文件') }}</label>
  35. <div class="col-sm-5">
  36. <input type="file" name="file" />
  37. </div>
  38. <div class="col-sm-5">
  39. <p class="form-control-static text-danger"></p>
  40. </div>
  41. </div>
  42. <div class="form-group">
  43. <div class="col-sm-offset-2 col-sm-10">
  44. <button type="submit" class="btn btn-primary">{{ __('auto.提交') }}</button>
  45. </div>
  46. </div>
  47. </form>
  48. <table class="table table-bordered">
  49. <thead>
  50. <tr>
  51. <th>{{ __('auto.期数') }}</th>
  52. <th>{{ __('auto.发布时间') }}</th>
  53. <th>{{ __('auto.处罚明细') }}</th>
  54. </tr>
  55. </thead>
  56. <tbody>
  57. @foreach($list as $k=>$v)
  58. <tr>
  59. <td style="width: 5%">{{ $v->id }}</td>
  60. <td style="width: 5%">{{ $v->add_time }}</td>
  61. <td style="width: 15%"><textarea class="form-control" name="message" rows="4" disabled="disabled">{{ $v->content }}</textarea></td>
  62. <td style="width: 5%">
  63. <button type="button" class="btn btn-sm btn-gradient-dark btn-icon-text" onclick="update({{ $v->id }})">
  64. {{ __('auto.修改') }}
  65. <i class="mdi mdi-file-check btn-icon-append"></i>
  66. </button>
  67. @if($v->publish)
  68. <button type="button" class="btn btn-sm btn-gradient-info btn-icon-text">
  69. &nbsp;{{ __('auto.已') }}&nbsp;{{ __('auto.发') }}&nbsp;{{ __('auto.布') }}&nbsp;
  70. </button>
  71. @else
  72. <button type="button" class="btn btn-sm btn-gradient-danger btn-icon-text" onclick="publish({{ $v->id }})">
  73. {{ __('auto.确认发布') }}
  74. </button>
  75. @endif
  76. </td>
  77. </tr>
  78. @endforeach
  79. </tbody>
  80. </table>
  81. <div class="box-footer clearfix">
  82. {{ __('auto.总共') }} <b>{{ $list->total() }}</b> {{ __('auto.条,分为') }}<b>{{ $list->lastPage() }}</b>{{ __('auto.页') }}
  83. {!! $list->links() !!}
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. </div>
  89. </div>
  90. </div>
  91. <script>
  92. function add(){
  93. var page = layer.open({
  94. type: 2,
  95. title: '{{ __('auto.新增公告') }}',
  96. shadeClose: true,
  97. shade: 0.8,
  98. area: ['70%', '90%'],
  99. content: '/admin/punish/add'
  100. });
  101. }
  102. function update(id){
  103. var page = layer.open({
  104. type: 2,
  105. title: '{{ __('auto.修改公告') }}',
  106. shadeClose: true,
  107. shade: 0.8,
  108. area: ['70%', '90%'],
  109. content: '/admin/punish/update/'+id
  110. });
  111. }
  112. function publish(id){
  113. myConfirm("{{ __('auto.是否继续') }}?",function(){
  114. myRequest("/admin/punish/update/"+id,"post",{},function(res){
  115. layer.msg(res.msg)
  116. setTimeout(function(){
  117. window.location.reload();
  118. },1500)
  119. });
  120. });
  121. }
  122. $('.menu-switch').click(function(){
  123. id = $(this).attr('id');
  124. state = $(this).attr('state');
  125. console.log(id)
  126. console.log(state)
  127. if(state == "on"){
  128. $('.pid-'+id).hide();
  129. $(this).attr("state","off")
  130. $(this).removeClass('mdi-menu-down').addClass('mdi-menu-right');
  131. }else{
  132. $('.pid-'+id).show();
  133. $(this).attr("state","on")
  134. $(this).removeClass('mdi-menu-right').addClass('mdi-menu-down');
  135. }
  136. })
  137. </script>
  138. @endsection