planner_schedule.blade.php 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  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/plannerSchedule')}}" method="post">
  60. <div style="display: flex;padding: 10px 0;">
  61. <input type="text" placeholder="请输入域名或项目名称" class="input-md form-control" name="keyword" id="keyword"
  62. style="width: 260px;">
  63. @if(in_array($role_id,[14,24]))
  64. <select data-placeholder="选择采编人员..." style="width:200px;" name="userId" class="form-control">
  65. <option value="">请选择策划人员</option>
  66. @foreach ($editors as $key => $value)
  67. <option value="{{$key}}">{{$value}}</option>
  68. @endforeach
  69. </select>
  70. @endif
  71. <input style="margin-left: 10px" type="submit" class="btn btn-primary" value="搜索">
  72. <button style="margin-left: 10px" type="button" class=" btn btn-primary button"> 保存</button>
  73. <a href="{{url('/admin/flow/plannerScheduleExport')}}" style="margin-left: 10px" class=" btn btn-primary">导出</a>
  74. </div>
  75. </form>
  76. </div>
  77. <table id="tfhover" class="tftable" border="1">
  78. <thead>
  79. <tr>
  80. <th colspan="15" style="text-align: center">策划师核心工作:关键词(关键词初选,关键词地图,关键词植入,TDK)+页面策划(首页策划,内页策划,软文策划)+产品指导文档
  81. <br>注:个人邮箱发送常用文件;关键词地图定稿公共邮箱发送;提前安排关键词地图;日期加打钩
  82. </th>
  83. </tr>
  84. <tr>
  85. <th colspan="6">项目配置</th>
  86. <th colspan="3">关键词工作</th>
  87. <th colspan="5">页面策划</th>
  88. </tr>
  89. <tr>
  90. <th style="width: 3%">序号</th>
  91. <th style="width: 8%">项目及采编</th>
  92. <th style="width: 8%">测试站网址</th>
  93. <th style="width: 8%">备注</th>
  94. <th style="width: 5%">采编</th>
  95. <th style="width: 5%">策划师</th>
  96. <th>关键词初选</th>
  97. <th>关键词地图</th>
  98. <th>TDK</th>
  99. <th>关键词植入</th>
  100. <th>首页策划</th>
  101. <th>产品指导交流</th>
  102. <th>内页策划</th>
  103. <th>特殊页策划</th>
  104. </tr>
  105. </thead>
  106. <tbody>
  107. @foreach($siteList as $key=>$value)
  108. <tr>
  109. <td>
  110. {{$key+1}}
  111. </td>
  112. <td data-a="{{$value->id}}" data-rank="{{$value->rank}}">
  113. <i @if($value->rank==1)class="fa fa-heart first-numb" @else class="fa fa-heart" @endif></i>
  114. <a onclick="units.openDetail('{{$value->id}}','{{$value->cn_title}}')">{{$value->cn_title}}</a>
  115. </td>
  116. <td data-a="{{$value->id}}" @if($value->is_url==1)class="fenish"@endif>{{$value->url}}</td>
  117. <td data-a="{{$value->id}}"><textarea style="border: none;width: 100%">{{$value->memo}}</textarea></td>
  118. <td data-a="{{$value->id}}">{{$value->editing}}</td>
  119. <td data-a="{{$value->id}}">{{$value->nickname}}</td>
  120. <td data-a="{{$value->is_keywords}}" @if($value->is_keywords==1)class="fenish"@endif>关键词初选</td>
  121. <td data-a="{{$value->is_keywords_map}}" @if($value->is_keywords_map==1)class="fenish"@endif>关键词地图</td>
  122. <td data-a="{{$value->is_tdk}}" @if($value->is_tdk==1)class="fenish"@endif>TDK</td>
  123. <td data-a="{{$value->is_keywords_implantation}}" @if($value->is_keywords_implantation==1)class="fenish"@endif>关键词植入</td>
  124. <td data-a="{{$value->is_home_planning}}" @if($value->is_home_planning==1)class="fenish"@endif>首页策划
  125. </td><td data-a="{{$value->is_product_guidance_document}}" @if($value->is_product_guidance_document==1)class="fenish"@endif>产品指导交流</td>
  126. <td data-a="{{$value->is_inside_page_planning}}" @if($value->is_inside_page_planning==1)class="fenish"@endif>内页策划</td>
  127. <td data-a="{{$value->is_special_page_planning}}" @if($value->is_special_page_planning==1)class="fenish"@endif>特殊页策划</td>
  128. </tr>
  129. @endforeach
  130. </tbody>
  131. </table>
  132. {{--<button type="button" class="button">保存</button>--}}
  133. @section('footer')
  134. <script>
  135. window.onload = function () {
  136. var tfrow = document.getElementById('tfhover').rows.length;
  137. var tbRow = [];
  138. for (var i = 1; i < tfrow; i++) {
  139. tbRow[i] = document.getElementById('tfhover').rows[i];
  140. tbRow[i].onmouseover = function () {
  141. this.style.backgroundColor = '#f3f8aa';
  142. };
  143. tbRow[i].onmouseout = function () {
  144. this.style.backgroundColor = '#ffffff';
  145. };
  146. }
  147. };
  148. $('#tfhover tbody tr td:nth-child(2) i').click(function () {
  149. var rank = 0;
  150. if ($(this).hasClass('first-numb')) {
  151. $(this).removeClass('first-numb');
  152. } else {
  153. rank = 1;
  154. $(this).addClass('first-numb');
  155. }
  156. var siteId = $(this).parent().attr('data-a');
  157. var ajaxConfig = {
  158. url: '/admin/flow/setSiteIdByRankId',
  159. type: 'post',
  160. data: {siteId: siteId, type: 2, rank: rank},
  161. success: function (result) {
  162. layer.msg(result.message, {icon: 6, time: 1000}, function () {
  163. window.location.reload();
  164. });
  165. }
  166. };
  167. tips.ajax(ajaxConfig);
  168. });
  169. var units = {
  170. openDetail: function (id, title) {
  171. tips.page('/admin/sites/' + id + '/overview', title);
  172. },
  173. }
  174. $('#tfhover tbody tr td').click(function () {
  175. $(this).toggleClass("fenish");
  176. if ($(this).hasClass("fenish")) {
  177. $(this).attr("data-a", "1");
  178. } else {
  179. $(this).attr("data-a", "0");
  180. }
  181. });
  182. $('#tfhover tbody tr td:first-child').unbind('click');
  183. $('#tfhover tbody tr td:nth-child(2)').unbind('click');
  184. $('#tfhover tbody tr td:nth-child(3)').unbind('click');
  185. $('#tfhover tbody tr td:nth-child(4)').unbind('click');
  186. $('#tfhover tbody tr td:nth-child(5)').unbind('click');
  187. $('#tfhover tbody tr td:nth-child(6)').unbind('click');
  188. $(".button").click(function () {
  189. var list = [];
  190. $("#tfhover tbody").find("tr").each(function () {
  191. var tdArr = $(this).children();
  192. var site_id = tdArr.eq(1).attr('data-a');
  193. var rank = tdArr.eq(1).attr('data-rank');
  194. var memo = tdArr.eq(3).find('textarea').val();
  195. var is_keywords = tdArr.eq(6).attr('data-a');
  196. var is_keywords_map = tdArr.eq(7).attr('data-a');
  197. var is_tdk = tdArr.eq(8).attr('data-a');
  198. var is_keywords_implantation = tdArr.eq(9).attr('data-a');
  199. var is_home_planning = tdArr.eq(10).attr('data-a');
  200. var is_product_guidance_document = tdArr.eq(11).attr('data-a');
  201. var is_inside_page_planning = tdArr.eq(12).attr('data-a');
  202. var is_special_page_planning = tdArr.eq(13).attr('data-a');
  203. var array = {};
  204. array.site_id = site_id;
  205. array.rank = rank;
  206. array.memo = memo;
  207. array.is_keywords = is_keywords;
  208. array.is_keywords_map = is_keywords_map;
  209. array.is_tdk = is_tdk;
  210. array.is_keywords_implantation = is_keywords_implantation;
  211. array.is_home_planning = is_home_planning;
  212. array.is_product_guidance_document = is_product_guidance_document;
  213. array.is_inside_page_planning = is_inside_page_planning;
  214. array.is_special_page_planning = is_special_page_planning;
  215. list.push(array);
  216. });
  217. var ajaxConfig = {
  218. url: '/admin/flow/plannerSchedule',
  219. type: 'post',
  220. data: {list: JSON.stringify(list)},
  221. success: function (result) {
  222. layer.msg(result.message, {icon: 6, time: 1000}, function () {
  223. window.location.reload();
  224. });
  225. }
  226. };
  227. tips.ajax(ajaxConfig);
  228. });
  229. </script>
  230. @endsection