collect.blade.php 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  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="webId" id="webId" class="form-control"
  41. style="width: 150px;float: right" onchange="units.selectPage();">
  42. <option value="">请选择前端</option>
  43. @foreach($web as $item)
  44. <option value="{{$item->id}}">{{$item->nickname}}</option>
  45. @endforeach
  46. </select>
  47. <select name="optimizersEditId" id="optimizersEditId" class="form-control"
  48. style="width: 150px;float: right" onchange="units.selectPage();">
  49. <option value="">请选择建站采编</option>
  50. @foreach($optimizers_edit as $item)
  51. <option value="{{$item->id}}">{{$item->nickname}}</option>
  52. @endforeach
  53. </select>
  54. <select name="optimizerId" id="optimizerId" class="form-control"
  55. style="width: 150px;float: right"
  56. onchange="units.selectPage();">
  57. <option value="">请选择优化组长</option>
  58. @foreach($optimizers as $item)
  59. <option value="{{$item->id}}">{{$item->nickname}}</option>
  60. @endforeach
  61. </select>
  62. <input type="text" placeholder="请输入域名或项目名称" class="input-md form-control"
  63. name="keyword"
  64. id="keyword" style="width: 260px;float: right">
  65. <span class="input-group-btn">
  66. <button type="button" class="btn btn-md btn-primary"
  67. onclick="units.search()"> 搜索</button>
  68. <button type="button" class="btn btn-md" style="margin-left: 10px"
  69. name="btnReset"> 重置</button>
  70. </span>
  71. </div>
  72. </form>
  73. <hr>
  74. <div class="table-responsive">
  75. <table id="table" class="table table-condensed" data-mobile-responsive="true"></table>
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. </body>
  83. @endsection
  84. @section('footer')
  85. <script>
  86. var units = {
  87. selectPage: function () {
  88. tips.selectPage();
  89. },
  90. search: function () {
  91. $('#table').bootstrapTable('selectPage', 1);
  92. },
  93. openDetail: function (id, title) {
  94. tips.page('/admin/sites/' + id + '/overview', title);
  95. },
  96. saveMemo: function (id) {
  97. var memo = $('#memo' + id).val();
  98. if (memo.length > 250) {
  99. layer.msg('字符长度过长,请控制在250字符以内');
  100. return;
  101. }
  102. tips.ajax({
  103. url: '/admin/collect/speedMeasurement/saveMemo',
  104. type: 'get',
  105. data: {siteId: id, memo: memo, type: 2},
  106. tableRefresh: '#table'
  107. });
  108. },
  109. };
  110. var config = {};
  111. config.url = '/admin/collect/index';
  112. config.pageSize = 20;
  113. config.showColumns = true;
  114. config.columns = [ //字段
  115. {
  116. title: '序号', align: 'center', formatter: function (value, item, index) {
  117. return index + 1;
  118. },
  119. width: '10px'
  120. },
  121. {title: '项目', field: 'cn_title', align: 'center'},
  122. {title: '域名', field: 'domain', align: 'center'},
  123. {title: '优化组长', field: 'optimization', align: 'center'},
  124. {title: '优化师/优化采编', field: 'optimizationAe', align: 'center'},
  125. {title: '前端', field: 'web', align: 'center'},
  126. {title: '404个数', field: 'count', align: 'center'},
  127. {
  128. title: '原因备注', field: 'memo', align: 'center',
  129. formatter: function (value, row) {
  130. return '<input type="text" class="form-control" id="memo' + row.site_id + '" value="' + row.not_found + '"><button onclick="units.saveMemo(' + row.site_id + ')" class="btn btn-md">确定</button>';
  131. },
  132. cellStyle: function () {
  133. return {css: {'display': 'flex'}};
  134. }
  135. },
  136. {
  137. title: '查看', field: 'id', align: 'center',
  138. formatter: function (value, row) {
  139. return '<button onclick="units.openDetail(' + row.site_id + ',\'' + row.cn_title + '\')" class="btn btn-xs"><span class="glyphicon glyphicon-menu-hamburger"></span>详情</button><br>';
  140. }
  141. }
  142. ];
  143. tips.bootstrapTable(config);
  144. </script>
  145. @endsection