monitor_article.blade.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  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: #009688 !important;
  7. border-color: #009688 !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: #009688 !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="col-md-8 pull-right">--}}
  40. <div class="input-group">
  41. {{-- <select name="managerId" id="managerId" title="" class="form-control"
  42. style="width: 150px;float: right" onchange="units.selectPage();">
  43. <option value="">请选择项目经理</option>
  44. @foreach($managers as $item)
  45. <option value="{{$item->id}}">{{$item->nickname}}</option>
  46. @endforeach
  47. </select>--}}
  48. <select name="is_complete" id="is_complete" title=""
  49. class="form-control"
  50. style="width: 150px;float: right"
  51. onchange="units.selectPage();">
  52. <option value="0">请选择当月完成情况</option>
  53. <option value="1">完成</option>
  54. <option value="2">未完成</option>
  55. <option value="3">当月发布量0</option>
  56. </select>
  57. <select name="chinese_completion" id="chinese_completion" title="" class="form-control"
  58. style="width: 150px;float: right" onchange="units.selectPage();">
  59. <option value="0">请选择中文完成情况</option>
  60. <option value="1">超过2月库存</option>
  61. <option value="2">不足2月库存</option>
  62. <option value="3">不足1月库存</option>
  63. <option value="4">无库存</option>
  64. <option value="5">中文未反馈</option>
  65. </select>
  66. <select name="optimizerEditingId" id="optimizerEditingId" title="" class="form-control"
  67. style="width: 150px;float: right"
  68. onchange="units.selectPage();">
  69. <option value="">请选择优化师/优化采编</option>
  70. @foreach($optimizerEditing as $item)
  71. <option value="{{$item->id}}">{{$item->nickname}}</option>
  72. @endforeach
  73. </select>
  74. <select name="optimizerId" id="optimizerId" title="" class="form-control"
  75. style="width: 150px;float: right"
  76. onchange="units.selectPage();">
  77. <option value="">请选择优化组长</option>
  78. @foreach($optimizers as $item)
  79. <option value="{{$item->id}}">{{$item->nickname}}</option>
  80. @endforeach
  81. </select>
  82. <select name="articleEditingId" id="articleEditingId" title="" class="form-control"
  83. style="width: 150px;float: right"
  84. onchange="units.selectPage();">
  85. <option value="">请选择软文采编</option>
  86. @foreach($articleEditing as $item)
  87. <option value="{{$item->id}}">{{$item->nickname}}</option>
  88. @endforeach
  89. </select>
  90. <select name="serverId" id="serverId" title="" class="form-control"
  91. style="width: 150px;float: right" onchange="units.selectPage();">
  92. <option value="">请选择客服</option>
  93. @foreach($services as $item)
  94. <option value="{{$item->id}}">{{$item->nickname}}</option>
  95. @endforeach
  96. </select>
  97. <select name="siteStatus" id="siteStatus" title="" class="form-control"
  98. style="width: 150px;float: right" onchange="units.selectPage();">
  99. <option value="">请选择项目状态</option>
  100. @foreach($sitesStatus as $inx=>$item)
  101. @if(in_array($inx,[2,3,5]))
  102. <option value="{{$inx}}">{{$item}}</option>
  103. @endif
  104. @endforeach
  105. </select>
  106. <input type="text" placeholder="请输入域名或项目名称" class="input-md form-control"
  107. name="keyword"
  108. id="keyword" style="width: 200px;float: right">
  109. <span class="input-group-btn">
  110. <button type="button" class="btn btn-md btn-primary"
  111. onclick="units.search()"> 搜索</button>
  112. <button type="button" class="btn btn-md btn-primary" style="margin-left: 10px"
  113. name="btnReset"> 重置</button>
  114. </span>
  115. </div>
  116. </form>
  117. <hr>
  118. <div class="table-responsive">
  119. <span style="color: #d0648a">
  120. 软文指标:为合同数和续费篇数之和<br>
  121. 更新月份:该项目软文最新更新的日期,点击排序查看各项目更新情况<br>
  122. 中文文章:数据显示为本月更新之后剩余的中文文章数量能满足之后月份更新的月数<br>
  123. 本月未更新篇数:{{$notUpdated}}<br>
  124. 中文查找未完成项目数:{{$sites}}(提前两个月)<br>
  125. </span>
  126. <table id="table" class="table table-condensed" data-mobile-responsive="true"></table>
  127. </div>
  128. </div>
  129. </div>
  130. </div>
  131. </div>
  132. </div>
  133. </body>
  134. @endsection
  135. @section('footer')
  136. <script src="{{asset('js/plugins/layDate-v5.0.9/laydate/laydate.js')}}"></script>
  137. <script>
  138. laydate.render({
  139. elem: '#monthRange'
  140. , type: 'month'
  141. , range: '→'
  142. , format: 'yyyy-MM'
  143. });
  144. var units = {
  145. selectPage: function () {
  146. tips.selectPage();
  147. },
  148. search: function () {
  149. tips.selectPage();
  150. },
  151. openDetail: function (id, title) {
  152. tips.page('/admin/sites/' + id + '/overview', title);
  153. }
  154. };
  155. var config = {};
  156. config.url = '/admin/analyze/index/monitor_article';
  157. config.pageSize = 20;
  158. config.showColumns = true;
  159. config.columns = [ //字段
  160. {
  161. title: '序号', align: 'center', formatter: function (value, item, index) {
  162. return index + 1;
  163. }
  164. },
  165. {title: '公司', field: 'cn_title', align: 'center'},
  166. {title: '网站', field: 'domain', align: 'center'},
  167. /*{title: '预计续费时间', field: 'expect_renewal_at', align: 'center', sortable: true},*/
  168. {title: '项目阶段', field: 'statusTitle', align: 'center'},
  169. {title: '中文待定总数', field: 'undetermined', align: 'center'},
  170. {title: '中文文章', field: 'chineseArticles', align: 'center', sortable: true},
  171. {
  172. title: '软文指标', field: 'article_goal', align: 'center', sortable: true,
  173. formatter: function (value, row) {
  174. return row.article_goal + row.article_renewal_quantity;
  175. }
  176. },
  177. {title: '软文发布量', field: 'publishArticle', align: 'center', sortable: true},
  178. {title: '每月待更新软文数', field: 'articles_updates_per_month', align: 'center', sortable: true},
  179. {title: '当月发布量', field: 'publishThisMonth', align: 'center', sortable: true},
  180. {title: '更新月份', field: 'updateMonth', align: 'center', sortable: true},
  181. {title: '客服经理', field: 'server_title', align: 'center', visible: false},
  182. {title: '优化组长', field: 'optimizerTitle', align: 'center'},
  183. {title: '优化师/优化采编', field: 'optimizerEditing', align: 'center'},
  184. {title: '软文采编', field: 'articleEditing', align: 'center'},
  185. {title: '是否特殊软文', field: 'spec_article', align: 'center', visible: false},
  186. {
  187. title: '操作', field: 'id', align: 'center',
  188. formatter: function (value, row) {
  189. return '<button onclick="units.openDetail(' + value + ',\'' + row.cn_title + '\')" class="btn btn-xs"><span class="glyphicon glyphicon-menu-hamburger"></span>详情</button><br>';
  190. }
  191. }
  192. ];
  193. tips.bootstrapTable(config);
  194. </script>
  195. @endsection