participation_statistics.blade.php 5.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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-chart-line"></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. <form class="well form-inline margin-top-20" method="get" action="">
  26. <span style="padding-left: 10px">{{ __('auto.注册时间:') }}</span>
  27. <input type="date" name="start_date" class="form-control" value="{{ $start_date }}" />
  28. <span style="padding-left: 10px">{{ __('auto.至') }}</span>
  29. <input type="date" name="end_date" class="form-control" value="{{ $end_date }}" />
  30. <input type="submit" class="btn btn-sm btn-gradient-dark btn-icon-text" value="{{ __('auto.搜索') }}"/>&nbsp;&nbsp;
  31. <a href="/admin/game_data/participation_statistics" class="btn btn-sm btn-gradient-warning btn-icon-text">{{ __('auto.清空') }}</a>
  32. </form>
  33. <br>
  34. <table class="table table-bordered">
  35. <thead>
  36. <tr>
  37. <th width="25%">{{ __('auto.推荐进入的游戏') }}</th>
  38. <th width="15%">{{ __('auto.注册人数') }}</th>
  39. <th width="15%">{{ __('auto.参与游戏人数') }}</th>
  40. <th width="15%">{{ __('auto.参游率') }}</th>
  41. <th width="15%">{{ __('auto.付费人数') }}</th>
  42. <th width="15%">{{ __('auto.付费率') }}</th>
  43. </tr>
  44. </thead>
  45. <tbody>
  46. @foreach($statistics as $stat)
  47. <tr>
  48. <td>{{ $stat['game_name'] }} <small class="text-muted">(ID: {{ $stat['game_id'] }})</small></td>
  49. <td>{{ $stat['register_count'] }}</td>
  50. <td>{{ $stat['played_count'] }}</td>
  51. <td>
  52. @if($stat['register_count'] > 0)
  53. <span class="badge badge-{{ $stat['participation_rate'] >= 50 ? 'success' : ($stat['participation_rate'] >= 30 ? 'warning' : 'danger') }}">
  54. {{ $stat['participation_rate'] }}%
  55. </span>
  56. @else
  57. <span class="badge badge-secondary">-</span>
  58. @endif
  59. </td>
  60. <td>{{ $stat['paid_count'] }}</td>
  61. <td>
  62. @if($stat['register_count'] > 0)
  63. <span class="badge badge-{{ $stat['paid_rate'] >= 20 ? 'success' : ($stat['paid_rate'] >= 10 ? 'warning' : 'danger') }}">
  64. {{ $stat['paid_rate'] }}%
  65. </span>
  66. @else
  67. <span class="badge badge-secondary">-</span>
  68. @endif
  69. </td>
  70. </tr>
  71. @endforeach
  72. </tbody>
  73. </table>
  74. @if(count($statistics) == 0)
  75. <div class="alert alert-info">
  76. <p>{{ __('auto.暂无统计数据,请选择其他时间范围。') }}</p>
  77. </div>
  78. @endif
  79. </div>
  80. </div>
  81. </div>
  82. </div>
  83. </div>
  84. </div>
  85. @endsection