index2.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  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="../DashBoard.css?v3" />
  9. <script src="/Plugins/jquery-3.4.1/jquery-3.4.1.min.js"></script>
  10. <script src="/Plugins/xrequest/xrequest.min.js"></script>
  11. <script src="/Plugins/xcountto/xcountTo.min.js"></script>
  12. <title>东科软件</title>
  13. </head>
  14. <body style="background-color:black;">
  15. <div class="box_1920_1080">
  16. <div class="box_title">
  17. 月交接数据&nbsp;&nbsp;<span class="box_title_arrow">>>></span>
  18. </div>
  19. <div class="box_body" style="display: flex; flex-direction: column;">
  20. <div style="width:1840px;height:440px;display:flex;flex-direction:row;">
  21. <div style="width: 100%;height:440px;">
  22. <!--成品交接产品型号-->
  23. <table cellspacing="0" cellpadding="0" border="0" style="width:100%;">
  24. <tr class="tr_title_warning">
  25. <td>H0966M<br />(大件)</td>
  26. <td>H0966M<br />(大件)</td>
  27. <td>H0966M<br />(大件)</td>
  28. <td>H0966M<br />(大件)</td>
  29. <td>H0966M<br />(大件)</td>
  30. <td>H0966M<br />(大件)</td>
  31. <td>H0966M<br />(大件)</td>
  32. <td>H0966M<br />(大件)</td>
  33. <td>H0966M<br />(大件)</td>
  34. <td>H0966M<br />(大件)</td>
  35. </tr>
  36. <tr class="tr_bg_light_warning" style="height:120px;">
  37. <td id="goods01" data-speed="2000" style="font-size: 40px; width: 10%"></td>
  38. <td id="goods02" data-speed="2000" style="font-size: 40px; width: 10%"></td>
  39. <td id="goods03" data-speed="2000" style="font-size: 40px; width: 10%"></td>
  40. <td id="goods04" data-speed="2000" style="font-size: 40px; width: 10%"></td>
  41. <td id="goods05" data-speed="2000" style="font-size: 40px; width: 10%"></td>
  42. <td id="goods06" data-speed="2000" style="font-size: 40px; width: 10%"></td>
  43. <td id="goods07" data-speed="2000" style="font-size: 40px; width: 10%"></td>
  44. <td id="goods08" data-speed="2000" style="font-size: 40px; width: 10%"></td>
  45. <td id="goods09" data-speed="2000" style="font-size: 40px; width: 10%"></td>
  46. <td id="goods10" data-speed="2000" style="font-size: 40px; width: 10%"></td>
  47. </tr>
  48. </table>
  49. <table cellspacing="0" cellpadding="0" border="0" style="width:100%;padding-top:20px;">
  50. <tr class="tr_title_warning">
  51. <td>H0966M<br />(小件)</td>
  52. <td>H0966M<br />(小件)</td>
  53. <td>H0966M<br />(小件)</td>
  54. <td>H0966M<br />(小件)</td>
  55. <td>H0966M<br />(小件)</td>
  56. <td>H0966M<br />(小件)</td>
  57. <td>H0966M<br />(小件)</td>
  58. <td>H0966M<br />(小件)</td>
  59. <td>H0966M<br />(小件)</td>
  60. <td>H0966M<br />(小件)</td>
  61. </tr>
  62. <tr class="tr_bg_light_warning" style="height:120px;">
  63. <td id="goods11" data-speed="2000" style="font-size: 40px; width: 10%"></td>
  64. <td id="goods12" data-speed="2000" style="font-size: 40px; width: 10%"></td>
  65. <td id="goods13" data-speed="2000" style="font-size: 40px; width: 10%"></td>
  66. <td id="goods14" data-speed="2000" style="font-size: 40px; width: 10%"></td>
  67. <td id="goods15" data-speed="2000" style="font-size: 40px; width: 10%"></td>
  68. <td id="goods16" data-speed="2000" style="font-size: 40px; width: 10%"></td>
  69. <td id="goods17" data-speed="2000" style="font-size: 40px; width: 10%"></td>
  70. <td id="goods18" data-speed="2000" style="font-size: 40px; width: 10%"></td>
  71. <td id="goods19" data-speed="2000" style="font-size: 40px; width: 10%"></td>
  72. <td id="goods20" data-speed="2000" style="font-size: 40px; width: 10%"></td>
  73. </tr>
  74. </table>
  75. </div>
  76. </div>
  77. <div style="width:1840px;height:520px;display:flex;flex-direction:row;">
  78. <div style="width: 100%;height:520px;">
  79. <!--成品交接数据柱图-->
  80. <canvas id="canvasProduct" style="-moz-user-select: none;-webkit-user-select: none;-ms-user-select: none; height:520px;width:100%"></canvas>
  81. </div>
  82. </div>
  83. </div>
  84. </div>
  85. <script>
  86. $(document).ready(function () {
  87. initData();
  88. loadData();
  89. });
  90. function loadData() {
  91. //产品交接数据===================================
  92. window.Product.data.datasets[0].data = [
  93. 300,
  94. 300,
  95. 300,
  96. 300,
  97. 300,
  98. 300,
  99. 300,
  100. 300,
  101. 300,
  102. 300,
  103. 300,
  104. 300,
  105. 300,
  106. 300,
  107. 300,
  108. 300,
  109. 300,
  110. 300,
  111. 300,
  112. 300,
  113. 300,
  114. 300,
  115. 300,
  116. 300,
  117. 300,
  118. 300,
  119. 300,
  120. 300,
  121. 300,
  122. 300,
  123. 300,
  124. 300
  125. ];
  126. window.Product.data.datasets[1].data = [
  127. randomScalingFactor(100) + 200,
  128. randomScalingFactor(100) + 200,
  129. randomScalingFactor(100) + 200,
  130. randomScalingFactor(100) + 200,
  131. randomScalingFactor(100) + 200,
  132. randomScalingFactor(100) + 200,
  133. randomScalingFactor(100) + 200,
  134. randomScalingFactor(100) + 200,
  135. randomScalingFactor(100) + 200,
  136. randomScalingFactor(100) + 200,
  137. randomScalingFactor(100) + 200,
  138. randomScalingFactor(100) + 200,
  139. randomScalingFactor(100) + 200,
  140. randomScalingFactor(100) + 200,
  141. randomScalingFactor(100) + 200,
  142. randomScalingFactor(100) + 200,
  143. randomScalingFactor(100) + 200,
  144. randomScalingFactor(100) + 200,
  145. randomScalingFactor(100) + 200,
  146. randomScalingFactor(100) + 200,
  147. randomScalingFactor(100) + 200,
  148. randomScalingFactor(100) + 200,
  149. randomScalingFactor(100) + 200,
  150. randomScalingFactor(100) + 200,
  151. randomScalingFactor(100) + 200,
  152. randomScalingFactor(100) + 200,
  153. randomScalingFactor(100) + 200,
  154. randomScalingFactor(100) + 200,
  155. randomScalingFactor(100) + 200,
  156. randomScalingFactor(100) + 200,
  157. randomScalingFactor(100) + 200,
  158. randomScalingFactor(100) + 200
  159. ];
  160. window.Product.update();
  161. //===================================================
  162. //加载产品型号数量
  163. for (var i = 1; i < 21; i++) {
  164. $("#goods" + i.toString().padStart(2, '0')).attr('data-to', randomScalingFactor(100) + 200);
  165. $("#goods" + i.toString().padStart(2, '0')).countTo();
  166. }
  167. }
  168. function initData() {
  169. window.chartColors = {
  170. red: 'rgb(255, 99, 132)',
  171. orange: 'rgb(255, 159, 64)',
  172. yellow: 'rgb(255, 250, 86)',
  173. green: 'rgb(75, 192, 192)',
  174. blue: 'rgb(54, 162, 250)',
  175. purple: 'rgb(153, 102, 255)',
  176. grey: 'rgb(231,233,237)'
  177. };
  178. var color = Chart.helpers.color;
  179. window.randomScalingFactor = function (num) {
  180. return Math.round(Math.random() * num);
  181. }
  182. Chart.defaults.global.defaultFontColor = 'white';
  183. Chart.defaults.global.defaultFontSize = 24;
  184. Chart.defaults.global.legend.display = false;
  185. //月交接数据=======================================
  186. window.configProduct = {
  187. data: {
  188. labels: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31'],
  189. datasets: [{
  190. type: 'line',
  191. label: '计划交接数量',
  192. backgroundColor: color(window.chartColors.orange).alpha(0.35).rgbString(),
  193. fill: false,
  194. borderColor: window.chartColors.orange,
  195. borderWidth: 2,
  196. pointRadius: 20,
  197. 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, 0]
  198. }, {
  199. label: '实际交接数量',
  200. backgroundColor: color(window.chartColors.blue).alpha(0.35).rgbString(),
  201. borderColor: window.chartColors.blue,
  202. borderWidth: 1,
  203. 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, 0]
  204. }]
  205. },
  206. type: 'bar',
  207. options: {
  208. legend: {
  209. display: true
  210. },
  211. title: {
  212. display: true,
  213. text: "产成品交接数据(月)"
  214. },
  215. tooltips: {
  216. mode: 'point',
  217. intersect: false
  218. },
  219. responsive: true,
  220. scales: {
  221. xAxes: [{
  222. stacked: false
  223. }],
  224. yAxes: [{
  225. display: true,
  226. stacked: false,
  227. ticks: {
  228. min: 0,
  229. stepSize: 50,
  230. max: 350
  231. }
  232. }]
  233. }
  234. }
  235. };
  236. var ctxProduct = document.getElementById("canvasProduct").getContext("2d");
  237. window.Product = new Chart(ctxProduct, configProduct);
  238. //===================================================
  239. }
  240. </script>
  241. <script src="/Plugins/chartjs-2.8.0/chart-2.8.min.js"></script>
  242. <script src="/Plugins/chartjs-2.8.0/chartjs-plugin-datalabels.js"></script>
  243. <script src="/Plugins/chartjs-2.8.0/utils.js"></script>
  244. <script src="/Plugins/circleChart/circleChart.min.js"></script>
  245. </body>
  246. </html>