index2.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  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. <title>东科软件</title>
  12. </head>
  13. <body style="background-color:black;">
  14. <div class="box_1920_1080">
  15. <div class="box_title">
  16. 月计划达成率&nbsp;&nbsp;<span style="color:darkorange">>>></span>
  17. </div>
  18. <div class="box_body" style="display: flex; flex-direction: column;">
  19. <div style="width:1840px;height:480px;display:flex;flex-direction:row;">
  20. <div style="width: 70%;height:480px;">
  21. <!--月计划达成率表格-->
  22. <table cellspacing="0" cellpadding="0" border="0" style="width:100%;">
  23. <tr class="tr_title">
  24. <td>序号</td>
  25. <td>产品型号</td>
  26. <td>本月计划数</td>
  27. <td>目标达成率</td>
  28. <td>单位</td>
  29. </tr>
  30. <tr class="tr_bg_light">
  31. <td>1</td>
  32. <td>H0966M</td>
  33. <td>3000</td>
  34. <td>80%</td>
  35. <td>件</td>
  36. </tr>
  37. <tr class="tr_bg_dark">
  38. <td>2</td>
  39. <td>H0966M</td>
  40. <td>3000</td>
  41. <td>80%</td>
  42. <td>件</td>
  43. </tr>
  44. <tr class="tr_bg_light">
  45. <td>3</td>
  46. <td>H0966M</td>
  47. <td>3000</td>
  48. <td>80%</td>
  49. <td>件</td>
  50. </tr>
  51. <tr class="tr_bg_dark">
  52. <td>4</td>
  53. <td>H0966M</td>
  54. <td>3000</td>
  55. <td>80%</td>
  56. <td>件</td>
  57. </tr>
  58. <tr class="tr_bg_light">
  59. <td>5</td>
  60. <td>H0966M</td>
  61. <td>3000</td>
  62. <td>80%</td>
  63. <td>件</td>
  64. </tr>
  65. <tr class="tr_bg_dark">
  66. <td>6</td>
  67. <td>H0966M</td>
  68. <td>3000</td>
  69. <td>80%</td>
  70. <td>件</td>
  71. </tr>
  72. </table>
  73. </div>
  74. <div style="width: 30%; height: 480px; ">
  75. <!--型号完成度百分比-->
  76. </div>
  77. </div>
  78. <div style="width:1840px;height:480px;display:flex;flex-direction:row;">
  79. <div style="width: 70%;height:480px;">
  80. <!--工序完工占比-->
  81. <div class="d-flex justify-content-center">
  82. <canvas id="canvasDayCL" style="-moz-user-select: none;-webkit-user-select: none;-ms-user-select: none; height:480px;width:100%"></canvas>
  83. </div>
  84. </div>
  85. <div style="width: 30%; height: 480px; ">
  86. <!--工序预警-->
  87. </div>
  88. </div>
  89. </div>
  90. </div>
  91. <script>
  92. $(document).ready(function () {
  93. initData();
  94. loadData();
  95. });
  96. function loadData() {
  97. window.DayCL.data.datasets[0].data = [
  98. randomScalingFactor(12) + 5,
  99. randomScalingFactor(12) + 5,
  100. randomScalingFactor(12) + 5,
  101. randomScalingFactor(12) + 5,
  102. randomScalingFactor(12) + 5,
  103. randomScalingFactor(12) + 5,
  104. randomScalingFactor(12) + 5,
  105. randomScalingFactor(12) + 5,
  106. randomScalingFactor(12) + 5,
  107. randomScalingFactor(12) + 5,
  108. randomScalingFactor(12) + 5,
  109. randomScalingFactor(12) + 5,
  110. randomScalingFactor(12) + 5,
  111. randomScalingFactor(12) + 5,
  112. randomScalingFactor(12) + 5,
  113. randomScalingFactor(12) + 5,
  114. randomScalingFactor(12) + 5,
  115. randomScalingFactor(12) + 5,
  116. randomScalingFactor(12) + 5,
  117. randomScalingFactor(12) + 5,
  118. randomScalingFactor(12) + 5,
  119. randomScalingFactor(12) + 5,
  120. randomScalingFactor(12) + 5,
  121. randomScalingFactor(12) + 5,
  122. randomScalingFactor(12) + 5,
  123. randomScalingFactor(12) + 5,
  124. randomScalingFactor(12) + 5,
  125. randomScalingFactor(12) + 5,
  126. randomScalingFactor(12) + 5,
  127. randomScalingFactor(12) + 5,
  128. randomScalingFactor(12) + 5
  129. ];
  130. window.DayCL.data.datasets[1].data = [
  131. randomScalingFactor(12) + 0,
  132. randomScalingFactor(12) + 0,
  133. randomScalingFactor(12) + 0,
  134. randomScalingFactor(12) + 0,
  135. randomScalingFactor(12) + 0,
  136. randomScalingFactor(12) + 0,
  137. randomScalingFactor(12) + 0,
  138. randomScalingFactor(12) + 0,
  139. randomScalingFactor(12) + 0,
  140. randomScalingFactor(12) + 0,
  141. randomScalingFactor(12) + 0,
  142. randomScalingFactor(12) + 0,
  143. randomScalingFactor(12) + 0,
  144. randomScalingFactor(12) + 0,
  145. randomScalingFactor(12) + 0,
  146. randomScalingFactor(12) + 0,
  147. randomScalingFactor(12) + 0,
  148. randomScalingFactor(12) + 0,
  149. randomScalingFactor(12) + 0,
  150. randomScalingFactor(12) + 0,
  151. randomScalingFactor(12) + 0,
  152. randomScalingFactor(12) + 0,
  153. randomScalingFactor(12) + 0,
  154. randomScalingFactor(12) + 0,
  155. randomScalingFactor(12) + 0,
  156. randomScalingFactor(12) + 0,
  157. randomScalingFactor(12) + 0,
  158. randomScalingFactor(12) + 0,
  159. randomScalingFactor(12) + 0,
  160. randomScalingFactor(12) + 0,
  161. randomScalingFactor(12) + 0
  162. ];
  163. window.DayCL.update();
  164. }
  165. function initData() {
  166. window.chartColors = {
  167. red: 'rgb(255, 99, 132)',
  168. orange: 'rgb(255, 159, 64)',
  169. yellow: 'rgb(255, 250, 86)',
  170. green: 'rgb(75, 192, 192)',
  171. blue: 'rgb(54, 162, 250)',
  172. purple: 'rgb(153, 102, 255)',
  173. grey: 'rgb(231,233,237)'
  174. };
  175. var color = Chart.helpers.color;
  176. window.randomScalingFactor = function (num) {
  177. return Math.round(Math.random() * num);
  178. }
  179. Chart.defaults.global.defaultFontColor = 'white';
  180. Chart.defaults.global.defaultFontSize = 16;
  181. //每日计划达成=======================================
  182. window.configDayCL = {
  183. data: {
  184. labels: ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31'],
  185. datasets: [{
  186. type: 'line',
  187. label: '目标产量',
  188. backgroundColor: color(window.chartColors.red).alpha(0.5).rgbString(),
  189. fill: false,
  190. borderColor: window.chartColors.red,
  191. borderWidth: 2,
  192. pointRadius: 12,
  193. 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]
  194. }, {
  195. label: '实际产量',
  196. backgroundColor: color(window.chartColors.blue).alpha(0.5).rgbString(),
  197. borderColor: window.chartColors.blue,
  198. borderWidth: 1,
  199. 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]
  200. }]
  201. },
  202. type: 'bar',
  203. options: {
  204. legend: {
  205. display: true
  206. },
  207. title: {
  208. display: true,
  209. text: "每日产量达成"
  210. },
  211. tooltips: {
  212. mode: 'point',
  213. intersect: false
  214. },
  215. responsive: true,
  216. scales: {
  217. xAxes: [{
  218. stacked: false
  219. }],
  220. yAxes: [{
  221. display: true,
  222. stacked: false,
  223. //ticks: {
  224. // min: 0,
  225. // stepSize: 2,
  226. // max: 18
  227. //}
  228. }]
  229. }
  230. }
  231. };
  232. var ctxDayCL = document.getElementById("canvasDayCL").getContext("2d");
  233. window.DayCL = new Chart(ctxDayCL, configDayCL);
  234. //===================================================
  235. }
  236. </script>
  237. <script src="/Plugins/chartjs-2.8.0/chart-2.8.min.js"></script>
  238. <!--<script src="/Plugins/chartjs-2.8.0/chartjs-plugin-datalabels.js"></script>-->
  239. <script src="/Plugins/chartjs-2.8.0/utils.js"></script>
  240. <script src="/Plugins/circleChart/circleChart.min.js"></script>
  241. </body>
  242. </html>