age.blade.php 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. @extends('statistics.module.layouts.content')
  2. @push('meta')
  3. @endpush
  4. @push('css')
  5. @endpush
  6. @push('js')
  7. <script src="{{ theme_asset('app/js/echarts.common.min.js') }}"></script>
  8. @endpush
  9. @section('content')
  10. <div class="wide container demand_warp">
  11. @include('statistics.module.section.left_menu')
  12. <div class="cq_rt index_right">
  13. <div class="inside_timer">
  14. @include('statistics.module.section.timer')
  15. </div>
  16. <div class="char-box">
  17. <div class="char-title no-icon">按年龄分组的供求人数<input type="button" class="export_excel" value="导出为excel"/></div>
  18. <div id="trend" style="width: 100%;height: 360px;"></div>
  19. </div>
  20. <div class="detail-info">
  21. <div class="table_title">详细数据</div>
  22. <table border="0" cellpadding="0" cellspacing="0">
  23. <tr>
  24. <th colspan="6" text-aligin="center">{{$date_aprams['start_year']}}年{{$date_aprams['start_month']}}月到{{$date_aprams['end_year']}}年{{$date_aprams['end_month']}}月数据</th>
  25. </tr>
  26. <tr>
  27. <th style="width:25%;border-right:1px solid #cdcdcd;" rowspan="2">年龄</th>
  28. <th colspan="5">劳动力供求人数比较</th>
  29. </tr>
  30. <tr>
  31. <th style="width:15%;">需求人数</th>
  32. <th style="width:15%;">需求比重</th>
  33. <th style="width:15%;">求职人数</th>
  34. <th style="width:15%;">求职比重</th>
  35. <th style="width:15%;">求人倍率</th>
  36. </tr>
  37. @if($table_data)
  38. @foreach($table_data as $k=>$v)
  39. <tr>
  40. <td>{{$v['name']}}</td>
  41. <td>{{$v['job_amount']}}</td>
  42. <td>{{$v['job_rate']}}%</td>
  43. <td>{{$v['resume_num']}}</td>
  44. <td>{{$v['resume_rate']}}%</td>
  45. <td>{{$v['multiple']}}</td>
  46. </tr>
  47. @endforeach
  48. @endif
  49. </table>
  50. </div>
  51. </div>
  52. <div class="clear"></div>
  53. </div>
  54. @endsection
  55. @section('script')
  56. <script type="text/javascript">
  57. var data_name = [];
  58. var data_jobs = [];
  59. var data_resumes = [];
  60. @if($chart_data)
  61. @foreach($chart_data as $k=>$v)
  62. data_name.push("{{$v['name']}}");
  63. data_jobs.push("{{$v['job_amount']}}");
  64. data_resumes.push("{{$v['resume_num']}}");
  65. @endforeach
  66. @endif
  67. var colors = ['#2da1f9','#f9629a'];
  68. option = {
  69. title: [{
  70. left: '5',
  71. top: '5',
  72. text: '趋势图',
  73. textStyle:{
  74. color:'#565656',
  75. fontSize:14,
  76. fontWeight:'normal'
  77. }
  78. }],
  79. color:colors,
  80. tooltip: {
  81. trigger: 'axis',
  82. axisPointer: { // 坐标轴指示器,坐标轴触发有效
  83. type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  84. }
  85. },
  86. legend: {
  87. data: ['需求人数', '求职人数'],
  88. align: 'right',
  89. top:10,
  90. right: 20,
  91. itemWidth:18,
  92. itemHeight:6
  93. },
  94. grid: {
  95. left: '8',
  96. right: '8',
  97. bottom: '10',
  98. containLabel: true
  99. },
  100. xAxis: [{
  101. type: 'category',
  102. boundaryGap:true,
  103. axisTick:{
  104. alignWithLabel:true
  105. },
  106. axisLabel:{
  107. interval: 0, //坐标轴刻度标签的显示间隔 , 0 强制显示所有标签。
  108. //rotate:-45, //刻度标签旋转的角度
  109. margin:15,
  110. textStyle: {
  111. color: '#333333',
  112. fontSize:10
  113. }
  114. },
  115. data: data_name
  116. }],
  117. yAxis: [{
  118. type: 'value',
  119. name: '',
  120. axisLabel: {
  121. formatter: '{value}'
  122. }
  123. }],
  124. series: [{
  125. name: '需求人数',
  126. type: 'bar',
  127. barGap: 0,
  128. data: data_jobs
  129. }, {
  130. name: '求职人数',
  131. type: 'bar',
  132. data: data_resumes
  133. }]
  134. };
  135. var myChart = echarts.init(document.getElementById('trend'));
  136. myChart.setOption(option);
  137. $('.export_excel').click(function(){
  138. window.location.href="{{route('statistics.demand.age',['isExcel'=>1])}}";
  139. });
  140. </script>
  141. @endsection