lazhang.html 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=Edge">
  6. <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  7. <title>流水线管理页</title>
  8. <!-- Favicon-->
  9. <link rel="icon" href="favicon.ico" type="image/x-icon">
  10. <!-- Google Fonts -->
  11. <link href="css/cyllic.css" rel="stylesheet" type="text/css">
  12. <link href="css/mateial.css" rel="stylesheet" type="text/css">
  13. <!-- Bootstrap Core Css -->
  14. <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.0.0/css/bootstrap.min.css"
  15. integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
  16. <!-- Waves Effect Css -->
  17. <link href="plugins/node-waves/waves.css" rel="stylesheet"/>
  18. <!-- Animation Css -->
  19. <link href="plugins/animate-css/animate.css" rel="stylesheet"/>
  20. <!-- Morris Chart Css-->
  21. <link href="plugins/morrisjs/morris.css" rel="stylesheet"/>
  22. <!-- Custom Css -->
  23. <link href="css/style.css" rel="stylesheet">
  24. <!-- AdminBSB Themes. You can choose a theme from css/themes instead of get all themes -->
  25. <link href="css/themes/all-themes.css" rel="stylesheet"/>
  26. <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
  27. <script src="https://cdn.bootcss.com/popper.js/1.12.9/umd/popper.min.js"
  28. integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"
  29. crossorigin="anonymous"></script>
  30. <script src="https://cdn.bootcss.com/bootstrap/4.0.0/js/bootstrap.min.js"
  31. integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
  32. crossorigin="anonymous"></script>
  33. <link rel="icon" href="https://static.jianshukeji.com/highcharts/images/favicon.ico">
  34. <meta name="viewport" content="width=device-width, initial-scale=1">
  35. <style>
  36. /* css 代码 */
  37. </style>
  38. <script src="https://img.hcharts.cn/highcharts/highcharts.js"></script>
  39. <script src="https://img.hcharts.cn/highcharts/modules/exporting.js"></script>
  40. <script src="https://img.hcharts.cn/highcharts-plugins/highcharts-zh_CN.js"></script>
  41. <script src="https://img.hcharts.cn/highcharts/themes/dark-unica.js"></script>
  42. <script language="JavaScript">
  43. function startTime()
  44. {
  45. var today=new Date();//定义日期对象
  46. var yyyy = today.getFullYear();//通过日期对象的getFullYear()方法返回年
  47. var MM = today.getMonth()+1;//通过日期对象的getMonth()方法返回年
  48. var dd = today.getDate();//通过日期对象的getDate()方法返回年
  49. var hh=today.getHours();//通过日期对象的getHours方法返回小时
  50. var mm=today.getMinutes();//通过日期对象的getMinutes方法返回分钟
  51. var ss=today.getSeconds();//通过日期对象的getSeconds方法返回秒
  52. // 如果分钟或小时的值小于10,则在其值前加0,比如如果时间是下午3点20分9秒的话,则显示15:20:09
  53. MM=checkTime(MM);
  54. dd=checkTime(dd);
  55. mm=checkTime(mm);
  56. ss=checkTime(ss);
  57. var day; //用于保存星期(getDay()方法得到星期编号)
  58. if(today.getDay()==0) day = "星期日 "
  59. if(today.getDay()==1) day = "星期一 "
  60. if(today.getDay()==2) day = "星期二 "
  61. if(today.getDay()==3) day = "星期三 "
  62. if(today.getDay()==4) day = "星期四 "
  63. if(today.getDay()==5) day = "星期五 "
  64. if(today.getDay()==6) day = "星期六 "
  65. document.getElementById('nowDateTimeSpan').innerHTML=yyyy+"-"+MM +"-"+ dd +" " + hh+":"+mm+":"+ss+" " + day;
  66. setTimeout('startTime()',1000);//每一秒中重新加载startTime()方法
  67. }
  68. function checkTime(i)
  69. {
  70. if (i<10){
  71. i="0" + i;
  72. }
  73. return i;
  74. }
  75. </script>
  76. </head>
  77. <body class="theme-black" style="background-color: #17253f !important;" onload="startTime()">
  78. <nav class="navbar" style="background-color: red">
  79. <div class="container-fluid">
  80. <div class="navbar-header">
  81. <a class="navbar-brand" href="index.html">工厂产能监控系统</a>
  82. </div>
  83. <div style="color: #ffffff"><img src="images/logo.jpg" style="width: 10%"> 深圳市度彼电子有限公司——</div>
  84. <font color="#ffffff"><span id="nowDateTimeSpan"></span></font>
  85. </div>
  86. <!-- <div class="collapse navbar-collapse" id="navbar-collapse">
  87. <ul class="nav navbar-nav navbar-right">
  88. <!-- Call Search -->
  89. <!-- <li><a href="javascript:void(0);" class="js-search" data-close="true"><i class="material-icons">search</i></a></li>
  90. <!-- #END# Call Search -->
  91. <!-- Notifications -->
  92. <!-- <li class="dropdown">
  93. <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button">
  94. <i class="material-icons">notifications</i>
  95. <span class="label-count">7</span>
  96. </a>
  97. <ul class="dropdown-menu">
  98. <li class="header">NOTIFICATIONS</li>
  99. <li class="body">
  100. <div class="slimScrollDiv" style="position: relative; overflow: hidden; width: auto; height: 254px;"><ul class="menu" style="overflow: hidden; width: auto; height: 254px;">
  101. <li>
  102. <a href="javascript:void(0);" class=" waves-effect waves-block">
  103. <div class="icon-circle bg-light-green">
  104. <i class="material-icons">person_add</i>
  105. </div>
  106. <div class="menu-info">
  107. <h4>12 new members joined</h4>
  108. <p>
  109. <i class="material-icons">access_time</i> 14 mins ago
  110. </p>
  111. </div>
  112. </a>
  113. </li>
  114. <li>
  115. <a href="javascript:void(0);" class=" waves-effect waves-block">
  116. <div class="icon-circle bg-cyan">
  117. <i class="material-icons">add_shopping_cart</i>
  118. </div>
  119. <div class="menu-info">
  120. <h4>4 sales made</h4>
  121. <p>
  122. <i class="material-icons">access_time</i> 22 mins ago
  123. </p>
  124. </div>
  125. </a>
  126. </li>
  127. <li>
  128. <a href="javascript:void(0);" class=" waves-effect waves-block">
  129. <div class="icon-circle bg-red">
  130. <i class="material-icons">delete_forever</i>
  131. </div>
  132. <div class="menu-info">
  133. <h4><b>Nancy Doe</b> deleted account</h4>
  134. <p>
  135. <i class="material-icons">access_time</i> 3 hours ago
  136. </p>
  137. </div>
  138. </a>
  139. </li>
  140. <li>
  141. <a href="javascript:void(0);" class=" waves-effect waves-block">
  142. <div class="icon-circle bg-orange">
  143. <i class="material-icons">mode_edit</i>
  144. </div>
  145. <div class="menu-info">
  146. <h4><b>Nancy</b> changed name</h4>
  147. <p>
  148. <i class="material-icons">access_time</i> 2 hours ago
  149. </p>
  150. </div>
  151. </a>
  152. </li>
  153. <li>
  154. <a href="javascript:void(0);" class=" waves-effect waves-block">
  155. <div class="icon-circle bg-blue-grey">
  156. <i class="material-icons">comment</i>
  157. </div>
  158. <div class="menu-info">
  159. <h4><b>John</b> commented your post</h4>
  160. <p>
  161. <i class="material-icons">access_time</i> 4 hours ago
  162. </p>
  163. </div>
  164. </a>
  165. </li>
  166. <li>
  167. <a href="javascript:void(0);" class=" waves-effect waves-block">
  168. <div class="icon-circle bg-light-green">
  169. <i class="material-icons">cached</i>
  170. </div>
  171. <div class="menu-info">
  172. <h4><b>John</b> updated status</h4>
  173. <p>
  174. <i class="material-icons">access_time</i> 3 hours ago
  175. </p>
  176. </div>
  177. </a>
  178. </li>
  179. <li>
  180. <a href="javascript:void(0);" class=" waves-effect waves-block">
  181. <div class="icon-circle bg-purple">
  182. <i class="material-icons">settings</i>
  183. </div>
  184. <div class="menu-info">
  185. <h4>Settings updated</h4>
  186. <p>
  187. <i class="material-icons">access_time</i> Yesterday
  188. </p>
  189. </div>
  190. </a>
  191. </li>
  192. </ul><div class="slimScrollBar" style="background: rgba(0, 0, 0, 0.5); width: 4px; position: absolute; top: 0px; opacity: 0.4; display: block; border-radius: 0px; z-index: 99; right: 1px;"></div><div class="slimScrollRail" style="width: 4px; height: 100%; position: absolute; top: 0px; display: none; border-radius: 0px; background: rgb(51, 51, 51); opacity: 0.2; z-index: 90; right: 1px;"></div></div>
  193. </li>
  194. <li class="footer">
  195. <a href="javascript:void(0);" class=" waves-effect waves-block">View All Notifications</a>
  196. </li>
  197. </ul>
  198. </li>
  199. <!-- #END# Notifications -->
  200. <!-- Tasks -->
  201. <!-- <li class="dropdown">
  202. <a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown" role="button">
  203. <i class="material-icons">flag</i>
  204. <span class="label-count">9</span>
  205. </a>
  206. <ul class="dropdown-menu">
  207. <li class="header">TASKS</li>
  208. <li class="body">
  209. <div class="slimScrollDiv" style="position: relative; overflow: hidden; width: auto; height: 254px;"><ul class="menu tasks" style="overflow: hidden; width: auto; height: 254px;">
  210. <li>
  211. <a href="javascript:void(0);" class=" waves-effect waves-block">
  212. <h4>
  213. Footer display issue
  214. <small>32%</small>
  215. </h4>
  216. <div class="progress">
  217. <div class="progress-bar bg-pink" role="progressbar" aria-valuenow="85" aria-valuemin="0" aria-valuemax="100" style="width: 32%">
  218. </div>
  219. </div>
  220. </a>
  221. </li>
  222. <li>
  223. <a href="javascript:void(0);" class=" waves-effect waves-block">
  224. <h4>
  225. Make new buttons
  226. <small>45%</small>
  227. </h4>
  228. <div class="progress">
  229. <div class="progress-bar bg-cyan" role="progressbar" aria-valuenow="85" aria-valuemin="0" aria-valuemax="100" style="width: 45%">
  230. </div>
  231. </div>
  232. </a>
  233. </li>
  234. <li>
  235. <a href="javascript:void(0);" class=" waves-effect waves-block">
  236. <h4>
  237. Create new dashboard
  238. <small>54%</small>
  239. </h4>
  240. <div class="progress">
  241. <div class="progress-bar bg-teal" role="progressbar" aria-valuenow="85" aria-valuemin="0" aria-valuemax="100" style="width: 54%">
  242. </div>
  243. </div>
  244. </a>
  245. </li>
  246. <li>
  247. <a href="javascript:void(0);" class=" waves-effect waves-block">
  248. <h4>
  249. Solve transition issue
  250. <small>65%</small>
  251. </h4>
  252. <div class="progress">
  253. <div class="progress-bar bg-orange" role="progressbar" aria-valuenow="85" aria-valuemin="0" aria-valuemax="100" style="width: 65%">
  254. </div>
  255. </div>
  256. </a>
  257. </li>
  258. <li>
  259. <a href="javascript:void(0);" class=" waves-effect waves-block">
  260. <h4>
  261. Answer GitHub questions
  262. <small>92%</small>
  263. </h4>
  264. <div class="progress">
  265. <div class="progress-bar bg-purple" role="progressbar" aria-valuenow="85" aria-valuemin="0" aria-valuemax="100" style="width: 92%">
  266. </div>
  267. </div>
  268. </a>
  269. </li>
  270. </ul><div class="slimScrollBar" style="background: rgba(0, 0, 0, 0.5); width: 4px; position: absolute; top: 0px; opacity: 0.4; display: block; border-radius: 0px; z-index: 99; right: 1px;"></div><div class="slimScrollRail" style="width: 4px; height: 100%; position: absolute; top: 0px; display: none; border-radius: 0px; background: rgb(51, 51, 51); opacity: 0.2; z-index: 90; right: 1px;"></div></div>
  271. </li>
  272. <li class="footer">
  273. <a href="javascript:void(0);" class=" waves-effect waves-block">View All Tasks</a>
  274. </li>
  275. </ul>
  276. </li>
  277. <!-- #END# Tasks -->
  278. <!-- <li class="pull-right"><a href="javascript:void(0);" class="js-right-sidebar" data-close="true"><i class="material-icons">more_vert</i></a></li>
  279. </ul>
  280. </div> -->
  281. </nav>
  282. <section style="margin-top: 100px;color: #ffffff" style-height="30-1">
  283. <div style="width: 38%;float: left">
  284. <div class="text-center">本拉产能统计</div>
  285. <table class="table table-bordered text-center" style="color: #ffffff">
  286. <thead>
  287. <tr>
  288. <th scope="col">时间</th>
  289. <th scope="col">良品数</th>
  290. <th scope="col">不良品数</th>
  291. <th scope="col">堆积数</th>
  292. <th scope="col">不良率</th>
  293. </tr>
  294. </thead>
  295. <tbody id="rank-one">
  296. </tbody>
  297. </table>
  298. </div>
  299. <div style="width: 60%;float: right">
  300. <div class="text-center">本厂今日生产能手榜</div>
  301. <table class="table table-bordered text-center" style="color: #ffffff;width: 50%;float: left" >
  302. <thead>
  303. <tr >
  304. <th scope="col" colspan="4">红榜</th>
  305. </tr>
  306. </thead>
  307. <tbody>
  308. <tr>
  309. <th scope="row">1</th>
  310. <td>Mark</td>
  311. <td>Otto</td>
  312. <td>@mdo</td>
  313. </tr>
  314. <tr>
  315. <th scope="row">2</th>
  316. <td>Jacob</td>
  317. <td>Thornton</td>
  318. <td>@fat</td>
  319. </tr>
  320. <tr>
  321. <th scope="row">2</th>
  322. <td>Jacob</td>
  323. <td>Thornton</td>
  324. <td>@fat</td>
  325. </tr>
  326. <tr>
  327. <th scope="row">3</th>
  328. <td>Larry</td>
  329. <td>the Bird</td>
  330. <td>@twitter</td>
  331. </tr>
  332. </tbody>
  333. </table>
  334. <table class="table table-bordered text-center" style="color: #ffffff;width: 50%;float: right" >
  335. <thead>
  336. <tr >
  337. <th scope="col" colspan="4">黑榜</th>
  338. </tr>
  339. </thead>
  340. <tbody>
  341. <tr>
  342. <th scope="row">1</th>
  343. <td>Mark</td>
  344. <td>Otto</td>
  345. <td>@mdo</td>
  346. </tr>
  347. <tr>
  348. <th scope="row">2</th>
  349. <td>Jacob</td>
  350. <td>Thornton</td>
  351. <td>@fat</td>
  352. </tr>
  353. <tr>
  354. <th scope="row">2</th>
  355. <td>Jacob</td>
  356. <td>Thornton</td>
  357. <td>@fat</td>
  358. </tr>
  359. <tr>
  360. <th scope="row">3</th>
  361. <td>Larry</td>
  362. <td>the Bird</td>
  363. <td>@twitter</td>
  364. </tr>
  365. </tbody>
  366. </table>
  367. </div>
  368. </section>
  369. <!--<nav class="navbar navbar-expand-lg navbar-light bg-light" style-height="10">-- >
  370. <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo01" aria-controls="navbarTogglerDemo01" aria-expanded="false" aria-label="Toggle navigation">
  371. <span class="navbar-toggler-icon"></span>
  372. </button>
  373. <div class="collapse navbar-collapse" id="navbarTogglerDemo01">
  374. <a class="navbar-brand" href="#">Hidden brand</a>
  375. <ul class="navbar-nav mr-auto mt-2 mt-lg-0">
  376. <li class="nav-item active">
  377. <a class="nav-link" href="#">生产线<span>1</span>号 </a>
  378. </li>
  379. <li class="nav-item">
  380. <a class="nav-link" href="#"><span id="clockt"></span></a>
  381. </li>
  382. <li class="nav-item">
  383. <a class="nav-link disabled" href="#">Disabled</a>
  384. </li>
  385. </ul>
  386. <form class="form-inline my-2 my-lg-0">
  387. <input class="form-control mr-sm-2" type="search" placeholder="Search" aria-label="Search">
  388. <button class="btn btn-outline-success my-2 my-sm-0" type="submit">下班</button>
  389. <div class="dropdown">
  390. <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu2" data-toggle="dropdown"
  391. aria-haspopup="true" aria-expanded="false" style="font-size: 0.5em">
  392. <div class="row">
  393. <div class="col-4">
  394. 拉长
  395. </div>
  396. <div class="col-5">
  397. 张三
  398. </div>
  399. </div>
  400. </button>
  401. <ul class="dropdown-menu" aria-labelledby="dropdownMenu2">
  402. <li><a href="#">更改密码</a></li>
  403. <li><a href="#">退出登录</a></li>
  404. </ul>
  405. </div>
  406. </form>
  407. </div>
  408. </nav>-->
  409. <!--<section class="content" style="margin: 0 auto; margin-top: 100px;">
  410. <!--<div class="row"></div>
  411. <div class="container-fluid " style="margin-bottom: 1em;">
  412. <div class="row text-center">
  413. <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
  414. <div class="info-box bg-green hover-expand-effect" style="margin: 0;">
  415. <div class="icon">
  416. <i class="material-icons">equalizer</i>
  417. </div>
  418. <div class="content">
  419. <div class="row text-center" style="margin: 0 auto">
  420. <div class="text" style="font-size: 1.5em;padding-top: 0.2em">合格数:</div>
  421. <div class="number" style="font-size: 3em" id="test1"></div>
  422. </div>
  423. </div>
  424. </div>
  425. </div>
  426. <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
  427. <div class="info-box bg-red hover-expand-effect" style="margin: 0;">
  428. <div class="icon">
  429. <i class="material-icons">equalizer</i>
  430. </div>
  431. <div class="content">
  432. <div class="row text-center" style="margin: 0 auto">
  433. <div class="text" style="font-size: 1.5em;padding-top: 0.2em">不合格数:</div>
  434. <div class="number" style="font-size: 3em" id="test2"></div>
  435. </div>
  436. </div>
  437. </div>
  438. </div>
  439. <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
  440. <div class="info-box bg-lime hover-expand-effect" style="margin: 0;">
  441. <div class="icon">
  442. <i class="material-icons">brightness_low</i>
  443. </div>
  444. <div class="content">
  445. <div class="row text-center" style="margin: 0 auto">
  446. <div class="text" style="font-size: 1.5em;padding-top: 0.2em">不良率:</div>
  447. <div class="number" style="font-size: 3em" id="test3"></div>
  448. </div>
  449. </div>
  450. </div>
  451. </div>
  452. <div class="col-lg-3 col-md-3 col-sm-6 col-xs-12">
  453. <div class="info-box bg-cyan hover-zoom-effect" style="margin: 0; ">
  454. <div class="icon">
  455. <i class="material-icons">access_alarm</i>
  456. </div>
  457. <div class="content">
  458. <div class="row text-center" style="margin: 0 auto">
  459. <div class="text" style="font-size: 1.5em;padding-top: 0.2em">堆积数:</div>
  460. <div class="number" style="font-size: 3em" id="test4"></div>
  461. </div>
  462. </div>
  463. </div>
  464. </div>
  465. </div>
  466. </div> -->
  467. <!--<div class="container-fluid" style="margin-top: 0.5em;padding-top: 1em">
  468. <!-- <div class="card" style-height="30-8" style="margin: 0 auto;">
  469. --<div>
  470. <div class="" style="">
  471. <div class="table-responsive" style="width: 30%;float: left">
  472. <table class="table table-hover dashboard-task-infos">
  473. <thead>
  474. <tr style="border-bottom:3px solid black;">
  475. <th>姓名(工号)</th>
  476. <th>合格数</th>
  477. <th>不合格数</th>
  478. </tr>
  479. </thead>
  480. <tbody id="rank-one">
  481. </tbody>
  482. </table>
  483. </div>
  484. <div class="table-responsive" style="width: 30%;float: left;padding-left: 5em">
  485. <table class="table table-hover dashboard-task-infos">
  486. <thead>
  487. <tr style="border-bottom:3px solid black;">
  488. <th>姓名(工号)</th>
  489. <th>合格数</th>
  490. <th>不合格数</th>
  491. </tr>
  492. </thead>
  493. <tbody id="rank-two">
  494. </tbody>
  495. </table>
  496. </div>
  497. <div class="table-responsive" style="width: 30%;float: right">
  498. <table class="table table-hover dashboard-task-infos">
  499. <thead>
  500. <tr style="border-bottom:3px solid black;">
  501. <th>姓名(工号)</th>
  502. <th>合格数</th>
  503. <th>不合格数</th>
  504. </tr>
  505. </thead>
  506. <tbody id="rank-three">
  507. </tbody>
  508. </table>
  509. </div>
  510. </div>
  511. </div>
  512. </div> -->
  513. <section>
  514. <div class="row " style="height: 10em"></div>
  515. <div class="row" style-height="50-8">
  516. <div id="graph-1"></div>
  517. </div>
  518. <div class="row " style="height: 10em"></div>
  519. <div class="row" style-height="30-2">
  520. <div id="graph-2"></div>
  521. </div>
  522. </section>
  523. <!-- Jquery Core Js -->
  524. <script src="plugins/jquery/jquery.min.js"></script>
  525. <!-- Bootstrap Core Js -->
  526. <script src="plugins/bootstrap/js/bootstrap.js"></script>
  527. <!-- Select Plugin Js -->
  528. <script src="plugins/bootstrap-select/js/bootstrap-select.js"></script>
  529. <!-- Slimscroll Plugin Js -->
  530. <script src="plugins/jquery-slimscroll/jquery.slimscroll.js"></script>
  531. <!-- Waves Effect Plugin Js -->
  532. <script src="plugins/node-waves/waves.js"></script>
  533. <!-- Jquery CountTo Plugin Js -->
  534. <script src="plugins/jquery-countto/jquery.countTo.js"></script>
  535. <!-- Morris Plugin Js -->
  536. <script src="plugins/raphael/raphael.min.js"></script>
  537. <script src="plugins/morrisjs/morris.js"></script>
  538. <!-- ChartJs -->
  539. <script src="plugins/chartjs/Chart.bundle.js"></script>
  540. <!-- Flot Charts Plugin Js -->
  541. <script src="plugins/flot-charts/jquery.flot.js"></script>
  542. <script src="plugins/flot-charts/jquery.flot.resize.js"></script>
  543. <script src="plugins/flot-charts/jquery.flot.pie.js"></script>
  544. <script src="plugins/flot-charts/jquery.flot.categories.js"></script>
  545. <script src="plugins/flot-charts/jquery.flot.time.js"></script>
  546. <!-- Sparkline Chart Plugin Js -->
  547. <script src="plugins/jquery-sparkline/jquery.sparkline.js"></script>
  548. <!-- Custom Js -->
  549. <script src="js/admin.js"></script>
  550. <!--<script src="js/pages/index.js"></script>-->
  551. <!-- Demo Js -->
  552. <script src="js/demo.js"></script>
  553. <script src="js/basic.js"></script>
  554. <script>
  555. var timeday=new Array("今日" ,"昨日" ,"本周" ,"本月");
  556. function getSpotHtml(htmlbody, i) {
  557. htmlbody += "<tr>";
  558. htmlbody += `<tr>
  559. <td>${timeday[i]}</td>
  560. <td>${hispass[i]}</td>
  561. <td>${hisfail[i]}</td>
  562. <td>${hisstack[i]}</td>
  563. <td>${hisrate[i]}</td>
  564. </tr>`;
  565. htmlbody += "</tr>";
  566. return htmlbody;
  567. }
  568. /* function getSpotHtml(htmlbody, one_person, i) {
  569. htmlbody += "<tr>";
  570. htmlbody += `<tr>
  571. <td>${timeday[i]}</td>
  572. <td>${hispass[i]}</td>
  573. <td>${hisfail[i]}</td>
  574. <td>${hisrate[i]}</td>
  575. </tr>`;
  576. htmlbody += "</tr>";
  577. return htmlbody;
  578. }*/
  579. function showEachSpot() {
  580. var htmlbody = "", one_person = "";
  581. var i = 0;
  582. var triGap = 4;
  583. htmlbody = "";
  584. for (i = 0; i < triGap; i++) {
  585. htmlbody = getSpotHtml(htmlbody, i);
  586. }
  587. $("#rank-one").html(htmlbody);
  588. console.log(htmlbody);
  589. }
  590. /* function showEachSpot() {
  591. var htmlbody = "", one_person = "";
  592. var i = 0;
  593. var triGap = Math.floor(sID.length / 3) + 1;
  594. var remain = sID.length - triGap * 2;
  595. htmlbody = "";
  596. for (i = 0; i < triGap; i++) {
  597. one_person = namedata[i];
  598. htmlbody = getSpotHtml(htmlbody, one_person, i);
  599. }
  600. $("#rank-one").html(htmlbody);
  601. htmlbody = "";
  602. for (i = 0; i < triGap; i++) {
  603. one_person = namedata[i + triGap];
  604. htmlbody = getSpotHtml(htmlbody, one_person, i + triGap);
  605. }
  606. console.log(htmlbody);
  607. $("#rank-two").html(htmlbody);
  608. htmlbody = "";
  609. for (i = 0; i < remain; i++) {
  610. one_person = namedata[i + triGap * 2];
  611. htmlbody = getSpotHtml(htmlbody, one_person, i + triGap * 2);
  612. }
  613. $("#rank-three").html(htmlbody);
  614. }*/
  615. var thisPageFlow = 1;
  616. function showChart() {
  617. var data = [];
  618. var ratedata = [];
  619. var stackmax = 0;
  620. var failmax = 0;
  621. var passdata=[];
  622. var faildata=[];
  623. for (i = 0; i < passNumber.length; i++) {
  624. if (stackmax < stackeverynum[i]) {
  625. stackmax = stackeverynum[i];
  626. }
  627. if (failmax < failrate[i]) {
  628. failmax = failrate[i];
  629. }
  630. data.push(stackeverynum[i]);
  631. ratedata.push(Math.floor(failrate[i]));
  632. passdata.push(passNumber[i]);
  633. faildata.push(failNumber[i])
  634. }
  635. showEachSpot();
  636. stackmax = Math.max(stackmax, 5);
  637. failmax = Math.max(failmax, 5);
  638. stackAndFailChart = Highcharts.chart('graph-1', {
  639. chart: {
  640. zoomType: 'xy',
  641. height: (4 / 16 * 100) + '%' // 16:9 ratio
  642. },
  643. title: {
  644. text: '各工位今日产能'
  645. },
  646. credits: {
  647. enabled: false // 禁用版权信息
  648. },
  649. exporting: {
  650. enabled: false
  651. },
  652. xAxis: [{
  653. categories: namedata,
  654. crosshair: true,
  655. title: {
  656. text: '员工',
  657. style: {
  658. fontSize: '1.5em'
  659. }
  660. },
  661. labels: {
  662. style: {
  663. fontSize: '1.5em'
  664. }
  665. }
  666. }],
  667. yAxis: [{ // Primary yAxis
  668. labels: {
  669. format: '{value}',
  670. style: {
  671. color: Highcharts.getOptions().colors[0],
  672. fontSize: '1.5em'
  673. }
  674. },
  675. min: 0,
  676. max: 10000,
  677. title: {
  678. style: {
  679. color: Highcharts.getOptions().colors[0],
  680. fontSize: '1em'
  681. }
  682. }
  683. },
  684. ],
  685. tooltip: {
  686. shared: true
  687. },
  688. legend: {
  689. layout: 'vertical',
  690. align: 'right',
  691. x: -100,
  692. verticalAlign: 'top',
  693. y: 0,
  694. floating: true,
  695. backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'
  696. },
  697. series: [{
  698. name: '良品数',
  699. type: 'column',
  700. data: passdata,
  701. }, {
  702. name: '不良品数',
  703. type: 'column',
  704. data: faildata,
  705. },
  706. {
  707. name: '堆积数',
  708. type: 'column',
  709. data: data,
  710. },]
  711. });
  712. FailChart = Highcharts.chart('graph-2', {
  713. chart: {
  714. height: (4 / 16 * 100) + '%' // 16:9 ratio
  715. },
  716. title: {
  717. text: '各工位今日不良率'
  718. },
  719. credits: {
  720. enabled: false // 禁用版权信息
  721. },
  722. exporting: {
  723. enabled: false
  724. },
  725. xAxis: [{
  726. categories: namedata,
  727. crosshair: true,
  728. title: {
  729. text: '员工',
  730. style: {
  731. fontSize: '1.5em'
  732. }
  733. },
  734. labels: {
  735. style: {
  736. fontSize: '1.5em'
  737. }
  738. }
  739. }],
  740. yAxis: [ { // Secondary yAxis
  741. title: {
  742. text: '不良率',
  743. style: {
  744. color: 'red',
  745. fontSize: '1em'
  746. }
  747. },
  748. min: 0,
  749. max: 1.5 * failmax,
  750. labels: {
  751. formatter: function () {
  752. return Math.floor(this.value) + "%";
  753. },
  754. style: {
  755. color: 'red',
  756. fontSize: '20px'
  757. }
  758. },
  759. }],
  760. tooltip: {
  761. shared: true
  762. },
  763. legend: {
  764. layout: 'vertical',
  765. align: 'right',
  766. x: -120,
  767. verticalAlign: 'top',
  768. y: 0,
  769. floating: true,
  770. backgroundColor: (Highcharts.theme && Highcharts.theme.legendBackgroundColor) || '#FFFFFF'
  771. },
  772. series: [{
  773. name: '不良率',
  774. type: 'spline',
  775. data: ratedata,
  776. color: 'red',
  777. tooltip: {
  778. valueSuffix: '%'
  779. }
  780. }]
  781. });
  782. }
  783. function updateChart() {
  784. var data = [];
  785. var ratedata = [];
  786. var stackmax = 0;
  787. var failmax = 0;
  788. var passdata=[];
  789. var faildata=[];
  790. for (i = 0; i < passNumber.length; i++) {
  791. if (stackmax < stackeverynum[i]) {
  792. stackmax = stackeverynum[i];
  793. }
  794. if (failmax < failrate[i]) {
  795. failmax = failrate[i];
  796. }
  797. data.push(stackeverynum[i]);
  798. ratedata.push(Math.floor(failrate[i]));
  799. passdata.push(passNumber[i]);
  800. faildata.push(failNumber[i])
  801. }
  802. stackmax = Math.max(stackmax, 5);
  803. failmax = Math.max(failmax, 5);
  804. // https://api.hcharts.cn/highcharts#Series.addPoint;
  805. stackAndFailChart.series[0].setData(passdata);
  806. stackAndFailChart.series[1].setData(faildata);
  807. stackAndFailChart.series[2].setData(data);
  808. FailChart.series[0].setData(ratedata);
  809. showEachSpot();
  810. }
  811. var stackAndFailChart = null;
  812. var FailChart = null;
  813. $(document).ready(on_document_load);
  814. window.onresize = resizeAll;
  815. function resizeAll() {
  816. $('[style-height="10"]').height(window.innerHeight / 10);
  817. $('[style-height="20"]').each(function(one,items){$(items).height(window.innerHeight / 5)});
  818. $('[style-height="30"]').each(function(one,items){$(items).height(window.innerHeight * 0.4)});
  819. $('[style-height="40"]').height(window.innerHeight *0.4);
  820. $('[style-height="30-8"]').height(window.innerHeight * 0.4 - 220);
  821. $('[style-height="30-1"]').each(function(one,items){$(items).height(window.innerHeight * 0.3)});
  822. $('[style-height="30-2"]').each(function(one,items){$(items).height(window.innerHeight * 0.2)});
  823. var graph = $("#graph-1");
  824. graph.width(window.innerWidth - 35);
  825. graph.height(window.innerHeight / 3.333);
  826. if (graph.highcharts !== undefined) {
  827. graph.highcharts().reflow();
  828. }
  829. var graph = $("#graph-2");
  830. graph.width(window.innerWidth - 35);
  831. graph.height(window.innerHeight / 3.333);
  832. if (graph.highcharts !== undefined) {
  833. graph.highcharts().reflow();
  834. }
  835. }
  836. setInterval(function () {
  837. resizeAll();
  838. }, 5000);
  839. resizeAll();
  840. //startClock();
  841. </script>
  842. </body>
  843. </html>
  844. <!---
  845. ### SVR_BASE 类似 "http://127.0.0.1:8803" 实际上线之后是确定值,写死在HTML里的JS里面
  846. ### 各个拉实时产量数据接口地址
  847. SVR_BASE + "/server/fcWorkRaw/allFlows"
  848. ### 单个拉内,所有工位实时产量数据接口地址 e.g. 拉线ID = 2
  849. SVR_BASE + "/server/fcWorkRaw/allSpots" + "?" + "flowId=2"
  850. ### 员工上班记录API e.g. 拉线ID = 2 工位顺序 = 1 员工ID = 33404
  851. SVR_BASE + "/server/fcWorkStartend/goOnline" + "?" + "flowId=2&sequence=1&workerId=33404"
  852. ### 查询已上班员工 e.g. 拉线ID = 2
  853. SVR_BASE + "/server/fcWorkRaw/getAll" + "?" + "flowId=2"
  854. -->