keywords_expand.blade.php 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. @extends('admin/layout')
  2. @section('header')
  3. <link href="{{asset('css/plugins/switchery/switchery.css')}}" rel="stylesheet">
  4. <style>
  5. .btn-danger, .btn-primary, .btn-info {
  6. background: #2a94e0 !important;
  7. border-color: #2a94e0 !important;
  8. }
  9. .table-striped > tbody > tr:nth-of-type(odd) {
  10. background: #f8f8f8 !important;
  11. }
  12. .table-striped > tbody > tr .btn {
  13. background: none !important;
  14. }
  15. .table-striped > tbody > tr td {
  16. font-size: 14px !important;
  17. }
  18. .table-striped > tbody > tr:hover {
  19. background: #ffebd8 !important;
  20. }
  21. .table-striped > tbody > tr:hover .btn {
  22. background: #2a94e0 !important;
  23. color: #fff !important;
  24. }
  25. .table-striped > tbody > tr:hover .btn .glyphicon {
  26. color: #fff !important;
  27. }
  28. </style>
  29. @endsection
  30. @section('content')
  31. @php $authUser=auth()->user() @endphp
  32. <body class="gray-bg">
  33. <div class="wrapper wrapper-content animated fadeInRight">
  34. <div class="row">
  35. <div class="col-sm-12">
  36. <div class="ibox float-e-margins">
  37. <div class="ibox-content">
  38. <form class="row" id="searchForm" onsubmit="units.search();return false;">
  39. <div class="input-group">
  40. <select name="sellerId" id="sellerId" title="" class="form-control"
  41. style="width: 150px;float: right" onchange="units.selectPage();">
  42. <option value="">请选择销售</option>
  43. @foreach($sellerUsers as $item)
  44. <option value="{{$item->id}}">{{$item->nickname}}</option>
  45. @endforeach
  46. </select>
  47. <select name="optimizationEditingUserId" id="optimizationEditingUserId" title=""
  48. class="form-control"
  49. style="width: 150px;float: right" onchange="tips.selectPage();">
  50. <option value="">请选择优化师/优化采编</option>
  51. @foreach($optimizationEditingUser as $item)
  52. <option value="{{$item->id}}">{{$item->nickname}}</option>
  53. @endforeach
  54. </select>
  55. <select name="optimizerId" id="optimizerId" title="" class="form-control"
  56. style="width: 150px;float: right"
  57. onchange="units.selectPage();">
  58. <option value="">请选择优化组长</option>
  59. @foreach($optimizers as $item)
  60. <option value="{{$item->id}}">{{$item->nickname}}</option>
  61. @endforeach
  62. </select>
  63. <select name="serverId" id="serverId" title="" class="form-control"
  64. style="width: 150px;float: right" onchange="units.selectPage();">
  65. <option value="">请选择客服</option>
  66. @foreach($services as $item)
  67. <option value="{{$item->id}}">{{$item->nickname}}</option>
  68. @endforeach
  69. </select>
  70. <select name="type" id="type" title="" class="form-control"
  71. style="width: 150px;float: right" onchange="units.selectPage();">
  72. <option value="0" selected="selected">三月无更新</option>
  73. <option value="1">从未拓展过</option>
  74. <option value="2">全部拓展过</option>
  75. </select>
  76. <input type="text" placeholder="请输入域名或项目名称" class="input-md form-control"
  77. name="keyword"
  78. id="keyword" style="width: 200px;float: right">
  79. <span class="input-group-btn">
  80. <button type="button" class="btn btn-md btn-primary"
  81. onclick="units.search()"> 搜索</button>
  82. <button type="button" class="btn btn-md" style="margin-left: 10px"
  83. name="btnReset"> 重置</button>
  84. </span>
  85. </div>
  86. </form>
  87. <hr>
  88. <div class="table-responsive">
  89. <table id="table" class="table table-condensed" data-mobile-responsive="true"></table>
  90. </div>
  91. </div>
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. </body>
  97. @endsection
  98. @section('footer')
  99. <script src="{{asset('js/plugins/layDate-v5.0.9/laydate/laydate.js')}}"></script>
  100. <script>
  101. var units = {
  102. selectPage: function () {
  103. tips.selectPage();
  104. },
  105. search: function () {
  106. tips.selectPage();
  107. },
  108. openDetail: function (id, title) {
  109. tips.page('/admin/sites/' + id + '/overview', title);
  110. },
  111. saveMemo: function (id) {
  112. var memo = $('#memo' + id).val();
  113. if (memo.length > 250) {
  114. layer.msg('字符长度过长,请控制在250字符以内');
  115. return;
  116. }
  117. tips.ajax({
  118. url: '/admin/collect/speedMeasurement/saveMemo',
  119. type: 'get',
  120. data: {siteId: id, memo: memo, type: 3},
  121. tableRefresh: '#table'
  122. });
  123. },
  124. };
  125. var config = {};
  126. config.url = '/admin/collect/keywords-expand';
  127. config.pageSize = 20;
  128. config.showColumns = true;
  129. config.columns = [ //字段
  130. {
  131. title: '序号', align: 'center', formatter: function (value, item, index) {
  132. return index + 1;
  133. },
  134. width: '10px'
  135. },
  136. {title: '公司', field: 'cn_title', align: 'center'},
  137. {title: '项目状态', field: 'status', align: 'center'},
  138. {title: '网站', field: 'domain', align: 'center'},
  139. {title: '过期时间', field: 'expired_at', align: 'center'},
  140. {title: '达标时间', field: 'reach_at', align: 'center'},
  141. {title: '关键词指标', field: 'keyword_goal', align: 'center'},
  142. {title: '实际达标关键词', field: 'top10', align: 'center'},
  143. {title: '最后一次拓展时间', field: 'ym', align: 'center'},
  144. {title: '优化组长', field: 'optimizer', align: 'center'},
  145. {title: '优化师/优化采编', field: 'optimizerAe', align: 'center'},
  146. {
  147. title: '原因备注', field: 'memo', align: 'center',
  148. formatter: function (value, row) {
  149. return '<input type="text" class="form-control" id="memo' + row.id + '" value="' + row.keyword_memo + '"><button onclick="units.saveMemo(' + row.id + ')" class="btn btn-md">确定</button>';
  150. },
  151. cellStyle: function () {
  152. return {css: {'display': 'flex'}};
  153. }
  154. },
  155. {
  156. title: '操作', field: 'id', align: 'center',
  157. formatter: function (value, row) {
  158. return '<button onclick="units.openDetail(' + value + ',\'' + row.cn_title + '\')" class="btn btn-xs"><span class="glyphicon glyphicon-menu-hamburger"></span>详情</button><br>';
  159. }
  160. }
  161. ];
  162. tips.bootstrapTable(config);
  163. </script>
  164. @endsection