config.blade.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. @extends('base.base')
  2. @section('base')
  3. <button type="button" class="btn btn-sm btn-gradient-success btn-icon-text" onclick="add()">
  4. <i class="mdi mdi-plus btn-icon-prepend"></i>
  5. {{ __('auto.增加档位配置') }}
  6. </button>
  7. <table class="table table-striped">
  8. @foreach($list as $key=>$val)
  9. <tr>
  10. <td>{{ __('auto.档位名称:') }}{{$val->Name}}</td>
  11. <td>
  12. <button class="btn btn-sm btn-gradient-dark" onclick="update({{$val->ID}})">{{ __('auto.修改') }}</button>
  13. </td>
  14. </tr>
  15. @endforeach
  16. </table>
  17. @endsection
  18. <script>
  19. function updateStatus(id, status) {
  20. myConfirm("{{ __('auto.是否继续') }}?", function () {
  21. myRequest("/admin/group_control/control_updateStatus/" + id, "post", {status}, function (res) {
  22. if (res.code == '200') {
  23. layer.msg(res.msg)
  24. setTimeout(function () {
  25. window.location.reload();
  26. }, 1500)
  27. } else {
  28. layer.msg(res.msg)
  29. }
  30. });
  31. });
  32. }
  33. function update(ID) {
  34. var page = layer.open({
  35. type: 2,
  36. title: '{{ __('auto.修改配置') }}',
  37. shadeClose: true,
  38. offset: 't',
  39. shade: 0.8,
  40. area: ['80%', '90%'],
  41. content: '/admin/Control/ControlConfig_update/'+ ID
  42. });
  43. }
  44. function add(GameID, SortID) {
  45. var page = layer.open({
  46. type: 2,
  47. title: '{{ __('auto.添加配置') }}',
  48. shadeClose: true,
  49. offset: 't',
  50. shade: 0.8,
  51. area: ['80%', '90%'],
  52. content: '/admin/Control/ControlConfig_add'
  53. });
  54. }
  55. </script>