index.html 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817
  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="/plugins/bootstrap-4.3.1/css/bootstrap.min.css">
  9. <link rel="stylesheet" href="/plugins/font-awesome-4.7.0/css/font-awesome.min.css">
  10. <link href="/Plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet" />
  11. <link rel="stylesheet" href="DashBoard.css?v3" />
  12. <script src="/Plugins/jquery-3.4.1/jquery-3.4.1.min.js"></script>
  13. <script src="/Plugins/xrequest/xrequest.min.js"></script>
  14. <title>东科软件</title>
  15. </head>
  16. <body>
  17. <!--宣传视频-->
  18. <script src="/main/Common/video.js"></script>
  19. <!--导航菜单-->
  20. <script src="/main/common/navbar.js"></script>
  21. <!--统计-->
  22. <div class="container-fluid">
  23. <!--页头-->
  24. <div class="row">
  25. <div class="col-4 d-inline-flex align-items-center justify-content-start">
  26. <img src="/Img/dongke_logo_white.png" style="height: 40px;" />
  27. <span class="pl-3" id="报表加载"></span>
  28. </div>
  29. <div class="col-4 d-inline-flex align-items-center justify-content-center">
  30. <h3 class="text-center"><span style="font-weight:600;font-size:36px;">质量看板—改洗</span></h3>
  31. </div>
  32. <div class="col-4 d-inline-flex align-items-center justify-content-end">
  33. <span id="当前时间"></span>
  34. <a class="pl-2" href="javascript:void(0)" onclick="fullScreen(); $('#navbar').toggle();">
  35. <img src="/Img/hegii_logo_white.png" style="height: 26px;" />
  36. </a>
  37. </div>
  38. </div>
  39. <!--行1-->
  40. <div class="row pt-0">
  41. <div class="col-12 pt-0">
  42. <div class="p-3 rounded border border-secondary d-flex flex-column" style="height:250px">
  43. <!--每小时不良率-->
  44. <div class="d-flex justify-content-center">
  45. <canvas id="canvasHourBLL" style="-moz-user-select: none;-webkit-user-select: none;-ms-user-select: none; height:230px;width:100%"></canvas>
  46. </div>
  47. </div>
  48. </div>
  49. </div>
  50. <!--行2-->
  51. <div class="row pt-0">
  52. <div class="col-12 pt-0">
  53. <div class="p-3 rounded border border-secondary d-flex flex-column" style="height:250px">
  54. <!--每小时报废率-->
  55. <div class="d-flex justify-content-center">
  56. <canvas id="canvasHourBFL" style="-moz-user-select: none;-webkit-user-select: none;-ms-user-select: none; height:230px;width:100%"></canvas>
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. <!--行3-->
  62. <div class="row pt-0">
  63. <div class="col-12 pt-0">
  64. <div class="p-3 rounded border border-secondary d-flex flex-column" style="height:250px">
  65. <!--每日不良率报废率-->
  66. <div class="d-flex justify-content-center">
  67. <canvas id="canvasDay" style="-moz-user-select: none;-webkit-user-select: none;-ms-user-select: none; height:230px;width:100%"></canvas>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. <!--行4-->
  73. <div class="row pt-0">
  74. <div class="col-2 pt-0">
  75. <div class="p-3 rounded border border-secondary d-flex flex-column" style="height:250px">
  76. <div class="d-flex justify-content-center">
  77. <canvas id="canvasCount1" style="-moz-user-select: none;-webkit-user-select: none;-ms-user-select: none; height:230px;width:100%"></canvas>
  78. </div>
  79. </div>
  80. </div>
  81. <div class="col-2 pt-0">
  82. <div class="p-3 rounded border border-secondary d-flex flex-column" style="height:250px">
  83. <div class="d-flex justify-content-center">
  84. <canvas id="canvasCount2" style="-moz-user-select: none;-webkit-user-select: none;-ms-user-select: none; height:230px;width:100%"></canvas>
  85. </div>
  86. </div>
  87. </div>
  88. <div class="col-2 pt-0">
  89. <div class="p-3 rounded border border-secondary d-flex flex-column" style="height:250px">
  90. <div class="d-flex justify-content-center">
  91. <canvas id="canvasCount3" style="-moz-user-select: none;-webkit-user-select: none;-ms-user-select: none; height:230px;width:100%"></canvas>
  92. </div>
  93. </div>
  94. </div>
  95. <div class="col-2 pt-0">
  96. <div class="p-3 rounded border border-secondary d-flex flex-column" style="height:250px">
  97. <div class="d-flex justify-content-center">
  98. <canvas id="canvasCount4" style="-moz-user-select: none;-webkit-user-select: none;-ms-user-select: none; height:230px;width:100%"></canvas>
  99. </div>
  100. </div>
  101. </div>
  102. <div class="col-2 pt-0">
  103. <div class="p-3 rounded border border-secondary d-flex flex-column" style="height:250px">
  104. <div class="d-flex justify-content-center">
  105. <canvas id="canvasCount5" style="-moz-user-select: none;-webkit-user-select: none;-ms-user-select: none; height:230px;width:100%"></canvas>
  106. </div>
  107. </div>
  108. </div>
  109. <div class="col-2 pt-0">
  110. <div class="p-3 rounded border border-secondary d-flex flex-column" style="height:250px">
  111. <div class="d-flex justify-content-center">
  112. <canvas id="canvasCount6" style="-moz-user-select: none;-webkit-user-select: none;-ms-user-select: none; height:230px;width:100%"></canvas>
  113. </div>
  114. </div>
  115. </div>
  116. </div>
  117. <!--<div style="height:26px;"></div>-->
  118. </div>
  119. <!--版权信息-->
  120. <!--<script src="../common/footer.js"></script>-->
  121. <script src="/Plugins/bootstrap-4.3.1/js/bootstrap.bundle.min.js"></script>
  122. <script src="/Plugins/bootstrap-table/bootstrap-table.min.js"></script>
  123. <script src="/Plugins/bootstrap-table/bootstrap-table-locale-all.min.js"></script>
  124. <script src="/Plugins/sweetalert/sweetalert.min.js"></script>
  125. <script src="/Plugins/chartjs-2.8.0/chart-2.8.min.js"></script>
  126. <script src="/Plugins/chartjs-2.8.0/chartjs-plugin-datalabels.js"></script>
  127. <script src="/Plugins/chartjs-2.8.0/utils.js"></script>
  128. <script src="/Plugins/circleChart/circleChart.min.js"></script>
  129. <script>
  130. //缺陷统计刷新时间
  131. var refreshTime1 = 30000;
  132. var currentTime1 = 0;
  133. var doGetData;
  134. var doGetTime;
  135. var frameHeight;
  136. var tableHeight;
  137. var offsetHeight = 20;
  138. $(document).ready(function () {
  139. //设置缩放
  140. //xuwell.setScale(1);
  141. //初始化
  142. init();
  143. //首次加载
  144. //loadData();
  145. //定时刷新数据
  146. doGetData = setInterval(function () { timeUpdate(); }, 1000);
  147. //刷新时间
  148. loadServerTime();
  149. doGetTime = setInterval(function () { loadServerTime(); }, 15000);
  150. });
  151. //取服务器时间
  152. function loadServerTime() {
  153. $.get('../api/GetDateTime.ashx', function (data) {
  154. var json = JSON.parse(data);
  155. if (json["success"] == true) {
  156. $('#当前时间').html(json["rows"]["时间"]);
  157. }
  158. });
  159. }
  160. function timeUpdate() {
  161. if (currentTime1 <= 0) {
  162. loadData();
  163. currentTime1 = refreshTime1;
  164. }
  165. else {
  166. if (currentTime1 > 0) {
  167. $('#报表加载').html('刷新:' + currentTime1 / 1000 + ' 秒');
  168. currentTime1 = currentTime1 - 1000;
  169. }
  170. }
  171. }
  172. function loadData(callback) {
  173. //正式数据===========================================================
  174. var defect = $.ajax({ url: "defect.ashx", dataType: "json", type: "get", async: false });
  175. var scrap = $.ajax({ url: "scrap.ashx", dataType: "json", type: "get", async: false });
  176. var dayDefect = $.ajax({ url: "dayDefect.ashx", dataType: "json", type: "get", async: false });
  177. var dayScrap = $.ajax({ url: "dayScrap.ashx", dataType: "json", type: "get", async: false });
  178. $.when(defect, scrap, dayDefect, dayScrap).then(
  179. function (resultDefect, resultScrap, resultDayDefect, resultDayScrap) {
  180. //加载每小时不良率
  181. var jsonDefect = resultDefect[0];
  182. if (jsonDefect["success"] == true) {
  183. window.HourBLL.data.labels = [];
  184. window.HourBLL.data.datasets[0].data = [];
  185. window.HourBLL.data.datasets[1].data = [];
  186. for (var i = 0; i < jsonDefect["rows"].length; i++) {
  187. window.HourBLL.data.labels.push(jsonDefect["rows"][i]["项目"]);
  188. window.HourBLL.data.datasets[0].data.push(jsonDefect["rows"][i]["不良率指标"]);
  189. window.HourBLL.data.datasets[1].data.push(jsonDefect["rows"][i]["不良率"]);
  190. }
  191. window.HourBLL.update();
  192. }
  193. //加载每小时废品率
  194. var jsonScrap = resultScrap[0];
  195. if (jsonScrap["success"] == true) {
  196. window.HourBFL.data.labels = [];
  197. window.HourBFL.data.datasets[0].data = [];
  198. window.HourBFL.data.datasets[1].data = [];
  199. for (var i = 0; i < jsonScrap["rows"].length; i++) {
  200. window.HourBFL.data.labels.push(jsonScrap["rows"][i]["项目"]);
  201. window.HourBFL.data.datasets[0].data.push(jsonScrap["rows"][i]["报废率指标"]);
  202. window.HourBFL.data.datasets[1].data.push(jsonScrap["rows"][i]["报废率"]);
  203. }
  204. window.HourBFL.update();
  205. //加载每日不良率
  206. var jsonDayDefect = resultDayDefect[0];
  207. //加载每日废品率
  208. var jsonDayScrap = resultDayScrap[0];
  209. if (jsonDayDefect["success"] == true) {
  210. window.Day.data.labels = [];
  211. window.Day.data.datasets[0].data = [];
  212. window.Day.data.datasets[1].data = [];
  213. for (var i = 0; i < jsonDayDefect["rows"].length; i++) {
  214. window.Day.data.labels.push(jsonDayDefect["rows"][i]["时间"]);
  215. window.Day.data.datasets[0].data.push(jsonDayDefect["rows"][i]["不良率指标"]);
  216. window.Day.data.datasets[1].data.push(jsonDayDefect["rows"][i]["不良率"]);
  217. }
  218. if (jsonDayScrap["success"] == true) {
  219. window.Day.data.datasets[2].data = [];
  220. window.Day.data.datasets[3].data = [];
  221. for (var i = 0; i < jsonDayScrap["rows"].length; i++) {
  222. //window.Day.data.labels.push(jsonDayScrap["rows"][i]["时间"]);
  223. window.Day.data.datasets[2].data.push(jsonDayScrap["rows"][i]["报废率指标"]);
  224. window.Day.data.datasets[3].data.push(jsonDayScrap["rows"][i]["报废率"]);
  225. }
  226. window.Day.update();
  227. }
  228. }
  229. if (typeof callback != 'undefined') callback();
  230. }
  231. });
  232. //===================================================================
  233. }
  234. function loadTable(id, url, callback) {
  235. }
  236. //日期格式化
  237. function groutingDate(value, row, index) {
  238. var d = new Date(value);
  239. return d.getFullYear() + '-' + d.getMonth() + '-' + d.getDay();
  240. }
  241. function dateFormat(fmt, date) {
  242. let ret;
  243. const opt = {
  244. "Y+": date.getFullYear().toString(), // 年
  245. "m+": (date.getMonth() + 1).toString(), // 月
  246. "d+": date.getDate().toString(), // 日
  247. "H+": date.getHours().toString(), // 时
  248. "M+": date.getMinutes().toString(), // 分
  249. "S+": date.getSeconds().toString() // 秒
  250. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  251. };
  252. for (let k in opt) {
  253. ret = new RegExp("(" + k + ")").exec(fmt);
  254. if (ret) {
  255. fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, "0")))
  256. };
  257. };
  258. return fmt;
  259. }
  260. </script>
  261. <script>
  262. window.chartColors = {
  263. red: 'rgb(255, 99, 132)',
  264. orange: 'rgb(255, 159, 64)',
  265. yellow: 'rgb(255, 250, 86)',
  266. green: 'rgb(75, 192, 192)',
  267. blue: 'rgb(54, 162, 250)',
  268. purple: 'rgb(153, 102, 255)',
  269. grey: 'rgb(231,233,237)'
  270. };
  271. var color = Chart.helpers.color;
  272. window.randomScalingFactor = function (num) {
  273. return Math.round(Math.random() * num);
  274. }
  275. function init() {
  276. Chart.defaults.global.defaultFontColor = 'white';
  277. Chart.defaults.global.defaultFontSize = 16;
  278. //每小时不良率=========================================
  279. window.configHourBLL = {
  280. data: {
  281. labels: ["07-08", "08-09", "09-10", "10-11", "11-12", "12-13", "13-14", "14-15", "15-16", "16-17", "17-18", "18-19", "19-20", "20-21", "21-22", "22-23", "23-00", "00-01"],
  282. datasets: [{
  283. type: 'line',
  284. label: "不良率指标",
  285. backgroundColor: color(window.chartColors.red).alpha(0.6).rgbString(),
  286. borderColor: window.chartColors.red,
  287. borderWidth: 2,
  288. pointRadius: 12,
  289. data: [],
  290. fill: false,
  291. },{
  292. type: 'line',
  293. label: "不良率",
  294. fill: false,
  295. backgroundColor: color(window.chartColors.blue).alpha(0.6).rgbString(),
  296. borderColor: window.chartColors.blue,
  297. borderWidth: 2,
  298. pointRadius: 12,
  299. data: []
  300. }]
  301. },
  302. type: 'line',
  303. options: {
  304. responsive: true,
  305. title: {
  306. display: true,
  307. text: '每小时不良率'
  308. },
  309. tooltips: {
  310. mode: 'index',
  311. intersect: false,
  312. },
  313. hover: {
  314. mode: 'nearest',
  315. intersect: true
  316. },
  317. scales: {
  318. xAxes: [{
  319. display: true,
  320. scaleLabel: {
  321. display: false,
  322. labelString: ''
  323. }
  324. }],
  325. yAxes: [{
  326. display: true,
  327. scaleLabel: {
  328. display: false,
  329. labelString: 'Value'
  330. }
  331. }]
  332. }
  333. }
  334. };
  335. var ctxHourBLL = document.getElementById("canvasHourBLL").getContext("2d");
  336. window.HourBLL = new Chart(ctxHourBLL, configHourBLL);
  337. //===================================================
  338. //每小时报废率=========================================
  339. window.configHourBFL = {
  340. data: {
  341. labels: ["07-08", "08-09", "09-10", "10-11", "11-12", "12-13", "13-14", "14-15", "15-16", "16-17", "17-18", "18-19", "19-20", "20-21", "21-22", "22-23", "23-00", "00-01"],
  342. datasets: [{
  343. type: 'line',
  344. label: "报废率指标",
  345. fill: false,
  346. backgroundColor: color(window.chartColors.red).alpha(0.6).rgbString(),
  347. borderColor: window.chartColors.red,
  348. borderWidth: 2,
  349. pointRadius: 12,
  350. data: []
  351. }, {
  352. type: 'line',
  353. label: "报废率",
  354. fill: false,
  355. backgroundColor: color(window.chartColors.blue).alpha(0.6).rgbString(),
  356. borderColor: window.chartColors.blue,
  357. borderWidth: 2,
  358. pointRadius: 12,
  359. data: []
  360. }]
  361. },
  362. type: 'line',
  363. options: {
  364. responsive: true,
  365. title: {
  366. display: true,
  367. text: '每小时报废率'
  368. },
  369. tooltips: {
  370. mode: 'index',
  371. intersect: false,
  372. },
  373. hover: {
  374. mode: 'nearest',
  375. intersect: true
  376. },
  377. scales: {
  378. xAxes: [{
  379. display: true,
  380. scaleLabel: {
  381. display: false,
  382. labelString: ''
  383. }
  384. }],
  385. yAxes: [{
  386. display: true,
  387. scaleLabel: {
  388. display: false,
  389. labelString: 'Value'
  390. }
  391. }]
  392. }
  393. }
  394. };
  395. var ctxHourBFL = document.getElementById("canvasHourBFL").getContext("2d");
  396. window.HourBFL = new Chart(ctxHourBFL, configHourBFL);
  397. //===================================================
  398. //每日计划达成=======================================
  399. window.configDay = {
  400. data: {
  401. 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'],
  402. datasets: [{
  403. type: 'line',
  404. label: '不良率指标',
  405. backgroundColor: color(window.chartColors.red).alpha(0.5).rgbString(),
  406. fill: false,
  407. borderColor: window.chartColors.red,
  408. borderWidth: 2,
  409. pointRadius: 12,
  410. data: []
  411. }, {
  412. type: 'line',
  413. label: '不良率',
  414. backgroundColor: color(window.chartColors.blue).alpha(0.5).rgbString(),
  415. fill: false,
  416. borderColor: window.chartColors.blue,
  417. borderWidth: 2,
  418. pointRadius: 12,
  419. data: []
  420. }, {
  421. type: 'line',
  422. label: '报废率指标',
  423. backgroundColor: color(window.chartColors.yellow).alpha(0.5).rgbString(),
  424. fill: false,
  425. borderColor: window.chartColors.yellow,
  426. borderWidth: 2,
  427. pointRadius: 12,
  428. data: []
  429. }, {
  430. type: 'line',
  431. label: '报废率',
  432. backgroundColor: color(window.chartColors.green).alpha(0.5).rgbString(),
  433. borderColor: window.chartColors.green,
  434. fill: false,
  435. borderColor: window.chartColors.green,
  436. borderWidth: 2,
  437. pointRadius: 12,
  438. data: []
  439. }
  440. ]
  441. },
  442. type: 'bar',
  443. options: {
  444. legend: {
  445. display: true
  446. },
  447. title: {
  448. display: true,
  449. text: "每日不良率"
  450. },
  451. tooltips: {
  452. mode: 'point',
  453. intersect: false
  454. },
  455. responsive: true,
  456. scales: {
  457. xAxes: [{
  458. stacked: false
  459. }],
  460. yAxes: [{
  461. display: true,
  462. stacked: false,
  463. //ticks: {
  464. // min: 0,
  465. // stepSize: 2,
  466. // max: 18
  467. //}
  468. }]
  469. }
  470. }
  471. };
  472. var ctxDay = document.getElementById("canvasDay").getContext("2d");
  473. window.Day = new Chart(ctxDay, configDay);
  474. //===================================================
  475. /*
  476. //缺陷统计===============================================
  477. window.configCount1 = {
  478. data: {
  479. labels: ['外列', '不平', '撞伤'],
  480. datasets: [{
  481. type: 'bar',
  482. label: '缺陷数量',
  483. backgroundColor: color(window.chartColors.blue).alpha(0.5).rgbString(),
  484. fill: false,
  485. borderColor: window.chartColors.blue,
  486. borderWidth: 2,
  487. pointRadius: 12,
  488. data: [0, 0, 0, 0, 0, 0, 0]
  489. }]
  490. },
  491. type: 'bar',
  492. options: {
  493. legend: {
  494. display: false
  495. },
  496. title: {
  497. display: true,
  498. text: "本日缺陷排行TOP3"
  499. },
  500. tooltips: {
  501. mode: 'point',
  502. intersect: false
  503. },
  504. responsive: true,
  505. scales: {
  506. xAxes: [{
  507. stacked: false
  508. }],
  509. yAxes: [{
  510. display: true,
  511. stacked: false,
  512. ticks: {
  513. min: 0,
  514. stepSize: 5,
  515. max: 20
  516. }
  517. }]
  518. }
  519. }
  520. };
  521. var ctxCount1 = document.getElementById("canvasCount1").getContext("2d");
  522. window.Count1 = new Chart(ctxCount1, configCount1);
  523. window.configCount2 = {
  524. data: {
  525. labels: ['H0966M', 'H0967M', 'H0968M'],
  526. datasets: [{
  527. type: 'bar',
  528. label: '缺陷数量',
  529. backgroundColor: color(window.chartColors.blue).alpha(0.5).rgbString(),
  530. fill: false,
  531. borderColor: window.chartColors.blue,
  532. borderWidth: 2,
  533. pointRadius: 12,
  534. data: [0, 0, 0, 0, 0, 0, 0]
  535. }]
  536. },
  537. type: 'bar',
  538. options: {
  539. legend: {
  540. display: false
  541. },
  542. title: {
  543. display: true,
  544. text: "本日缺陷型号TOP3"
  545. },
  546. tooltips: {
  547. mode: 'point',
  548. intersect: false
  549. },
  550. responsive: true,
  551. scales: {
  552. xAxes: [{
  553. stacked: false
  554. }],
  555. yAxes: [{
  556. display: true,
  557. stacked: false,
  558. ticks: {
  559. min: 0,
  560. stepSize: 5,
  561. max: 20
  562. }
  563. }]
  564. }
  565. }
  566. };
  567. var ctxCount2 = document.getElementById("canvasCount2").getContext("2d");
  568. window.Count2 = new Chart(ctxCount2, configCount2);
  569. window.configCount3 = {
  570. data: {
  571. labels: ['上部', '中部', '下部'],
  572. datasets: [{
  573. type: 'bar',
  574. label: '缺陷数量',
  575. backgroundColor: color(window.chartColors.blue).alpha(0.5).rgbString(),
  576. fill: false,
  577. borderColor: window.chartColors.blue,
  578. borderWidth: 2,
  579. pointRadius: 12,
  580. data: [0, 0, 0, 0, 0, 0, 0]
  581. }]
  582. },
  583. type: 'bar',
  584. options: {
  585. legend: {
  586. display: false
  587. },
  588. title: {
  589. display: true,
  590. text: "本日缺陷位置TOP3"
  591. },
  592. tooltips: {
  593. mode: 'point',
  594. intersect: false
  595. },
  596. responsive: true,
  597. scales: {
  598. xAxes: [{
  599. stacked: false
  600. }],
  601. yAxes: [{
  602. display: true,
  603. stacked: false,
  604. ticks: {
  605. min: 0,
  606. stepSize: 5,
  607. max: 20
  608. }
  609. }]
  610. }
  611. }
  612. };
  613. var ctxCount3 = document.getElementById("canvasCount3").getContext("2d");
  614. window.Count3 = new Chart(ctxCount3, configCount3);
  615. window.configCount4 = {
  616. data: {
  617. labels: ['外列', '不平', '撞伤'],
  618. datasets: [{
  619. type: 'bar',
  620. label: '缺陷数量',
  621. backgroundColor: color(window.chartColors.blue).alpha(0.5).rgbString(),
  622. fill: false,
  623. borderColor: window.chartColors.blue,
  624. borderWidth: 2,
  625. pointRadius: 12,
  626. data: [0, 0, 0, 0, 0, 0, 0]
  627. }]
  628. },
  629. type: 'bar',
  630. options: {
  631. legend: {
  632. display: false
  633. },
  634. title: {
  635. display: true,
  636. text: "本月缺陷排行TOP3"
  637. },
  638. tooltips: {
  639. mode: 'point',
  640. intersect: false
  641. },
  642. responsive: true,
  643. scales: {
  644. xAxes: [{
  645. stacked: false
  646. }],
  647. yAxes: [{
  648. display: true,
  649. stacked: false,
  650. ticks: {
  651. min: 0,
  652. stepSize: 5,
  653. max: 20
  654. }
  655. }]
  656. }
  657. }
  658. };
  659. var ctxCount4 = document.getElementById("canvasCount4").getContext("2d");
  660. window.Count4 = new Chart(ctxCount4, configCount4);
  661. window.configCount5 = {
  662. data: {
  663. labels: ['H0966M', 'H0967M', 'H0968M'],
  664. datasets: [{
  665. type: 'bar',
  666. label: '缺陷数量',
  667. backgroundColor: color(window.chartColors.blue).alpha(0.5).rgbString(),
  668. fill: false,
  669. borderColor: window.chartColors.blue,
  670. borderWidth: 2,
  671. pointRadius: 12,
  672. data: [0, 0, 0, 0, 0, 0, 0]
  673. }]
  674. },
  675. type: 'bar',
  676. options: {
  677. legend: {
  678. display: false
  679. },
  680. title: {
  681. display: true,
  682. text: "本月缺陷型号TOP3"
  683. },
  684. tooltips: {
  685. mode: 'point',
  686. intersect: false
  687. },
  688. responsive: true,
  689. scales: {
  690. xAxes: [{
  691. stacked: false
  692. }],
  693. yAxes: [{
  694. display: true,
  695. stacked: false,
  696. ticks: {
  697. min: 0,
  698. stepSize: 5,
  699. max: 20
  700. }
  701. }]
  702. }
  703. }
  704. };
  705. var ctxCount5 = document.getElementById("canvasCount5").getContext("2d");
  706. window.Count5 = new Chart(ctxCount5, configCount5);
  707. window.configCount6 = {
  708. data: {
  709. labels: ['上部', '中部', '下部'],
  710. datasets: [{
  711. type: 'bar',
  712. label: '缺陷数量',
  713. backgroundColor: color(window.chartColors.blue).alpha(0.5).rgbString(),
  714. fill: false,
  715. borderColor: window.chartColors.blue,
  716. borderWidth: 2,
  717. pointRadius: 12,
  718. data: [0, 0, 0, 0, 0, 0, 0]
  719. }]
  720. },
  721. type: 'bar',
  722. options: {
  723. legend: {
  724. display: false
  725. },
  726. title: {
  727. display: true,
  728. text: "本月缺陷位置TOP3"
  729. },
  730. tooltips: {
  731. mode: 'point',
  732. intersect: false
  733. },
  734. responsive: true,
  735. scales: {
  736. xAxes: [{
  737. stacked: false
  738. }],
  739. yAxes: [{
  740. display: true,
  741. stacked: false,
  742. ticks: {
  743. min: 0,
  744. stepSize: 5,
  745. max: 20
  746. }
  747. }]
  748. }
  749. }
  750. };
  751. var ctxCount6 = document.getElementById("canvasCount6").getContext("2d");
  752. window.Count6 = new Chart(ctxCount6, configCount6);
  753. //===================================================
  754. */
  755. };
  756. </script>
  757. </body>
  758. </html>