example.blade.php 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  1. @extends('admin/layout')
  2. @section('header')
  3. <link href="{{asset('css/plugins/switchery/switchery.css')}}" rel="stylesheet">
  4. <link href="{{asset('css/plugins/chosen/chosen.css')}}" rel="stylesheet">
  5. <link href="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.9/dist/css/bootstrap-select.min.css"
  6. rel="stylesheet">
  7. <link href="{{asset('js/plugins/jquery-pretty-radio-checkbox/css/jquery-labelauty.css')}}" rel="stylesheet">
  8. <style>
  9. .btn-danger, .btn-primary, .btn-info {
  10. background: #2a94e0 !important;
  11. border-color: #2a94e0 !important;
  12. }
  13. .table-striped > tbody > tr:nth-of-type(odd) {
  14. background: #f8f8f8 !important;
  15. }
  16. .table-striped > tbody > tr .btn {
  17. background: none !important;
  18. }
  19. .table-striped > tbody > tr td {
  20. font-size: 14px !important;
  21. }
  22. .table-striped > tbody > tr:hover {
  23. background: #ffebd8 !important;
  24. }
  25. .table-striped > tbody > tr:hover .btn {
  26. background: #2a94e0 !important;
  27. color: #fff !important;
  28. }
  29. .table-striped > tbody > tr:hover .btn .glyphicon {
  30. color: #fff !important;
  31. }
  32. .input-group .form-control {
  33. width: 200px;
  34. }
  35. input.labelauty + label {
  36. color: #333333;
  37. }
  38. </style>
  39. @endsection
  40. @section('content')
  41. @php $authUser=auth()->user() @endphp
  42. <body class="gray-bg">
  43. <div class="wrapper wrapper-content animated fadeInRight">
  44. <div class="row">
  45. <div class="col-sm-12">
  46. <div class="ibox float-e-margins">
  47. <div class="ibox-content">
  48. <form class="row" id="searchForm" onsubmit="units.search();return false;">
  49. <div class="input-group">
  50. <select name="sellerId" id="sellerId" class="form-control"
  51. style="width: 150px;float: right" onchange="units.selectPage();">
  52. <option value="">请选择销售</option>
  53. @foreach($sellerUsers as $item)
  54. <option value="{{$item->id}}">{{$item->nickname}}</option>
  55. @endforeach
  56. </select>
  57. <select name="serverId" id="serverId" class="form-control"
  58. style="width: 150px;float: right" onchange="units.selectPage();">
  59. <option value="">请选择客服</option>
  60. @foreach($services as $item)
  61. <option value="{{$item->id}}">{{$item->nickname}}</option>
  62. @endforeach
  63. </select>
  64. {{-- <select name="managerId" id="managerId" class="form-control"
  65. style="width: 150px;float: right" onchange="units.selectPage();">
  66. <option value="">请选择项目经理</option>
  67. @foreach($managers as $item)
  68. <option value="{{$item->id}}">{{$item->nickname}}</option>
  69. @endforeach
  70. </select>--}}
  71. <select name="optimizerId" id="optimizerId" class="form-control"
  72. style="width: 150px;float: right"
  73. onchange="units.selectPage();">
  74. <option value="">请选择优化组长</option>
  75. @foreach($optimizers as $item)
  76. <option value="{{$item->id}}">{{$item->nickname}}</option>
  77. @endforeach
  78. </select>
  79. <select name="manageHelperId" id="manageHelperId" class="form-control"
  80. style="width: 150px;float: right"
  81. onchange="units.selectPage();">
  82. <option value="">请选择项目经理</option>
  83. @foreach($managerHelpers as $item)
  84. <option value="{{$item->id}}">{{$item->nickname}}</option>
  85. @endforeach
  86. </select>
  87. <select name="businessId" id="businessId" class="form-control"
  88. style="width: 150px;float: right" onchange="units.selectPage();">
  89. <option value="">请选择行业</option>
  90. @foreach($business as $key=>$item)
  91. <option value="{{$key}}">{{$item}}</option>
  92. @endforeach
  93. </select>
  94. <span class="input-group-btn">
  95. <button type="button" class="btn btn-md btn-primary"
  96. onclick="units.search()"> 搜索</button>
  97. <button type="button" class="btn btn-md btn-primary" style="margin-left: 10px"
  98. name="btnReset"> 重置</button>
  99. </span>
  100. </div>
  101. <div>
  102. <ul class="checkbox">
  103. <li style="float: right;margin: 2px;list-style-type:none;"><input type="checkbox"
  104. name="caseIds1"
  105. value="21"
  106. data-labelauty="结构化数据呈现">
  107. </li>
  108. <li style="float: right;margin: 2px;list-style-type:none;"><input type="checkbox"
  109. name="caseIds2"
  110. value="22"
  111. data-labelauty="关键词分析">
  112. </li>
  113. <li style="float: right;margin: 2px;list-style-type:none;"><input type="checkbox"
  114. name="caseIds3"
  115. value="23"
  116. data-labelauty="软文优化">
  117. </li>
  118. <li style="float: right;margin: 2px;list-style-type:none;"><input type="checkbox"
  119. name="caseIds4"
  120. value="24"
  121. data-labelauty="维基百科">
  122. </li>
  123. <li style="float: right;margin: 2px;list-style-type:none;"><input type="checkbox"
  124. name="caseIds5"
  125. value="25"
  126. data-labelauty="知识图谱">
  127. </li>
  128. <li style="float: right;margin: 2px;list-style-type:none;"><input type="checkbox"
  129. name="caseIds6"
  130. value="26"
  131. data-labelauty="竞价">
  132. </li>
  133. <li style="float: right;margin: 2px;list-style-type:none;"><input type="checkbox"
  134. name="caseIds7"
  135. value="27"
  136. data-labelauty="付费外链">
  137. </li>
  138. </ul>
  139. <input type="text" placeholder="请输入域名或项目名称" class="input-md form-control"
  140. name="keyword" id="keyword" style="float: right;width: 200px;margin: 4px">
  141. </div>
  142. </form>
  143. <hr>
  144. <div class="table-responsive">
  145. <table id="table" class="table table-condensed" data-mobile-responsive="true"></table>
  146. </div>
  147. </div>
  148. </div>
  149. </div>
  150. </div>
  151. </div>
  152. </body>
  153. @endsection
  154. @section('footer')
  155. <script src="{{asset('js/plugins/jquery-pretty-radio-checkbox/js/jquery-labelauty.js')}}"></script>
  156. <script src="{{asset('js/plugins/layDate-v5.0.9/laydate/laydate.js')}}"></script>
  157. <script src="{{asset('js/plugins/switchery/switchery.js')}}"></script>
  158. <script src="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.9/dist/js/bootstrap-select.min.js"></script>
  159. <script>
  160. $(function () {
  161. $(':input').labelauty();
  162. });
  163. laydate.render({
  164. elem: '#monthRange'
  165. , type: 'month'
  166. , range: '→'
  167. , format: 'yyyy-MM'
  168. });
  169. var units = {
  170. selectPage: function () {
  171. tips.selectPage();
  172. },
  173. search: function () {
  174. tips.selectPage();
  175. },
  176. openDetail: function (id, title) {
  177. tips.page('/admin/sites/' + id + '/overview', title);
  178. },
  179. sendMessage: function (siteId) {
  180. var mobile = $('#mobile_' + siteId).val();
  181. layer.confirm('确定发送吗?', {icon: 3, title: '发送短信'}, function (index, layero) {
  182. layer.close(index);
  183. tips.ajax({
  184. url: '/admin/analyze/index/sendMessage',
  185. type: 'post',
  186. data: {siteId: siteId, mobile: mobile},
  187. tableRefresh: '#table'
  188. });
  189. });
  190. },
  191. open: function (id) {
  192. var url = $('#example_' + id).text();
  193. window.open(url);
  194. }
  195. };
  196. // 月流量 月询盘 月排名 月软文 项目经理 项目进度
  197. var config = {};
  198. config.url = '/admin/analyze/index/example';
  199. config.pageSize = 20;
  200. config.showColumns = true;
  201. config.columns = [ //字段
  202. {
  203. title: '序号', align: 'center', formatter: function (value, item, index) {
  204. return index + 1;
  205. },
  206. width: '10px'
  207. },
  208. {title: '公司', field: 'cn_title', align: 'center'},
  209. {title: '网站', field: 'domain', align: 'center'},
  210. {title: '下单时间', field: 'order_at', align: 'center'},
  211. {title: '上线时间', field: 'online_at', align: 'center'},
  212. {title: '达标时间', field: 'reach_at', align: 'center'},
  213. {title: '产品', field: 'product', align: 'center'},
  214. {title: '行业', field: 'businessTitle', align: 'center'},
  215. {title: '关键词指标', field: 'keyword_goal', align: 'center'},
  216. {title: '实际关键词量', field: 'top10', align: 'center'},
  217. {title: '月流量', field: 'traffic', align: 'center'},
  218. {title: '询盘总数', field: 'inquire', align: 'center'},
  219. {title: '案例板块', field: 'case', align: 'center'},
  220. {
  221. title: '案例链接', field: 'example_url', align: 'center',
  222. formatter: function (value, row) {
  223. return '<a onclick="units.open(' + row.id + ')" id="example_' + row.id + '" >' + row.example_url + '</a>';
  224. }
  225. },
  226. {
  227. title: '发送短信', field: '', align: 'center',
  228. formatter: function (value, row) {
  229. if (row.example_url) {
  230. return '<input type="text" class="form-control" id="mobile_' + row.id + '" value="">' +
  231. '<button onclick="units.sendMessage(' + row.id + ')" class="btn btn-md btn-primary" style="background: #2a94e0 !important;border: none">发送验证码</button>&nbsp;';
  232. }
  233. }
  234. },
  235. {title: '项目销售', field: 'seller_title', align: 'center', visible: false},
  236. {title: '客服经理', field: 'server_title', align: 'center', visible: false},
  237. {title: '项目经理', field: 'managers_title', align: 'center', visible: false},
  238. {title: '项目助理', field: 'manage_helper_title', align: 'center', visible: false},
  239. {title: '优化师', field: 'optimizerTitle', align: 'center', visible: false},
  240. {title: '项目采编', field: 'ae_title', align: 'center', visible: false},
  241. {
  242. title: '操作', field: 'id', align: 'center',
  243. formatter: function (value, row) {
  244. return '<button onclick="units.openDetail(' + value + ',\'' + row.cn_title + '\')" class="btn btn-xs"><span class="glyphicon glyphicon-menu-hamburger"></span>详情</button><br>';
  245. }
  246. }
  247. ];
  248. tips.bootstrapTable(config);
  249. </script>
  250. @endsection