sex.blade.php 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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.compare_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 style="width:25%;border-right:1px solid #cdcdcd;" rowspan="2">性别</th>
  25. <th colspan="5">劳动力供求人数比较</th>
  26. </tr>
  27. <tr>
  28. <th style="width:15%;">需求人数</th>
  29. <th style="width:15%;">需求比重</th>
  30. <th style="width:15%;">求职人数</th>
  31. <th style="width:15%;">求职比重</th>
  32. <th style="width:15%;">求人倍率</th>
  33. </tr>
  34. @if($table_data)
  35. @foreach($table_data as $k=>$v)
  36. <tr>
  37. @if($compare_flag)
  38. <td>{{$v['name']}}</td>
  39. <td>{{$compare_table_data[$k]['job_amount']}} / {{$v['job_amount']}}</td>
  40. <td>{{$compare_table_data[$k]['job_rate']}}% / {{$v['job_rate']}}%</td>
  41. <td>{{$compare_table_data[$k]['resume_num']}} / {{$v['resume_num']}}</td>
  42. <td>{{$compare_table_data[$k]['resume_rate']}}% / {{$v['resume_rate']}}%</td>
  43. <td>{{$compare_table_data[$k]['multiple']}} / {{$v['multiple']}}</td>
  44. @else
  45. <td>{{$v['name']}}</td>
  46. <td>{{$v['job_amount']}}</td>
  47. <td>{{$v['job_rate']}}%</td>
  48. <td>{{$v['resume_num']}}</td>
  49. <td>{{$v['resume_rate']}}%</td>
  50. <td>{{$v['multiple']}}</td>
  51. @endif
  52. </tr>
  53. @endforeach
  54. @endif
  55. </table>
  56. </div>
  57. </div>
  58. <div class="clear"></div>
  59. </div>
  60. @endsection
  61. @section('script')
  62. <script type="text/javascript">
  63. var data_name = [];
  64. var data_jobs = [];
  65. var data_resumes = [];
  66. @if($table_data)
  67. @foreach($table_data as $k=>$v)
  68. @if($v['name'] !='合计')
  69. data_name.push("{{$v['name']}}");
  70. data_jobs.push("{{$v['job_amount']}}");
  71. data_resumes.push("{{$v['resume_num']}}");
  72. @endif
  73. @endforeach
  74. @endif
  75. console.log(data_name);
  76. var colors = ['#2da1f9','#f9629a'];
  77. option = {
  78. title: [{
  79. left: '5',
  80. top: '5',
  81. text: '',
  82. textStyle:{
  83. color:'#565656',
  84. fontSize:14,
  85. fontWeight:'normal'
  86. }
  87. }],
  88. color:colors,
  89. tooltip: {
  90. trigger: 'axis',
  91. axisPointer: { // 坐标轴指示器,坐标轴触发有效
  92. type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
  93. }
  94. },
  95. legend: {
  96. data: ['需求人数', '求职人数','求人倍率'],
  97. align: 'right',
  98. top:10,
  99. right: 20,
  100. itemWidth:18,
  101. itemHeight:6
  102. },
  103. grid: {
  104. left: '8',
  105. right: '8',
  106. bottom: '10',
  107. containLabel: true
  108. },
  109. xAxis: [{
  110. type: 'category',
  111. boundaryGap:true,
  112. axisTick:{
  113. alignWithLabel:true
  114. },
  115. axisLabel:{
  116. interval: 0, //坐标轴刻度标签的显示间隔 , 0 强制显示所有标签。
  117. //rotate:-45, //刻度标签旋转的角度
  118. margin:15,
  119. textStyle: {
  120. color: '#333333',
  121. fontSize:10
  122. }
  123. },
  124. data: data_name
  125. }],
  126. yAxis: [{
  127. type: 'value',
  128. name: '',
  129. axisLabel: {
  130. formatter: '{value}'
  131. }
  132. }],
  133. series: [{
  134. name: '需求人数',
  135. type: 'bar',
  136. barMaxWidth: '40',
  137. barGap: 0,
  138. data: data_jobs
  139. }, {
  140. name: '求职人数',
  141. type: 'bar',
  142. barMaxWidth: '40',
  143. data: data_resumes
  144. }]
  145. };
  146. var myChart = echarts.init(document.getElementById('trend'));
  147. myChart.setOption(option);
  148. </script>
  149. @endsection