index2.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  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. 3000,
  94. 3000,
  95. 3000,
  96. 3000,
  97. 3000,
  98. 3000,
  99. 3000,
  100. 3000,
  101. 3000,
  102. 3000,
  103. 3000,
  104. 3000
  105. ];
  106. window.Product.data.datasets[1].data = [
  107. randomScalingFactor(1000) + 2000,
  108. randomScalingFactor(1000) + 2000,
  109. randomScalingFactor(1000) + 2000,
  110. randomScalingFactor(1000) + 2000,
  111. randomScalingFactor(1000) + 2000,
  112. randomScalingFactor(1000) + 2000,
  113. randomScalingFactor(1000) + 2000,
  114. randomScalingFactor(1000) + 2000,
  115. randomScalingFactor(1000) + 2000,
  116. randomScalingFactor(1000) + 2000,
  117. randomScalingFactor(1000) + 2000,
  118. randomScalingFactor(1000) + 2000
  119. ];
  120. window.Product.update();
  121. //===================================================
  122. //加载产品型号数量
  123. for (var i = 1; i < 21; i++) {
  124. $("#goods" + i.toString().padStart(2, '0')).attr('data-to', randomScalingFactor(1000) + 2000);
  125. $("#goods" + i.toString().padStart(2, '0')).countTo();
  126. }
  127. }
  128. function initData() {
  129. window.chartColors = {
  130. red: 'rgb(255, 99, 132)',
  131. orange: 'rgb(255, 159, 64)',
  132. yellow: 'rgb(255, 250, 86)',
  133. green: 'rgb(75, 192, 192)',
  134. blue: 'rgb(54, 162, 250)',
  135. purple: 'rgb(153, 102, 255)',
  136. grey: 'rgb(231,233,237)'
  137. };
  138. var color = Chart.helpers.color;
  139. window.randomScalingFactor = function (num) {
  140. return Math.round(Math.random() * num);
  141. }
  142. Chart.defaults.global.defaultFontColor = 'white';
  143. Chart.defaults.global.defaultFontSize = 24;
  144. Chart.defaults.global.legend.display = false;
  145. //年交接数据=======================================
  146. window.configProduct = {
  147. data: {
  148. labels: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],
  149. datasets: [{
  150. type: 'line',
  151. label: '计划交接数量',
  152. backgroundColor: color(window.chartColors.orange).alpha(0.35).rgbString(),
  153. fill: false,
  154. borderColor: window.chartColors.orange,
  155. borderWidth: 2,
  156. pointRadius: 30,
  157. data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  158. }, {
  159. label: '实际交接数量',
  160. backgroundColor: color(window.chartColors.blue).alpha(0.35).rgbString(),
  161. borderColor: window.chartColors.blue,
  162. borderWidth: 1,
  163. data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  164. }]
  165. },
  166. type: 'bar',
  167. options: {
  168. legend: {
  169. display: true
  170. },
  171. title: {
  172. display: true,
  173. text: "产成品交接数据(年)"
  174. },
  175. tooltips: {
  176. mode: 'point',
  177. intersect: false
  178. },
  179. responsive: true,
  180. scales: {
  181. xAxes: [{
  182. stacked: false
  183. }],
  184. yAxes: [{
  185. display: true,
  186. stacked: false,
  187. ticks: {
  188. min: 0,
  189. stepSize: 500,
  190. max: 3500
  191. }
  192. }]
  193. }
  194. }
  195. };
  196. var ctxProduct = document.getElementById("canvasProduct").getContext("2d");
  197. window.Product = new Chart(ctxProduct, configProduct);
  198. //===================================================
  199. }
  200. </script>
  201. <script src="/Plugins/chartjs-2.8.0/chart-2.8.min.js"></script>
  202. <script src="/Plugins/chartjs-2.8.0/chartjs-plugin-datalabels.js"></script>
  203. <script src="/Plugins/chartjs-2.8.0/utils.js"></script>
  204. <script src="/Plugins/circleChart/circleChart.min.js"></script>
  205. </body>
  206. </html>