bq_progress_rate.blade.php 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. @extends('admin/layout')
  2. @section('header')
  3. @endsection
  4. <style type="text/css">
  5. table.tftable {
  6. font-size: 12px;
  7. color: #333333;
  8. width: 100%;
  9. border-width: 1px;
  10. border-color: #9dcc7a;
  11. border-collapse: collapse;
  12. }
  13. table.tftable th {
  14. font-size: 12px;
  15. background-color: #abd28e;
  16. border-width: 1px;
  17. padding: 8px;
  18. border-style: solid;
  19. border-color: #9dcc7a;
  20. text-align: left;
  21. }
  22. table.tftable tr {
  23. background-color: #ffffff;
  24. }
  25. table.tftable td {
  26. font-size: 12px;
  27. border-width: 1px;
  28. padding: 8px;
  29. border-style: solid;
  30. border-color: #9dcc7a;
  31. }
  32. .fenish {
  33. background: #1D976C;
  34. color: #fff;
  35. }
  36. .blue {
  37. background: #6DD5FA;
  38. color: #fff;
  39. }
  40. #tfhover tbody tr td:nth-child(2) {
  41. position: relative;
  42. padding-left: 35px;
  43. }
  44. .fa {
  45. position: absolute;
  46. left: 10px;
  47. top: 0;
  48. color: #ddd;
  49. transform: translateY(-50%);
  50. top: 50%;
  51. font-size: 18px !important;
  52. cursor: pointer;
  53. }
  54. .first-numb {
  55. color: palevioletred;
  56. }
  57. </style>
  58. <div style="margin-left: 10px">
  59. <form action="{{url('/admin/flow/bqProgressRate')}}" method="post" id="form1">
  60. <div style="display: flex;padding: 10px 0;">
  61. <input type="text" placeholder="请输入域名或项目名称" class="input-md form-control" name="keyword" id="keyword"
  62. value="{{$result['keyword']??''}}"
  63. style="width: 260px;">
  64. <select data-placeholder="请选择优化师..." style="width:200px;" name="userId" id="userId"
  65. class="form-control">
  66. <option value="">请选择优化师</option>
  67. @foreach ($userList as $item)
  68. @if($item->role_id==26)
  69. <option value="{{$item->id}}"
  70. @if(!empty($result['userId']) && $result['userId']==$item->id) selected @endif>{{$item->nickname}}</option>
  71. @endif
  72. @endforeach
  73. </select>
  74. <input style="margin-left: 10px" type="submit" class="btn btn-primary" value="搜索">
  75. <button style="margin-left: 10px" type="button" class="btn btn-primary reset"> 重置</button>
  76. <button style="margin-left: 10px" type="button" class=" btn btn-primary button"> 保存</button>
  77. <a href="{{url('/admin/flow/bqProgressRateExport')}}" style="margin-left: 10px"
  78. class=" btn btn-primary">导出</a>
  79. </div>
  80. </form>
  81. </div>
  82. <table id="tfhover" class="tftable" border="1">
  83. <thead>
  84. <tr>
  85. <th colspan="21" style="text-align: center">
  86. 百千项目总进度
  87. </th>
  88. </tr>
  89. <tr>
  90. <th style="width: 3%;">序号</th>
  91. <th style="width: 10%;">项目</th>
  92. <th style="width: 5%;">优化师</th>
  93. <th style="width: 10%;">备注</th>
  94. <th>百千约访时间</th>
  95. <th>百千会议</th>
  96. <th>首页调整</th>
  97. <th>产品系列页面调整</th>
  98. <th>其他页面调整</th>
  99. <th>代码调整</th>
  100. <th>网页调整</th>
  101. <th>网站SEO质检</th>
  102. <th>小语言站</th>
  103. </tr>
  104. </thead>
  105. <tbody>
  106. @foreach($siteList as $key=>$value)
  107. <tr>
  108. <td>
  109. {{$key+1}}
  110. </td>
  111. <td data-a="{{$value['id']}}" data-rank="{{$value['rank']??''}}">
  112. <i @if($value['rank']==1)class="fa fa-heart first-numb" @else class="fa fa-heart" @endif></i>
  113. <a onclick="units.openDetail('{{$value['id']}}','{{$value['cn_title']}}')">{{$value['cn_title']}}</a>
  114. </td>
  115. <td>{{$value['optimization']}}</td>
  116. <td><textarea style="border: none;width: 100%">{{$value['memo']??''}}</textarea></td>
  117. <td>{{$value['bq_at']}}</td>
  118. <td @if($value['bq_meeting']==1)class="fenish"@endif>百千会议</td>
  119. <td @if($value['home_page_adjustment']==1)class="fenish"@endif >首页调整</td>
  120. <td @if($value['product_series_page_adjustment']==1)class="fenish"@endif>产品系列页面调整</td>
  121. <td @if($value['other_page_adjustments']==1)class="fenish"@endif>其他页面调整</td>
  122. <td @if($value['code_adjustment']==1)class="fenish"@endif>代码调整</td>
  123. <td @if($value['web_page_adjustment']==1)class="fenish"@endif>网页调整</td>
  124. <td @if($value['website_seo_quality_inspection']==1)class="fenish"@endif>网站SEO质检</td>
  125. <td @if($value['small_language_station']==1)class="fenish"@endif>小语言站</td>
  126. </tr>
  127. @endforeach
  128. </tbody>
  129. </table>
  130. @section('footer')
  131. <script>
  132. window.onload = function () {
  133. var tfrow = document.getElementById('tfhover').rows.length;
  134. var tbRow = [];
  135. for (var i = 1; i < tfrow; i++) {
  136. tbRow[i] = document.getElementById('tfhover').rows[i];
  137. tbRow[i].onmouseover = function () {
  138. this.style.backgroundColor = '#f3f8aa';
  139. };
  140. tbRow[i].onmouseout = function () {
  141. this.style.backgroundColor = '#ffffff';
  142. };
  143. }
  144. };
  145. $('#tfhover tbody tr td:nth-child(2) i').click(function () {
  146. var rank = 0;
  147. if ($(this).hasClass('first-numb')) {
  148. $(this).removeClass('first-numb');
  149. } else {
  150. rank = 1;
  151. $(this).addClass('first-numb');
  152. }
  153. var siteId = $(this).parent().attr('data-a');
  154. var ajaxConfig = {
  155. url: '/admin/flow/setSiteIdByRankId',
  156. type: 'post',
  157. data: {siteId: siteId, type: 3, rank: rank},
  158. success: function (result) {
  159. layer.msg(result.message, {icon: 6, time: 1000}, function () {
  160. window.location.reload();
  161. });
  162. }
  163. };
  164. tips.ajax(ajaxConfig);
  165. });
  166. var units = {
  167. openDetail: function (id, title) {
  168. tips.page('/admin/sites/' + id + '/overview', title);
  169. },
  170. };
  171. //重置
  172. $(function () {
  173. $('.reset').click(function () {
  174. $('#keyword').val('');
  175. $('#userId').val('');
  176. $('#form1').submit();
  177. });
  178. });
  179. $('#tfhover tbody tr td').click(function () {
  180. $(this).toggleClass("fenish");
  181. if ($(this).hasClass("fenish")) {
  182. $(this).attr("data-a", "1");
  183. } else {
  184. $(this).attr("data-a", "0");
  185. }
  186. });
  187. $('#tfhover tbody tr td:first-child').unbind('click');
  188. $('#tfhover tbody tr td:nth-child(2)').unbind('click');
  189. $('#tfhover tbody tr td:nth-child(3)').unbind('click');
  190. $('#tfhover tbody tr td:nth-child(4)').unbind('click');
  191. $('#tfhover tbody tr td:nth-child(5)').unbind('click');
  192. $('#tfhover tbody tr td:nth-child(6)').unbind('click');
  193. $('#tfhover tbody tr td:nth-child(7)').unbind('click');
  194. $('#tfhover tbody tr td:nth-child(8)').unbind('click');
  195. $('#tfhover tbody tr td:nth-child(9)').unbind('click');
  196. $('#tfhover tbody tr td:nth-child(10)').unbind('click');
  197. $('#tfhover tbody tr td:nth-child(11)').unbind('click');
  198. $('#tfhover tbody tr td:nth-child(12)').unbind('click');
  199. $('#tfhover tbody tr td:nth-child(13)').unbind('click');
  200. $(".button").click(function () {
  201. var list = [];
  202. $("#tfhover tbody").find("tr").each(function () {
  203. var tdArr = $(this).children();
  204. var site_id = tdArr.eq(1).attr('data-a');
  205. var rank = tdArr.eq(1).attr('data-rank');
  206. var memo = tdArr.eq(3).find('textarea').val();
  207. var array = {};
  208. array.site_id = site_id;
  209. array.rank = rank;
  210. array.memo = memo;
  211. list.push(array);
  212. });
  213. var ajaxConfig = {
  214. url: '/admin/flow/bqProgressRate',
  215. type: 'post',
  216. data: {list: JSON.stringify(list)},
  217. success: function (result) {
  218. layer.msg(result.message, {icon: 6, time: 1000}, function () {
  219. window.location.reload();
  220. });
  221. }
  222. };
  223. tips.ajax(ajaxConfig);
  224. });
  225. </script>
  226. @endsection