demo.html 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814
  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" style="display:flex;flex-direction:row;">
  18. <div style="width:30%;text-align:left;"></div>
  19. <div style="width:40%;text-align:center;">功能看板</div>
  20. <div style="width:30%;text-align:right;"></div>
  21. </div>
  22. <div class="box_body" style="display: flex; flex-direction: column;">
  23. <!--测漏气-->
  24. <div style="width:1840px;height:480px;display:flex;flex-direction:row;">
  25. <div style="width: 920px; height: 480px; padding-right: 20px; display: flex; flex-direction: row; ">
  26. <table cellspacing="0" cellpadding="0" border="0" style="width:100%;">
  27. <tr class="tr_title_warning">
  28. <td colspan="9" style="color:white;">测漏气产量合格率</td>
  29. </tr>
  30. <tr class="tr_title_warning">
  31. <td>测漏气线</td>
  32. <td>日生产量</td>
  33. <td>日合格数</td>
  34. <td>日合格率</td>
  35. </tr>
  36. <tr class="tr_bg_light_warning" style="height:30px;">
  37. <td style="font-size: 18px; width: 11%">1</td>
  38. <td style="font-size: 18px; width: 11%">1314</td>
  39. <td style="font-size: 18px; width: 11%">1169</td>
  40. <td style="font-size: 18px; width: 11%">80%</td>
  41. </tr>
  42. <tr class="tr_bg_light_warning" style="height:30px;">
  43. <td style="font-size: 18px; width: 11%">2</td>
  44. <td style="font-size: 18px; width: 11%">1314</td>
  45. <td style="font-size: 18px; width: 11%">1169</td>
  46. <td style="font-size: 18px; width: 11%">80%</td>
  47. </tr>
  48. <tr class="tr_bg_light_warning" style="height:30px;">
  49. <td style="font-size: 18px; width: 11%">3</td>
  50. <td style="font-size: 18px; width: 11%">1314</td>
  51. <td style="font-size: 18px; width: 11%">1169</td>
  52. <td style="font-size: 18px; width: 11%">80%</td>
  53. </tr>
  54. <tr class="tr_bg_light_warning" style="height:30px;">
  55. <td style="font-size: 18px; width: 11%">4</td>
  56. <td style="font-size: 18px; width: 11%">1314</td>
  57. <td style="font-size: 18px; width: 11%">1169</td>
  58. <td style="font-size: 18px; width: 11%">80%</td>
  59. <tr class="tr_bg_light_warning" style="height:30px;">
  60. <td style="font-size: 18px; width: 11%">5</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%">6</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%">7</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%">8</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. </table>
  84. </div>
  85. <div style="width: 920px; height: 480px; padding-right: 20px; display: flex; flex-direction: column; ">
  86. <div style="width: 100%; height: 480px; padding-right: 20px; display: flex; flex-direction: row; ">
  87. <div style="width: 25%; height: 250px;">
  88. <div style="color:white;font-size:20px;font-weight:600; text-align:center">测漏气1</div>
  89. <canvas id="canvasDefectA1" style="-moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; height: 200px; width: 100%"></canvas>
  90. </div>
  91. <div style="width: 25%; height: 250px;">
  92. <div style="color:white;font-size:20px;font-weight:600; text-align:center">测漏气2</div>
  93. <canvas id="canvasDefectA2" style="-moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; height: 200px; width: 100%"></canvas>
  94. </div>
  95. <div style="width: 25%; height: 250px;">
  96. <div style="color:white;font-size:20px;font-weight:600; text-align:center">测漏气3</div>
  97. <canvas id="canvasDefectA3" style="-moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; height: 200px; width: 100%"></canvas>
  98. </div>
  99. <div style="width: 25%; height: 250px;">
  100. <div style="color:white;font-size:20px;font-weight:600; text-align:center">测漏气4</div>
  101. <canvas id="canvasDefectA4" style="-moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; height: 200px; width: 100%"></canvas>
  102. </div>
  103. </div>
  104. <div style="width: 100%; height: 480px; padding-right: 20px; display: flex; flex-direction: row; ">
  105. <div style="width: 25%; height: 250px;">
  106. <div style="color:white;font-size:20px;font-weight:600; text-align:center">测漏气5</div>
  107. <canvas id="canvasDefectA5" style="-moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; height: 200px; width: 100%"></canvas>
  108. </div>
  109. <div style="width: 25%; height: 250px;">
  110. <div style="color:white;font-size:20px;font-weight:600; text-align:center">测漏气6</div>
  111. <canvas id="canvasDefectA6" style="-moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; height: 200px; width: 100%"></canvas>
  112. </div>
  113. <div style="width: 25%; height: 250px;">
  114. <div style="color:white;font-size:20px;font-weight:600; text-align:center">测漏气7</div>
  115. <canvas id="canvasDefectA7" style="-moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; height: 200px; width: 100%"></canvas>
  116. </div>
  117. <div style="width: 25%; height: 250px;">
  118. <div style="color:white;font-size:20px;font-weight:600; text-align:center">测漏气8</div>
  119. <canvas id="canvasDefectA8" style="-moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; height: 200px; width: 100%"></canvas>
  120. </div>
  121. </div>
  122. </div>
  123. </div>
  124. <!--试水-->
  125. <div style="width: 1840px; height: 480px; display: flex; flex-direction: row;">
  126. <div style="width: 920px; height: 480px; padding-right: 20px; display: flex; flex-direction: row; ">
  127. <table cellspacing="0" cellpadding="0" border="0" style="width:100%;">
  128. <tr class="tr_title_warning">
  129. <td colspan="9" style="color:white;">试水产量合格率</td>
  130. </tr>
  131. <tr class="tr_title_warning">
  132. <td>试水线号</td>
  133. <td>日生产量</td>
  134. <td>日合格数</td>
  135. <td>日合格率</td>
  136. </tr>
  137. <tr class="tr_bg_light_warning" style="height:30px;">
  138. <td style="font-size: 18px; width: 11%">1</td>
  139. <td style="font-size: 18px; width: 11%">1314</td>
  140. <td style="font-size: 18px; width: 11%">1169</td>
  141. <td style="font-size: 18px; width: 11%">80%</td>
  142. </tr>
  143. <tr class="tr_bg_light_warning" style="height:30px;">
  144. <td style="font-size: 18px; width: 11%">2</td>
  145. <td style="font-size: 18px; width: 11%">1314</td>
  146. <td style="font-size: 18px; width: 11%">1169</td>
  147. <td style="font-size: 18px; width: 11%">80%</td>
  148. </tr>
  149. <tr class="tr_bg_light_warning" style="height:30px;">
  150. <td style="font-size: 18px; width: 11%">3</td>
  151. <td style="font-size: 18px; width: 11%">1314</td>
  152. <td style="font-size: 18px; width: 11%">1169</td>
  153. <td style="font-size: 18px; width: 11%">80%</td>
  154. </tr>
  155. <tr class="tr_bg_light_warning" style="height:30px;">
  156. <td style="font-size: 18px; width: 11%">4</td>
  157. <td style="font-size: 18px; width: 11%">1314</td>
  158. <td style="font-size: 18px; width: 11%">1169</td>
  159. <td style="font-size: 18px; width: 11%">80%</td>
  160. </tr>
  161. </table>
  162. </div>
  163. <div style="width: 920px; height: 480px; padding-right: 20px; display: flex; flex-direction: column; ">
  164. <div style="width: 100%; height: 480px; padding-right: 20px; display: flex; flex-direction: row; ">
  165. <div style="width: 50%; height: 250px;">
  166. <div style="color:white;font-size:20px;font-weight:600; text-align:center">试水1</div>
  167. <canvas id="canvasDefectB1" style="-moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; height: 200px; width: 100%"></canvas>
  168. </div>
  169. <div style="width: 50%; height: 250px;">
  170. <div style="color:white;font-size:20px;font-weight:600; text-align:center">试水2</div>
  171. <canvas id="canvasDefectB2" style="-moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; height: 200px; width: 100%"></canvas>
  172. </div>
  173. </div>
  174. <div style="width: 100%; height: 480px; padding-right: 20px; display: flex; flex-direction: row; ">
  175. <div style="width: 50%; height: 250px;">
  176. <div style="color:white;font-size:20px;font-weight:600; text-align:center">试水3</div>
  177. <canvas id="canvasDefectB3" style="-moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; height: 200px; width: 100%"></canvas>
  178. </div>
  179. <div style="width: 50%; height: 250px;">
  180. <div style="color:white;font-size:20px;font-weight:600; text-align:center">试水4</div>
  181. <canvas id="canvasDefectB4" style="-moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; height: 200px; width: 100%"></canvas>
  182. </div>
  183. </div>
  184. </div>
  185. </div>
  186. </div>
  187. </div>
  188. <script>
  189. $(document).ready(function () {
  190. initData();
  191. doGetData = setInterval(function () { timeUpdate(); }, 2000);
  192. });
  193. function timeUpdate() {
  194. loadData();
  195. }
  196. function loadData() {
  197. window.DefectA1.data.datasets[0].data = [
  198. randomScalingFactor(8),
  199. randomScalingFactor(8)
  200. ];
  201. window.DefectA1.update();
  202. window.DefectA2.data.datasets[0].data = [
  203. randomScalingFactor(8),
  204. randomScalingFactor(8)
  205. ];
  206. window.DefectA2.update();
  207. window.DefectA3.data.datasets[0].data = [
  208. randomScalingFactor(8),
  209. randomScalingFactor(8)
  210. ];
  211. window.DefectA3.update();
  212. window.DefectA4.data.datasets[0].data = [
  213. randomScalingFactor(8),
  214. randomScalingFactor(8)
  215. ];
  216. window.DefectA4.update();
  217. window.DefectB1.data.datasets[0].data = [
  218. randomScalingFactor(8),
  219. randomScalingFactor(8)
  220. ];
  221. window.DefectB1.update();
  222. window.DefectB2.data.datasets[0].data = [
  223. randomScalingFactor(8),
  224. randomScalingFactor(8)
  225. ];
  226. window.DefectB2.update();
  227. window.DefectB3.data.datasets[0].data = [
  228. randomScalingFactor(8),
  229. randomScalingFactor(8)
  230. ];
  231. window.DefectB3.update();
  232. window.DefectB4.data.datasets[0].data = [
  233. randomScalingFactor(8),
  234. randomScalingFactor(8)
  235. ];
  236. window.DefectB4.update();
  237. window.DefectA5.data.datasets[0].data = [
  238. randomScalingFactor(8),
  239. randomScalingFactor(8)
  240. ];
  241. window.DefectA5.update();
  242. window.DefectA6.data.datasets[0].data = [
  243. randomScalingFactor(8),
  244. randomScalingFactor(8)
  245. ];
  246. window.DefectA6.update();
  247. window.DefectA7.data.datasets[0].data = [
  248. randomScalingFactor(8),
  249. randomScalingFactor(8)
  250. ];
  251. window.DefectA7.update();
  252. window.DefectA8.data.datasets[0].data = [
  253. randomScalingFactor(8),
  254. randomScalingFactor(8)
  255. ];
  256. window.DefectA8.update();
  257. //产量计划达成
  258. window.MonthCL.data.datasets[0].data = [
  259. randomScalingFactor(1000),
  260. randomScalingFactor(1000)
  261. ];
  262. window.MonthCL.update();
  263. }
  264. function initData() {
  265. window.chartColors = {
  266. red: 'rgb(255, 99, 132)',
  267. orange: 'rgb(255, 159, 64)',
  268. yellow: 'rgb(255, 250, 86)',
  269. green: 'rgb(75, 192, 192)',
  270. blue: 'rgb(54, 162, 250)',
  271. purple: 'rgb(153, 102, 255)',
  272. grey: 'rgb(231,233,237)'
  273. };
  274. var color = Chart.helpers.color;
  275. window.randomScalingFactor = function (num) {
  276. return Math.round(Math.random() * num);
  277. }
  278. Chart.defaults.global.defaultFontColor = 'white';
  279. Chart.defaults.global.defaultFontSize = 18;
  280. Chart.defaults.global.legend.display = false;
  281. //测漏气设备OEE===========================================
  282. window.configDefectA1 = {
  283. data: {
  284. labels: ['工作时间', '故障时间'],
  285. datasets: [{
  286. label: 'OEE',
  287. backgroundColor: [
  288. color(window.chartColors.green).alpha(0.35).rgbString(),
  289. color(window.chartColors.orange).alpha(0.35).rgbString()
  290. ],
  291. fill: false,
  292. borderColor: [
  293. window.chartColors.green,
  294. window.chartColors.orange
  295. ],
  296. borderWidth: 2,
  297. pointRadius: 30,
  298. data: [0, 0]
  299. }]
  300. },
  301. type: 'pie',
  302. options: {
  303. legend: {
  304. display: true
  305. },
  306. title: {
  307. display: false,
  308. text: "测漏气1"
  309. },
  310. tooltips: {
  311. mode: 'point',
  312. intersect: false
  313. },
  314. responsive: true
  315. }
  316. };
  317. var ctxDefectA1 = document.getElementById("canvasDefectA1").getContext("2d");
  318. window.DefectA1 = new Chart(ctxDefectA1, configDefectA1);
  319. //===================================================
  320. //测漏气设备OEE===========================================
  321. window.configDefectA2 = {
  322. data: {
  323. labels: ['工作时间', '故障时间'],
  324. datasets: [{
  325. label: 'OEE',
  326. backgroundColor: [
  327. color(window.chartColors.green).alpha(0.35).rgbString(),
  328. color(window.chartColors.orange).alpha(0.35).rgbString()
  329. ],
  330. fill: false,
  331. borderColor: [
  332. window.chartColors.green,
  333. window.chartColors.orange
  334. ],
  335. borderWidth: 2,
  336. pointRadius: 30,
  337. data: [0, 0]
  338. }]
  339. },
  340. type: 'pie',
  341. options: {
  342. legend: {
  343. display: true
  344. },
  345. title: {
  346. display: false,
  347. text: "测漏气2"
  348. },
  349. tooltips: {
  350. mode: 'point',
  351. intersect: false
  352. },
  353. responsive: true
  354. }
  355. };
  356. var ctxDefectA2 = document.getElementById("canvasDefectA2").getContext("2d");
  357. window.DefectA2 = new Chart(ctxDefectA2, configDefectA2);
  358. //===================================================
  359. //测漏气设备OEE===========================================
  360. window.configDefectA3 = {
  361. data: {
  362. labels: ['工作时间', '故障时间'],
  363. datasets: [{
  364. label: 'OEE',
  365. backgroundColor: [
  366. color(window.chartColors.green).alpha(0.35).rgbString(),
  367. color(window.chartColors.orange).alpha(0.35).rgbString()
  368. ],
  369. fill: false,
  370. borderColor: [
  371. window.chartColors.green,
  372. window.chartColors.orange
  373. ],
  374. borderWidth: 2,
  375. pointRadius: 30,
  376. data: [0, 0]
  377. }]
  378. },
  379. type: 'pie',
  380. options: {
  381. legend: {
  382. display: true
  383. },
  384. title: {
  385. display: false,
  386. text: "测漏气3"
  387. },
  388. tooltips: {
  389. mode: 'point',
  390. intersect: false
  391. },
  392. responsive: true
  393. }
  394. };
  395. var ctxDefectA3 = document.getElementById("canvasDefectA3").getContext("2d");
  396. window.DefectA3 = new Chart(ctxDefectA3, configDefectA3);
  397. //===================================================
  398. //测漏气设备OEE===========================================
  399. window.configDefectA4 = {
  400. data: {
  401. labels: ['工作时间', '故障时间'],
  402. datasets: [{
  403. label: 'OEE',
  404. backgroundColor: [
  405. color(window.chartColors.green).alpha(0.35).rgbString(),
  406. color(window.chartColors.orange).alpha(0.35).rgbString()
  407. ],
  408. fill: false,
  409. borderColor: [
  410. window.chartColors.green,
  411. window.chartColors.orange
  412. ],
  413. borderWidth: 2,
  414. pointRadius: 30,
  415. data: [0, 0]
  416. }]
  417. },
  418. type: 'pie',
  419. options: {
  420. legend: {
  421. display: true
  422. },
  423. title: {
  424. display: false,
  425. text: "测漏气4"
  426. },
  427. tooltips: {
  428. mode: 'point',
  429. intersect: false
  430. },
  431. responsive: true
  432. }
  433. };
  434. var ctxDefectA4 = document.getElementById("canvasDefectA4").getContext("2d");
  435. window.DefectA4 = new Chart(ctxDefectA4, configDefectA4);
  436. //===================================================
  437. //测漏气设备OEE===========================================
  438. window.configDefectA5 = {
  439. data: {
  440. labels: ['工作时间', '故障时间'],
  441. datasets: [{
  442. label: 'OEE',
  443. backgroundColor: [
  444. color(window.chartColors.green).alpha(0.35).rgbString(),
  445. color(window.chartColors.orange).alpha(0.35).rgbString()
  446. ],
  447. fill: false,
  448. borderColor: [
  449. window.chartColors.green,
  450. window.chartColors.orange
  451. ],
  452. borderWidth: 2,
  453. pointRadius: 30,
  454. data: [0, 0]
  455. }]
  456. },
  457. type: 'pie',
  458. options: {
  459. legend: {
  460. display: true
  461. },
  462. title: {
  463. display: false,
  464. text: "测漏气5"
  465. },
  466. tooltips: {
  467. mode: 'point',
  468. intersect: false
  469. },
  470. responsive: true
  471. }
  472. };
  473. var ctxDefectA5 = document.getElementById("canvasDefectA5").getContext("2d");
  474. window.DefectA5 = new Chart(ctxDefectA5, configDefectA5);
  475. //===================================================
  476. //测漏气设备OEE===========================================
  477. window.configDefectA6 = {
  478. data: {
  479. labels: ['工作时间', '故障时间'],
  480. datasets: [{
  481. label: 'OEE',
  482. backgroundColor: [
  483. color(window.chartColors.green).alpha(0.35).rgbString(),
  484. color(window.chartColors.orange).alpha(0.35).rgbString()
  485. ],
  486. fill: false,
  487. borderColor: [
  488. window.chartColors.green,
  489. window.chartColors.orange
  490. ],
  491. borderWidth: 2,
  492. pointRadius: 30,
  493. data: [0, 0]
  494. }]
  495. },
  496. type: 'pie',
  497. options: {
  498. legend: {
  499. display: true
  500. },
  501. title: {
  502. display: false,
  503. text: "测漏气6"
  504. },
  505. tooltips: {
  506. mode: 'point',
  507. intersect: false
  508. },
  509. responsive: true
  510. }
  511. };
  512. var ctxDefectA6 = document.getElementById("canvasDefectA6").getContext("2d");
  513. window.DefectA6 = new Chart(ctxDefectA6, configDefectA6);
  514. //===================================================
  515. //测漏气设备OEE===========================================
  516. window.configDefectA7 = {
  517. data: {
  518. labels: ['工作时间', '故障时间'],
  519. datasets: [{
  520. label: 'OEE',
  521. backgroundColor: [
  522. color(window.chartColors.green).alpha(0.35).rgbString(),
  523. color(window.chartColors.orange).alpha(0.35).rgbString()
  524. ],
  525. fill: false,
  526. borderColor: [
  527. window.chartColors.green,
  528. window.chartColors.orange
  529. ],
  530. borderWidth: 2,
  531. pointRadius: 30,
  532. data: [0, 0]
  533. }]
  534. },
  535. type: 'pie',
  536. options: {
  537. legend: {
  538. display: true
  539. },
  540. title: {
  541. display: false,
  542. text: "测漏气7"
  543. },
  544. tooltips: {
  545. mode: 'point',
  546. intersect: false
  547. },
  548. responsive: true
  549. }
  550. };
  551. var ctxDefectA7 = document.getElementById("canvasDefectA7").getContext("2d");
  552. window.DefectA7 = new Chart(ctxDefectA7, configDefectA7);
  553. //===================================================
  554. //测漏气设备OEE===========================================
  555. window.configDefectA8 = {
  556. data: {
  557. labels: ['工作时间', '故障时间'],
  558. datasets: [{
  559. label: 'OEE',
  560. backgroundColor: [
  561. color(window.chartColors.green).alpha(0.35).rgbString(),
  562. color(window.chartColors.orange).alpha(0.35).rgbString()
  563. ],
  564. fill: false,
  565. borderColor: [
  566. window.chartColors.green,
  567. window.chartColors.orange
  568. ],
  569. borderWidth: 2,
  570. pointRadius: 30,
  571. data: [0, 0]
  572. }]
  573. },
  574. type: 'pie',
  575. options: {
  576. legend: {
  577. display: true
  578. },
  579. title: {
  580. display: false,
  581. text: "测漏气8"
  582. },
  583. tooltips: {
  584. mode: 'point',
  585. intersect: false
  586. },
  587. responsive: true
  588. }
  589. };
  590. var ctxDefectA8 = document.getElementById("canvasDefectA8").getContext("2d");
  591. window.DefectA8 = new Chart(ctxDefectA8, configDefectA8);
  592. //===================================================
  593. //试水设备OEE===========================================
  594. window.configDefectB1 = {
  595. data: {
  596. labels: ['工作时间', '故障时间'],
  597. datasets: [{
  598. label: 'OEE',
  599. backgroundColor: [
  600. color(window.chartColors.green).alpha(0.35).rgbString(),
  601. color(window.chartColors.orange).alpha(0.35).rgbString()
  602. ],
  603. fill: false,
  604. borderColor: [
  605. window.chartColors.green,
  606. window.chartColors.orange
  607. ],
  608. borderWidth: 2,
  609. pointRadius: 30,
  610. data: [0, 0]
  611. }]
  612. },
  613. type: 'pie',
  614. options: {
  615. legend: {
  616. display: true
  617. },
  618. title: {
  619. display: false,
  620. text: "试水1"
  621. },
  622. tooltips: {
  623. mode: 'point',
  624. intersect: false
  625. },
  626. responsive: true
  627. }
  628. };
  629. var ctxDefectB1 = document.getElementById("canvasDefectB1").getContext("2d");
  630. window.DefectB1 = new Chart(ctxDefectB1, configDefectB1);
  631. //===================================================
  632. //试水设备OEE===========================================
  633. window.configDefectB2 = {
  634. data: {
  635. labels: ['工作时间', '故障时间'],
  636. datasets: [{
  637. label: 'OEE',
  638. backgroundColor: [
  639. color(window.chartColors.green).alpha(0.35).rgbString(),
  640. color(window.chartColors.orange).alpha(0.35).rgbString()
  641. ],
  642. fill: false,
  643. borderColor: [
  644. window.chartColors.green,
  645. window.chartColors.orange
  646. ],
  647. borderWidth: 2,
  648. pointRadius: 30,
  649. data: [0, 0]
  650. }]
  651. },
  652. type: 'pie',
  653. options: {
  654. legend: {
  655. display: true
  656. },
  657. title: {
  658. display: false,
  659. text: "试水2"
  660. },
  661. tooltips: {
  662. mode: 'point',
  663. intersect: false
  664. },
  665. responsive: true
  666. }
  667. };
  668. var ctxDefectB2 = document.getElementById("canvasDefectB2").getContext("2d");
  669. window.DefectB2 = new Chart(ctxDefectB2, configDefectB2);
  670. //===================================================
  671. //试水设备OEE===========================================
  672. window.configDefectB3 = {
  673. data: {
  674. labels: ['工作时间', '故障时间'],
  675. datasets: [{
  676. label: 'OEE',
  677. backgroundColor: [
  678. color(window.chartColors.green).alpha(0.35).rgbString(),
  679. color(window.chartColors.orange).alpha(0.35).rgbString()
  680. ],
  681. fill: false,
  682. borderColor: [
  683. window.chartColors.green,
  684. window.chartColors.orange
  685. ],
  686. borderWidth: 2,
  687. pointRadius: 30,
  688. data: [0, 0]
  689. }]
  690. },
  691. type: 'pie',
  692. options: {
  693. legend: {
  694. display: true
  695. },
  696. title: {
  697. display: false,
  698. text: "试水3"
  699. },
  700. tooltips: {
  701. mode: 'point',
  702. intersect: false
  703. },
  704. responsive: true
  705. }
  706. };
  707. var ctxDefectB3 = document.getElementById("canvasDefectB3").getContext("2d");
  708. window.DefectB3 = new Chart(ctxDefectB3, configDefectB3);
  709. //===================================================
  710. //试水设备OEE===========================================
  711. window.configDefectB4 = {
  712. data: {
  713. labels: ['工作时间', '故障时间'],
  714. datasets: [{
  715. label: 'OEE',
  716. backgroundColor: [
  717. color(window.chartColors.green).alpha(0.35).rgbString(),
  718. color(window.chartColors.orange).alpha(0.35).rgbString()
  719. ],
  720. fill: false,
  721. borderColor: [
  722. window.chartColors.green,
  723. window.chartColors.orange
  724. ],
  725. borderWidth: 2,
  726. pointRadius: 30,
  727. data: [0, 0]
  728. }]
  729. },
  730. type: 'pie',
  731. options: {
  732. legend: {
  733. display: true
  734. },
  735. title: {
  736. display: false,
  737. text: "试水4"
  738. },
  739. tooltips: {
  740. mode: 'point',
  741. intersect: false
  742. },
  743. responsive: true
  744. }
  745. };
  746. var ctxDefectB4 = document.getElementById("canvasDefectB4").getContext("2d");
  747. window.DefectB4 = new Chart(ctxDefectB4, configDefectB4);
  748. //===================================================
  749. }
  750. </script>
  751. <script src="/Plugins/chartjs-2.8.0/chart-2.8.min.js"></script>
  752. <script src="/Plugins/chartjs-2.8.0/chartjs-plugin-datalabels.js"></script>
  753. <script src="/Plugins/chartjs-2.8.0/utils.js"></script>
  754. <script src="/Plugins/circleChart/circleChart.min.js"></script>
  755. </body>
  756. </html>