demo.html 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408
  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 href="/Plugins/animate/animate.min.css" rel="stylesheet" />
  9. <link rel="stylesheet" href="../DashBoard.css?v3" />
  10. <script src="/Plugins/jquery-3.4.1/jquery-3.4.1.min.js"></script>
  11. <script src="/Plugins/animate/xanimate.js"></script>
  12. <script src="/Plugins/xrequest/xrequest.min.js"></script>
  13. <title>东科软件</title>
  14. </head>
  15. <body style="background-color:black;">
  16. <div class="box_1920_1080">
  17. <div class="box_title">
  18. 包装工序看板&nbsp;&nbsp;<span class="box_title_arrow">>>></span>
  19. </div>
  20. <div class="box_body" style="display: flex; flex-direction: column;">
  21. <!--31天产量曲线图-->
  22. <div style="width:1840px;height:400px;display:flex;flex-direction:row;">
  23. <div style="width: 100%; height: 400px;">
  24. <div style="color:white;font-size:20px;font-weight:600; text-align:center">每日产量计划达成</div>
  25. <canvas id="canvasDayCL" style="-moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; height: 350px; width: 100%"></canvas>
  26. </div>
  27. </div>
  28. <!--表格-->
  29. <div style="width:1840px;height:530px;display:flex;flex-direction:row;">
  30. <div style="width: 50%;height:530px;padding-right:20px;">
  31. <table cellspacing="0" cellpadding="0" border="0" style="width:100%;">
  32. <tr class="tr_title_warning">
  33. <td colspan="9" style="color:white;">每日型号达成情况</td>
  34. </tr>
  35. <tr class="tr_title_warning">
  36. <td>产品型号</td>
  37. <td>计划数量</td>
  38. <td>达成数量</td>
  39. <td>达成率</td>
  40. </tr>
  41. <tr class="tr_bg_light_warning" style="height:30px;">
  42. <td style="font-size: 18px; width: 11%">H0966L-W</td>
  43. <td style="font-size: 18px; width: 11%">1314</td>
  44. <td style="font-size: 18px; width: 11%">1169</td>
  45. <td style="font-size: 18px; width: 11%">80%</td>
  46. </tr>
  47. <tr class="tr_bg_light_warning" style="height:30px;">
  48. <td style="font-size: 18px; width: 11%">H0966L-W</td>
  49. <td style="font-size: 18px; width: 11%">1314</td>
  50. <td style="font-size: 18px; width: 11%">1169</td>
  51. <td style="font-size: 18px; width: 11%">80%</td>
  52. </tr>
  53. <tr class="tr_bg_light_warning" style="height:30px;">
  54. <td style="font-size: 18px; width: 11%">H0966L-W</td>
  55. <td style="font-size: 18px; width: 11%">1314</td>
  56. <td style="font-size: 18px; width: 11%">1169</td>
  57. <td style="font-size: 18px; width: 11%">80%</td>
  58. </tr>
  59. <tr class="tr_bg_light_warning" style="height:30px;">
  60. <td style="font-size: 18px; width: 11%">H0966L-W</td>
  61. <td style="font-size: 18px; width: 11%">1314</td>
  62. <td style="font-size: 18px; width: 11%">1169</td>
  63. <td style="font-size: 18px; width: 11%">80%</td>
  64. </tr>
  65. <tr class="tr_bg_light_warning" style="height:30px;">
  66. <td style="font-size: 18px; width: 11%">H0966L-W</td>
  67. <td style="font-size: 18px; width: 11%">1314</td>
  68. <td style="font-size: 18px; width: 11%">1169</td>
  69. <td style="font-size: 18px; width: 11%">80%</td>
  70. </tr>
  71. <tr class="tr_bg_light_warning" style="height:30px;">
  72. <td style="font-size: 18px; width: 11%">H0966L-W</td>
  73. <td style="font-size: 18px; width: 11%">1314</td>
  74. <td style="font-size: 18px; width: 11%">1169</td>
  75. <td style="font-size: 18px; width: 11%">80%</td>
  76. </tr>
  77. <tr class="tr_bg_light_warning" style="height:30px;">
  78. <td style="font-size: 18px; width: 11%">H0966L-W</td>
  79. <td style="font-size: 18px; width: 11%">1314</td>
  80. <td style="font-size: 18px; width: 11%">1169</td>
  81. <td style="font-size: 18px; width: 11%">80%</td>
  82. </tr>
  83. <tr class="tr_bg_light_warning" style="height:30px;">
  84. <td style="font-size: 18px; width: 11%">H0966L-W</td>
  85. <td style="font-size: 18px; width: 11%">1314</td>
  86. <td style="font-size: 18px; width: 11%">1169</td>
  87. <td style="font-size: 18px; width: 11%">80%</td>
  88. </tr>
  89. <tr class="tr_bg_light_warning" style="height:30px;">
  90. <td style="font-size: 18px; width: 11%">H0966L-W</td>
  91. <td style="font-size: 18px; width: 11%">1314</td>
  92. <td style="font-size: 18px; width: 11%">1169</td>
  93. <td style="font-size: 18px; width: 11%">80%</td>
  94. </tr>
  95. </table>
  96. </div>
  97. <div style="width: 50%;height:530px;padding-right:20px;">
  98. <table cellspacing="0" cellpadding="0" border="0" style="width:100%;">
  99. <tr class="tr_title_warning">
  100. <td colspan="9" style="color:white;">每月型号达成情况</td>
  101. </tr>
  102. <tr class="tr_title_warning">
  103. <td>产品型号</td>
  104. <td>计划数量</td>
  105. <td>达成数量</td>
  106. <td>达成率</td>
  107. </tr>
  108. <tr class="tr_bg_light_warning" style="height:30px;">
  109. <td style="font-size: 18px; width: 11%">H0966L-W</td>
  110. <td style="font-size: 18px; width: 11%">1314</td>
  111. <td style="font-size: 18px; width: 11%">1169</td>
  112. <td style="font-size: 18px; width: 11%">80%</td>
  113. </tr>
  114. <tr class="tr_bg_light_warning" style="height:30px;">
  115. <td style="font-size: 18px; width: 11%">H0966L-W</td>
  116. <td style="font-size: 18px; width: 11%">1314</td>
  117. <td style="font-size: 18px; width: 11%">1169</td>
  118. <td style="font-size: 18px; width: 11%">80%</td>
  119. </tr>
  120. <tr class="tr_bg_light_warning" style="height:30px;">
  121. <td style="font-size: 18px; width: 11%">H0966L-W</td>
  122. <td style="font-size: 18px; width: 11%">1314</td>
  123. <td style="font-size: 18px; width: 11%">1169</td>
  124. <td style="font-size: 18px; width: 11%">80%</td>
  125. </tr>
  126. <tr class="tr_bg_light_warning" style="height:30px;">
  127. <td style="font-size: 18px; width: 11%">H0966L-W</td>
  128. <td style="font-size: 18px; width: 11%">1314</td>
  129. <td style="font-size: 18px; width: 11%">1169</td>
  130. <td style="font-size: 18px; width: 11%">80%</td>
  131. </tr>
  132. <tr class="tr_bg_light_warning" style="height:30px;">
  133. <td style="font-size: 18px; width: 11%">H0966L-W</td>
  134. <td style="font-size: 18px; width: 11%">1314</td>
  135. <td style="font-size: 18px; width: 11%">1169</td>
  136. <td style="font-size: 18px; width: 11%">80%</td>
  137. </tr>
  138. <tr class="tr_bg_light_warning" style="height:30px;">
  139. <td style="font-size: 18px; width: 11%">H0966L-W</td>
  140. <td style="font-size: 18px; width: 11%">1314</td>
  141. <td style="font-size: 18px; width: 11%">1169</td>
  142. <td style="font-size: 18px; width: 11%">80%</td>
  143. </tr>
  144. <tr class="tr_bg_light_warning" style="height:30px;">
  145. <td style="font-size: 18px; width: 11%">H0966L-W</td>
  146. <td style="font-size: 18px; width: 11%">1314</td>
  147. <td style="font-size: 18px; width: 11%">1169</td>
  148. <td style="font-size: 18px; width: 11%">80%</td>
  149. </tr>
  150. <tr class="tr_bg_light_warning" style="height:30px;">
  151. <td style="font-size: 18px; width: 11%">H0966L-W</td>
  152. <td style="font-size: 18px; width: 11%">1314</td>
  153. <td style="font-size: 18px; width: 11%">1169</td>
  154. <td style="font-size: 18px; width: 11%">80%</td>
  155. </tr>
  156. <tr class="tr_bg_light_warning" style="height:30px;">
  157. <td style="font-size: 18px; width: 11%">H0966L-W</td>
  158. <td style="font-size: 18px; width: 11%">1314</td>
  159. <td style="font-size: 18px; width: 11%">1169</td>
  160. <td style="font-size: 18px; width: 11%">80%</td>
  161. </tr>
  162. </table>
  163. </div>
  164. <!--<div style="width: 25%;height:530px;">
  165. <div style="color:white;font-size:20px;font-weight:600; text-align:center">每月产量计划达成</div>
  166. <canvas id="canvasMonthCL" style="-moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; height: 400px; width: 100%"></canvas>
  167. </div>-->
  168. </div>
  169. </div>
  170. </div>
  171. <script>
  172. $(document).ready(function () {
  173. initData();
  174. doGetData = setInterval(function () { timeUpdate(); }, 2000);
  175. });
  176. function timeUpdate() {
  177. loadData();
  178. }
  179. function loadData() {
  180. //31天产量
  181. window.DayCL.data.datasets[0].data = [
  182. randomScalingFactor(8) + 5,
  183. randomScalingFactor(8) + 5,
  184. randomScalingFactor(8) + 5,
  185. randomScalingFactor(8) + 5,
  186. randomScalingFactor(8) + 5,
  187. randomScalingFactor(8) + 5,
  188. randomScalingFactor(8) + 5,
  189. randomScalingFactor(8) + 5,
  190. randomScalingFactor(8) + 5,
  191. randomScalingFactor(8) + 5,
  192. randomScalingFactor(8) + 5,
  193. randomScalingFactor(8) + 5,
  194. randomScalingFactor(8) + 5,
  195. randomScalingFactor(8) + 5,
  196. randomScalingFactor(8) + 5,
  197. randomScalingFactor(8) + 5,
  198. randomScalingFactor(8) + 5,
  199. randomScalingFactor(8) + 5,
  200. randomScalingFactor(8) + 5,
  201. randomScalingFactor(8) + 5,
  202. randomScalingFactor(8) + 5,
  203. randomScalingFactor(8) + 5,
  204. randomScalingFactor(8) + 5,
  205. randomScalingFactor(8) + 5,
  206. randomScalingFactor(8) + 5,
  207. randomScalingFactor(8) + 5,
  208. randomScalingFactor(8) + 5,
  209. randomScalingFactor(8) + 5,
  210. randomScalingFactor(8) + 5,
  211. randomScalingFactor(8) + 5,
  212. randomScalingFactor(8) + 5
  213. ];
  214. window.DayCL.data.datasets[1].data = [
  215. randomScalingFactor(8),
  216. randomScalingFactor(8),
  217. randomScalingFactor(8),
  218. randomScalingFactor(8),
  219. randomScalingFactor(8),
  220. randomScalingFactor(8),
  221. randomScalingFactor(8),
  222. randomScalingFactor(8),
  223. randomScalingFactor(8),
  224. randomScalingFactor(8),
  225. randomScalingFactor(8),
  226. randomScalingFactor(8),
  227. randomScalingFactor(8),
  228. randomScalingFactor(8),
  229. randomScalingFactor(8),
  230. randomScalingFactor(8),
  231. randomScalingFactor(8),
  232. randomScalingFactor(8),
  233. randomScalingFactor(8),
  234. randomScalingFactor(8),
  235. randomScalingFactor(8),
  236. randomScalingFactor(8),
  237. randomScalingFactor(8),
  238. randomScalingFactor(8),
  239. randomScalingFactor(8),
  240. randomScalingFactor(8),
  241. randomScalingFactor(8),
  242. randomScalingFactor(8),
  243. randomScalingFactor(8),
  244. randomScalingFactor(8),
  245. randomScalingFactor(8)
  246. ];
  247. window.DayCL.update();
  248. //产量计划达成
  249. window.MonthCL.data.datasets[0].data = [
  250. randomScalingFactor(1000),
  251. randomScalingFactor(1000)
  252. ];
  253. window.MonthCL.update();
  254. }
  255. function initData() {
  256. window.chartColors = {
  257. red: 'rgb(255, 99, 132)',
  258. orange: 'rgb(255, 159, 64)',
  259. yellow: 'rgb(255, 250, 86)',
  260. green: 'rgb(75, 192, 192)',
  261. blue: 'rgb(54, 162, 250)',
  262. purple: 'rgb(153, 102, 255)',
  263. grey: 'rgb(231,233,237)'
  264. };
  265. var color = Chart.helpers.color;
  266. window.randomScalingFactor = function (num) {
  267. return Math.round(Math.random() * num);
  268. }
  269. Chart.defaults.global.defaultFontColor = 'white';
  270. Chart.defaults.global.defaultFontSize = 18;
  271. Chart.defaults.global.legend.display = false;
  272. //每小时产量=========================================
  273. window.configDayCL = {
  274. data: {
  275. labels: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31"],
  276. datasets: [{
  277. label: "日计划",
  278. backgroundColor: color(window.chartColors.orange).alpha(0.6).rgbString(),
  279. borderColor: window.chartColors.orange,
  280. borderWidth: 2,
  281. pointRadius: 15,
  282. data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
  283. fill: false,
  284. }, {
  285. label: "日达成",
  286. fill: false,
  287. backgroundColor: color(window.chartColors.blue).alpha(0.6).rgbString(),
  288. borderColor: window.chartColors.blue,
  289. borderWidth: 2,
  290. pointRadius: 15,
  291. data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  292. }]
  293. },
  294. type: 'line',
  295. options: {
  296. responsive: true,
  297. legend: {
  298. display: true
  299. },
  300. title: {
  301. display: false,
  302. text: '每小时产量'
  303. },
  304. tooltips: {
  305. mode: 'index',
  306. intersect: false,
  307. },
  308. hover: {
  309. mode: 'nearest',
  310. intersect: true
  311. },
  312. scales: {
  313. xAxes: [{
  314. display: true,
  315. scaleLabel: {
  316. display: false,
  317. labelString: ''
  318. }
  319. }],
  320. yAxes: [{
  321. display: true,
  322. scaleLabel: {
  323. display: false,
  324. labelString: 'Value'
  325. }
  326. }]
  327. }
  328. }
  329. };
  330. var ctxDayCL = document.getElementById("canvasDayCL").getContext("2d");
  331. window.DayCL = new Chart(ctxDayCL, configDayCL);
  332. //===================================================
  333. ////月饼图===========================================
  334. //window.configMonthCL = {
  335. // data: {
  336. // labels: ['待达成', '月达成'],
  337. // datasets: [{
  338. // label: '工序',
  339. // backgroundColor: [
  340. // color(window.chartColors.red).alpha(0.35).rgbString(),
  341. // color(window.chartColors.blue).alpha(0.35).rgbString(),
  342. // color(window.chartColors.green).alpha(0.35).rgbString(),
  343. // color(window.chartColors.orange).alpha(0.35).rgbString(),
  344. // color(window.chartColors.purple).alpha(0.35).rgbString()
  345. // ],
  346. // fill: false,
  347. // borderColor: [
  348. // window.chartColors.red,
  349. // window.chartColors.blue,
  350. // window.chartColors.green,
  351. // window.chartColors.orange,
  352. // window.chartColors.purple
  353. // ],
  354. // borderWidth: 2,
  355. // pointRadius: 30,
  356. // data: [0, 0]
  357. // }]
  358. // },
  359. // type: 'doughnut',
  360. // options: {
  361. // legend: {
  362. // display: true
  363. // },
  364. // title: {
  365. // display: false,
  366. // text: ""
  367. // },
  368. // tooltips: {
  369. // mode: 'point',
  370. // intersect: false
  371. // },
  372. // responsive: true
  373. // }
  374. //};
  375. //var ctxMonthCL = document.getElementById("canvasMonthCL").getContext("2d");
  376. //window.MonthCL = new Chart(ctxMonthCL, configMonthCL);
  377. ////===================================================
  378. }
  379. </script>
  380. <script src="/Plugins/chartjs-2.8.0/chart-2.8.min.js"></script>
  381. <script src="/Plugins/chartjs-2.8.0/chartjs-plugin-datalabels.js"></script>
  382. <script src="/Plugins/chartjs-2.8.0/utils.js"></script>
  383. <script src="/Plugins/circleChart/circleChart.min.js"></script>
  384. </body>
  385. </html>