SecondaryCheckTwo.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  6. <link rel="shortcut icon" href="/img/logo.png" />
  7. <link rel="bookmark" href="/img/logo.png" />
  8. <link rel="stylesheet" href="/plugins/bootstrap-4.3.1/css/bootstrap.min.css">
  9. <link rel="stylesheet" href="/plugins/font-awesome-4.7.0/css/font-awesome.min.css">
  10. <link href="/Plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet" />
  11. <link rel="stylesheet" href="../DashBoard.css?v3" />
  12. <script src="/Plugins/jquery-3.4.1/jquery-3.4.1.min.js"></script>
  13. <script src="/Plugins/xrequest/xrequest.min.js"></script>
  14. <title>东科软件</title>
  15. </head>
  16. <body class="bg-white p-0 dk-report">
  17. <!--实时缺陷记录-->
  18. <div class="container-fluid pt-1 p-0 box_1920_1080">
  19. <div class="position-absolute">
  20. <span id="实时缺陷加载" class="dk-report-loading" style="padding-left: 290px;font-size: 13px;color: #38dcff;font-weight: 700;float: left;padding-top: 40px;"></span>
  21. </div>
  22. <h4 class="text-center pb-2 dk-report-title" style="font-size: 60px; font-weight: bolder;color: #f8f9fa;">二检看板</h4>
  23. <table id="二检" class="table-hover table-striped" style="font-size: 14px; width: 1866px; margin-left: 27px; margin-top: -10px;">
  24. <thead style="border: 1px solid #38dcff ">
  25. <tr style="height: 47px; width: 1866px;">
  26. <!--<td scope="col" class="text-center" style="width: 130px; font-size: 40px; color: #f8f9fa;"><div id="wendu" name="wendu"></div></td>
  27. <td id="shidu" name="shidu" scope="col" class="text-center" style="width: 130px; font-size: 40px; color: #f8f9fa;"><div id="shidu" name="shidu"></div></td>-->
  28. <td scope="col" class="text-center" style="text-align: right;width: 130px; font-size: 30px; color: #f8f9fa; ">
  29. <div id="dqsj" name="dqsj" style="float: right"></div>
  30. </td>
  31. </tr>
  32. </thead>
  33. </table>
  34. <div>
  35. <table class="table-hover table-striped" style="font-size: 14px; width: 1866px; margin-left: 27px; margin-top: -15px;">
  36. <tr style="height: 47px; width: 1866px;">
  37. <td scope="col" class="text-center" id="sumjs" style="width: 918px; font-size: 75px; color: #f8f9fa; ">--</td>
  38. <td scope="col" class="text-center" id="sumhgl" style="width: 918px; font-size: 75px; color: #f8f9fa; ">总合格率:100%</td>
  39. </tr>
  40. </table>
  41. <table class="table-hover table-striped" style="font-size: 14px; width: 1866px; margin-left: 27px; margin-top: -15px;">
  42. <tr style="height: 27px; width: 1866px;">
  43. <td scope="col" class="text-center" id="CrackSum" style="width: 918px; font-size: 55px; color: #f8f9fa; " colspan="10">--</td>
  44. </tr>
  45. </table>
  46. </div>
  47. <!-- #region 横板 -->
  48. <div class="box_body" style="display: flex; flex-direction: column; margin-top:-1%;margin-left:27px;">
  49. <!--表格-->
  50. <div style="width: 1866px; height: 830px; display: flex; flex-direction: row; ">
  51. <div style="width: 60%; height: 930px; padding-right: 2px;">
  52. <table cellspacing="0" cellpadding="0" border="0" style="width: 100%; font-size: 35px;">
  53. <tr class="tr_title_warning" style=" font-size: 45px;">
  54. <td colspan="9" style="color:white;" id="lieone">裂(一线):</td>
  55. </tr>
  56. <tr class="tr_title_warning" style=" font-size: 35px;">
  57. <td style="font-size: 30px; color: white; width: 30%;">责任工号</td>
  58. <td style="font-size: 30px; color: white; width: 30%">位置</td>
  59. <td style="font-size: 30px; color: white; width: 30%">数量</td>
  60. </tr>
  61. </table>
  62. <div style="display: flex; height: 600px; overflow: hidden;;margin-top:-13px">
  63. <table id="firstTable_template" style="display:none;">
  64. <tr class="tr_title_warning" style="height: 30px; font-size: 35px; ">
  65. <td style="font-size: 30px; color: white; width: 30%">{dg}</td>
  66. <td style="font-size: 15px; color: white; width: 30% ">{dp}</td>
  67. <td style="font-size: 30px; color: white; width: 30%">{dc}</td>
  68. </tr>
  69. </table>
  70. <table id="firstTable" cellspacing="0" cellpadding="0" border="0" style="width: 100%; ">
  71. </table>
  72. </div>
  73. </div>
  74. <div style="width: 60%;height:930px;">
  75. <table cellspacing="0" cellpadding="0" border="0" style="width: 100%;">
  76. <tr class="tr_title_warning" style=" font-size: 45px;">
  77. <td colspan="9" style="color:white;" id="lietwo">裂(二线):</td>
  78. </tr>
  79. <tr class="tr_title_warning" style=" font-size: 35px;">
  80. <td style="font-size: 30px; color: white; width: 30%">责任工号</td>
  81. <td style="font-size: 30px; color: white; width: 30%">位置</td>
  82. <td style="font-size: 30px; color: white; width: 30%">数量</td>
  83. </tr>
  84. </table>
  85. <div style="display: flex; height: 600px; overflow: hidden;; margin-top: -13px ">
  86. <table id="SecondTable_template" style="display: none; ">
  87. <tr class="tr_bg_light_orange" style="height:30px;">
  88. <td style="font-size: 30px; color: white; width: 30% ">{mg}</td>
  89. <td style="font-size: 15px; color: white; width: 30%">{mp}</td>
  90. <td style="font-size: 30px; color: white; width: 30% ">{mc}</td>
  91. </tr>
  92. </table>
  93. <table id="SecondTable" cellspacing="0" cellpadding="0" border="0" style="width: 100%;">
  94. </table>
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. <!-- #endregion -->
  101. <!--版权信息-->
  102. <script src="/Plugins/bootstrap-4.3.1/js/bootstrap.bundle.min.js"></script>
  103. <script src="/Plugins/bootstrap-table/bootstrap-table.min.js"></script>
  104. <script src="/Plugins/bootstrap-table/bootstrap-table-locale-all.min.js"></script>
  105. <script src="/Plugins/sweetalert/sweetalert.min.js"></script>
  106. <script src="/Plugins/chartjs-2.8.0/chart-2.8.min.js"></script>
  107. <script src="/Plugins/chartjs-2.8.0/utils.js"></script>
  108. <script type="text/javascript">
  109. setTimeout("window.location.href= 'http://172.19.22.31:9200/main/Procedure/test8/SecondaryCheck.html'", 60000);
  110. </script>
  111. <script>
  112. //实时缺陷刷新时间
  113. var refreshTime2 = 30000;
  114. var currentTime2 = 0;
  115. var firstInterval;
  116. var firstTableRowCount = 0;
  117. var SecondInterval;
  118. var SecondTableRowCount = 0;
  119. $(document).ready(function () {
  120. firstDayTable();
  121. SecondDayTable();
  122. TableLoad();
  123. doGetTime = setInterval(function () { TableLoad(); }, 15000);
  124. //刷新时间
  125. loadServerTime();
  126. doGetTime = setInterval(function () { FastTable(); }, 20000);
  127. doGetTime = setInterval(function () { loadServerTime(); }, 10000);
  128. });
  129. function loadServerTime() {
  130. $.get('SecondaryCheckTwo.ashx?m=fwq', function (data) {
  131. var json = JSON.parse(data);
  132. if (json["success"] == true) {
  133. $('#dqsj').html(json["sj"]);
  134. }
  135. });
  136. }
  137. function FastTable() {
  138. Jssum();
  139. //总合格率
  140. HGL();
  141. CrackSum();
  142. }
  143. function TableLoad() {
  144. if (firstTableRowCount <= 10) {
  145. //doGetTime = setInterval(function () { firstDayTable(); }, 15000);
  146. firstDayTable();
  147. }
  148. if (SecondTableRowCount <= 10) {
  149. //doGetTime = setInterval(function () { SecondDayTable(); }, 15000);
  150. SecondDayTable();
  151. }
  152. }
  153. function CrackSum() {
  154. $.get('SecondaryCheckTwo.ashx?m=SumCrack', function (data) {
  155. var json = JSON.parse(data);
  156. if (json["success"] == true) {
  157. $('#lieone').text("裂(一线):" + json["rows"][0]["一线"]);
  158. $('#lietwo').text("裂(二线):" + json["rows"][1]["一线"]);
  159. $('#CrackSum').text("裂总量:" + json["rows"][2]["一线"]);
  160. }
  161. });
  162. }
  163. function firstTableScroll() {
  164. var scrollHeight = $("#firstTable_template").find("tr").outerHeight();
  165. $("#firstTable").animate({ marginTop: -scrollHeight, }, 500,
  166. function () {
  167. $(this).css({ marginTop: "0px", }).find("tr:first").appendTo(this);
  168. if (firstTableRowCount > -1) {
  169. firstTableRowCount--;
  170. } else {
  171. clearInterval(firstInterval);
  172. firstDayTable();
  173. }
  174. }
  175. );
  176. }
  177. //明细表
  178. function firstDayTable() {
  179. $.get("SecondaryCheckTwo.ashx?m=firstTable", function (data) {
  180. var json = JSON.parse(data);
  181. if (json["success"] == true) {
  182. $("#firstTable").html("");
  183. for (var i = 0; i < json["rows"].length; i++) {
  184. var temp = $("#firstTable_template").html();
  185. temp = temp.replace("<tbody>", "").replace("</tbody>", "");
  186. temp = temp.replace('{dg}', json["rows"][i]['CODE']);
  187. temp = temp.replace('{dp}', json["rows"][i]['位置统计']);
  188. temp = temp.replace('{dc}', json["rows"][i]['一线产量']);
  189. $("#firstTable").append(temp);
  190. }
  191. firstTableRowCount = json["rows"].length;
  192. if (firstTableRowCount > 10) {
  193. firstInterval = setInterval(firstTableScroll, 2000);
  194. }
  195. }
  196. });
  197. }
  198. function SecondTableScroll() {
  199. var scrollHeight = $("#SecondTable_template").find("tr").outerHeight();
  200. $("#SecondTable").animate({ marginTop: -scrollHeight, }, 500,
  201. function () {
  202. $(this).css({ marginTop: "0px", }).find("tr:first").appendTo(this);
  203. if (firstTableRowCount > -1) {
  204. firstTableRowCount--;
  205. } else {
  206. clearInterval(SecondInterval);
  207. SecondDayTable();
  208. }
  209. }
  210. );
  211. }
  212. //明细表
  213. function SecondDayTable() {
  214. $.get("SecondaryCheckTwo.ashx?m=SecondTable", function (data) {
  215. var json = JSON.parse(data);
  216. if (json["success"] == true) {
  217. $("#SecondTable").html("");
  218. for (var i = 0; i < json["rows"].length; i++) {
  219. var temp = $("#SecondTable_template").html();
  220. temp = temp.replace("<tbody>", "").replace("</tbody>", "");
  221. temp = temp.replace('{mg}', json["rows"][i]['CODE']);
  222. temp = temp.replace('{mp}', json["rows"][i]['位置统计']);
  223. temp = temp.replace('{mc}', json["rows"][i]['二线产量']);
  224. $("#SecondTable").append(temp);
  225. }
  226. SecondTableRowCount = json["rows"].length;
  227. if (SecondTableRowCount > 10) {
  228. SecondInterval = setInterval(SecondTableScroll, 2000);
  229. }
  230. }
  231. });
  232. }
  233. //加载数据到表格控件
  234. </script>
  235. <style>
  236. table {
  237. height: 40px;
  238. color: #f8f9fa !important;
  239. font-size: 20px;
  240. font-weight: 700;
  241. background: rgba(25, 52, 90,.5);
  242. border: 1px solid #38dcff;
  243. margin-bottom: 1rem;
  244. }
  245. td {
  246. padding: 2px !important;
  247. text-align: center !important;
  248. border-bottom: 1px solid #38dcff !important;
  249. border-right: 1px dashed #38dcff !important;
  250. border: white;
  251. }
  252. </style>
  253. </body>
  254. </html>