speed.blade.php 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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" title="" 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" title="" 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" title="" 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: 200px;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: 1},
  106. tableRefresh: '#table'
  107. });
  108. }
  109. };
  110. // 月流量 月询盘 月排名 月软文 项目经理 项目进度
  111. var config = {};
  112. config.url = '/admin/collect/speedMeasurement';
  113. config.pageSize = 20;
  114. config.showColumns = true;
  115. config.columns = [ //字段
  116. {
  117. title: '序号', align: 'center', formatter: function (value, item, index) {
  118. return index + 1;
  119. },
  120. width: '10px'
  121. },
  122. {title: '项目', field: 'cn_title', align: 'center'},
  123. {title: '域名', field: 'domain', align: 'center'},
  124. {title: '优化组长', field: 'optimization', align: 'center'},
  125. {title: '优化师/优化采编', field: 'optimizationAe', align: 'center'},
  126. {title: '前端', field: 'web', align: 'center'},
  127. {title: 'pc端分数', field: 'pcSpeedMeasurement', align: 'center'},
  128. {title: '移动端分数', field: 'mobileSpeedMeasurement', align: 'center'},
  129. {
  130. title: '原因备注', field: 'memo', align: 'center',
  131. formatter: function (value, row) {
  132. return '<input type="text" class="form-control" id="memo' + row.id + '" value="' + row.speed_memo + '"><button onclick="units.saveMemo(' + row.id + ')" class="btn btn-md">确定</button>';
  133. },
  134. cellStyle: function () {
  135. return {css: {'display': 'flex'}};
  136. }
  137. },
  138. {
  139. title: '查看', field: 'id', align: 'center',
  140. formatter: function (value, row) {
  141. return '<button onclick="units.openDetail(' + row.id + ',\'' + row.cn_title + '\')" class="btn btn-xs"><span class="glyphicon glyphicon-menu-hamburger"></span>详情</button><br>';
  142. }
  143. }
  144. ];
  145. tips.bootstrapTable(config);
  146. </script>
  147. @endsection