demo3.html 40 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564
  1. <!doctype html>
  2. <html lang="en" data-bs-theme="auto">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width">
  6. <link rel="icon" href="/app/images/dongke-logo.png">
  7. <link href="/plugins/bootstrap/bootstrap.min.css" rel="stylesheet">
  8. <title>东科软件</title>
  9. <style>
  10. body {
  11. background-color: black;
  12. height:100vh;
  13. }
  14. .col {
  15. width: 1680px;
  16. height: 960px;
  17. margin: auto;
  18. }
  19. .bigtitle {
  20. width:100%;
  21. background-repeat: no-repeat;
  22. background-position: center;
  23. background-image: url(/Img/title9in1.png);
  24. background-size: 100% auto;
  25. }
  26. .boardone {
  27. background-repeat: no-repeat;
  28. background-position: center;
  29. background-image: url(/Img/bg9in1.png);
  30. background-size: 1500px 800px; /* 宽度*高度*/
  31. }
  32. .boardone .title {
  33. padding-top: 140px;
  34. color: white;
  35. font-size: 40px;
  36. font-weight: 600;
  37. }
  38. .boardone .chart {
  39. margin-left: 150px;
  40. margin-top: 10px;
  41. width: 100%;
  42. height: 550px;
  43. font-size: 10px;
  44. outline-width: 10px;
  45. }
  46. .doughnut {
  47. width: 600px !important;
  48. height: 800px !important;
  49. }
  50. table, tr, td {
  51. border: 1px solid #84C1FF;
  52. font-size: 30px;
  53. color: #D0D0D0;
  54. white-space: nowrap;
  55. /*line-height: 200%;*/
  56. }
  57. .tableheader {
  58. font-weight: 800;
  59. background-color: #0f58a2;
  60. }
  61. .pinguan {
  62. margin-left: 10px;
  63. margin-top: 10px;
  64. width: 1230px;
  65. height: 450px;
  66. font-size: 5px;
  67. }
  68. .container {
  69. width: 100%;
  70. display: grid;
  71. grid-template-columns: repeat(3, 1fr); /* 创建3列,每列等宽 */
  72. grid-gap: 200px;
  73. box-sizing: border-box;
  74. padding: 0 20px;
  75. box-sizing: border-box; /* 确保padding被包含在容器的总宽度内 */
  76. max-width: none !important;
  77. }
  78. .workshop {
  79. font-size: 30px;
  80. color: white;
  81. }
  82. </style>
  83. </head>
  84. <body class="m-0 p-0 border-0" style="width:100%;height:100%;">
  85. <!--Android-->
  86. <div class="m-1"style="width:100%;height:100%;">
  87. <div class="row pb-4" style="width:100%;">
  88. <div class=" bigtitle"></div>
  89. </div>
  90. <div class="row text-center g-2 container" style="width:100%;">
  91. <div class="col boardone ">
  92. <div class="title">
  93. 新品入仓
  94. </div>
  95. <div class="chart" style="height:100%; width:80%">
  96. <canvas id="canvas04" height="125"></canvas>
  97. </div>
  98. </div>
  99. <div class="col boardone ">
  100. <div class="title">
  101. 每周产品半检检验报废率TOP5
  102. </div>
  103. <div class="chart" style="height:100%; width: 82%; margin-left: 120px ;margin-top:-15px">
  104. <canvas id="canvas10" height="130"></canvas>
  105. </div>
  106. </div>
  107. <div class="col boardone ">
  108. <div class="title pb-2">
  109. 每周产品成检检验报废率TOP5
  110. </div>
  111. <div class="chart" style="height:100%; width: 72%; margin-left: 200px ;">
  112. <canvas id="canvas06" height="140"></canvas>
  113. </div>
  114. </div>
  115. <div class="col boardone ">
  116. <div class="title">
  117. 每周各车间半检TOP3
  118. </div>
  119. <div class="doughnut">
  120. <div style=" margin-top: 120px; height: 500px; width: 800px;">
  121. <canvas id="canvas031"></canvas>
  122. <span class="workshop">一车间</span>
  123. </div>
  124. <div style="margin-left: 420px; margin-top: -620px; height: 500px; width: 800px; ">
  125. <canvas id="canvas032"></canvas>
  126. <span class="workshop">二车间</span>
  127. </div>
  128. <div style="margin-left: 900px; margin-top: -370px; height: 500px; width: 800px;">
  129. <canvas id="canvas033"></canvas>
  130. <span class="workshop">三车间</span>
  131. </div>
  132. </div>
  133. </div>
  134. <div class="col boardone ">
  135. <div class="title">
  136. 每周各车间产质量
  137. </div>
  138. <div class="chart" style="height:100%; width: 72%; margin-left: 200px ;">
  139. <canvas id="canvas01" height="145"></canvas>
  140. </div>
  141. </div>
  142. <div class="col boardone ">
  143. <div class="title">
  144. 每周各车间成检TOP3
  145. </div>
  146. <div class="doughnut">
  147. <div style="margin-top: 120px; height: 500px; width: 800px;">
  148. <canvas id="canvas021"></canvas>
  149. <span class="workshop">一车间</span>
  150. </div>
  151. <div style="margin-left: 420px; margin-top: -620px; height: 500px; width: 800px; ">
  152. <canvas id="canvas022"></canvas>
  153. <span class="workshop">二车间</span>
  154. </div>
  155. <div style="margin-left: 900px; margin-top: -370px; height: 500px; width: 800px;">
  156. <canvas id="canvas023"></canvas>
  157. <span class="workshop">三车间</span>
  158. </div>
  159. </div>
  160. </div>
  161. <div class="col boardone ">
  162. <div class="title">
  163. 品管抽检缺陷率
  164. </div>
  165. <div class="chart" style="height: 100%;width:82%; margin-left: 120px ;">
  166. <canvas id="canvas11" height="125"></canvas>
  167. </div>
  168. </div>
  169. <div class="col boardone ">
  170. <div class="title">
  171. 品管抽检数据展示
  172. </div>
  173. <div class="chart" style="height:100%;width: 82%; margin-left: 120px ;">
  174. <canvas id="canvas09" height="125"></canvas>
  175. </div>
  176. </div>
  177. <div class="col boardone ">
  178. <div class="title pb-2">
  179. 各车间缺陷周环比
  180. </div>
  181. <div class="chart" style="margin-left: 150px;">
  182. <table style="width:80%; height:50px;" class="table-striped">
  183. <tr class="各车间缺陷周环比">
  184. <td style="width:160px; height:10%;">产品类别</td>
  185. <td style="width: 160px; height: 10%;">缺陷名称</td>
  186. <td style="width: 160px; height: 10%;">缺陷数</td>
  187. <td style="width: 180px; height: 10%;">缺陷占比 </td>
  188. <td style="width: 180px; height: 10%;">上周比</td>
  189. <td>对比趋势</td>
  190. </tr>
  191. </table>
  192. <div>
  193. <div>
  194. <table id="dayTable_template" style="display:none;">
  195. <tr>
  196. <td style="width: 160px; height: 10%;">{产品类别}</td>
  197. <td style="width: 160px; height: 10%;">{缺陷名称}</td>
  198. <td style="width: 160px; height: 10%;">{缺陷数}</td>
  199. <td style="width: 180px; height: 10%;">{缺陷占比}</td>
  200. <td style="width: 180px; height: 10%;">{上周比}</td>
  201. <td>{对比趋势}</td>
  202. </tr>
  203. </table>
  204. </div>
  205. <table id="tableheader" class="tablefix" style="width:80%;height:100%; ">
  206. </table>
  207. </div>
  208. </div>
  209. </div>
  210. </div>
  211. </div>
  212. <script src="/plugins/bootstrap/bootstrap.bundle.min.js"></script>
  213. <script src="/plugins/jquery-3.4.1/jquery-3.4.1.min.js"></script>
  214. <script src="/Plugins/chartjs-2.8.0/chart-2.8.min.js"></script>
  215. <script src="/Plugins/chartjs-2.8.0/chartjs-plugin-datalabels.js"></script>
  216. <script src="/Plugins/chartjs-2.8.0/utils.js"></script>
  217. <script src="/main/Common/xuwell.js"></script>
  218. <script>
  219. //定义color
  220. var color = Chart.helpers.color;
  221. //每周各车间产质量
  222. var refreshTime01 = 30;
  223. var currentTime01 = 10;
  224. //半检大小件TOP3缺陷占比
  225. var refreshTime02 = 60;
  226. var currentTime02 = 10;
  227. //成检大小件TOP3缺陷占比
  228. var refreshTime03 = 120;
  229. var currentTime03 = 10;
  230. //每周各车间成型产量湿收率
  231. var refreshTime04 = 180;
  232. var currentTime04 = 10;
  233. //各车间缺陷周环比
  234. var refreshTime05 = 240;
  235. var currentTime05 = 10;
  236. //每周干补率及冷补率
  237. var refreshTime06 = 300;
  238. var currentTime06 = 10;
  239. //每周大小件大工序产量
  240. var refreshTime07 = 360;
  241. var currentTime07 = 10;
  242. //模具库存周转率,产品SKU周转率
  243. var refreshTime08 = 420;
  244. var currentTime08 = 10;
  245. //品管抽检数据展示
  246. var refreshTime09 = 480;
  247. var currentTime09 = 10;
  248. var mainInterval;
  249. var mainRowCount = 0;
  250. //刷新时间
  251. function doTimer() {
  252. if (currentTime01 == 0) load01();
  253. if (currentTime01 >= 0) $("#currentTime01").text(currentTime01);
  254. currentTime01--;
  255. if (currentTime02 == 0) load02();
  256. if (currentTime02 >= 0) $("#currentTime02").text(currentTime02);
  257. currentTime02--;
  258. if (currentTime03 == 0) load03();
  259. if (currentTime03 >= 0) $("#currentTime03").text(currentTime03);
  260. currentTime03--;
  261. if (currentTime04 == 0) load04();
  262. if (currentTime04 >= 0) $("#currentTime04").text(currentTime04);
  263. currentTime04--;
  264. if (currentTime05 == 0) load05();
  265. if (currentTime05 >= 0) $("#currentTime05").text(currentTime05);
  266. currentTime05--;
  267. if (currentTime06 == 0) load06();
  268. if (currentTime06 >= 0) $("#currentTime06").text(currentTime06);
  269. currentTime06--;
  270. if (currentTime07 == 0) load07();
  271. if (currentTime07 >= 0) $("#currentTime07").text(currentTime07);
  272. currentTime07--;
  273. if (currentTime08 == 0) load08();
  274. if (currentTime08 >= 0) $("#currentTime08").text(currentTime08);
  275. currentTime08--;
  276. if (currentTime09 == 0) load09();
  277. if (currentTime09 >= 0) $("#currentTime09").text(currentTime09);
  278. currentTime09--;
  279. }
  280. //页面初期
  281. $(document).ready(function () {
  282. initAll();
  283. //设置缩放
  284. xuwell.setScale(0.56);
  285. loadAll();
  286. });
  287. function mainScroll() {
  288. var scrollHeight = $("#tableheader").find("tr").outerHeight();
  289. $("#tableheader").animate({ marginTop: -scrollHeight, }, 500,
  290. function () {
  291. $(this).css({ marginTop: "0px", }).find("tr:first").appendTo(this);
  292. if (--mainRowCount == -1) load05();
  293. }
  294. );
  295. }
  296. //初期加载画面样式
  297. function initAll() {
  298. window.chartColors = {
  299. red: 'rgb(255, 99, 132)',
  300. orange: 'rgb(255, 159, 64)',
  301. yellow: 'rgb(255, 250, 86)',
  302. green: 'rgb(75, 192, 192)',
  303. blue: 'rgb(54, 162, 250)',
  304. purple: 'rgb(153, 102, 255)',
  305. grey: 'rgb(231,233,237)',
  306. MediumVioletRed: 'rgb(199,21,133)',
  307. DarkViolet: 'rgb(148,0,211)',
  308. Magenta1: 'rgb(255,0,255)'
  309. };
  310. window.randomScalingFactor = function (num) {
  311. return Math.round(Math.random() * num);
  312. }
  313. Chart.defaults.global.defaultFontColor = 'white';
  314. Chart.defaults.global.defaultFontSize = 30;
  315. //调用数据加载
  316. init01(); init021(); init022(); init023(); init031(); init032(); init033(); init04(); init05(); init06(); init08(); init09(); init11();
  317. }
  318. //每周各车间产质量
  319. function init01() {
  320. window.config01 = {
  321. data: {
  322. labels: ["一车间", "二车间", "三车间"],
  323. barWidth: 10,
  324. datasets: [{
  325. type: 'line',
  326. label: "综合质量",
  327. yAxesGroup: 'A',
  328. yAxisID: 'A',
  329. backgroundColor: color(window.chartColors.orange).alpha(0.5).rgbString(),
  330. borderColor: window.chartColors.orange,
  331. borderWidth: 2,
  332. pointRadius: 10,
  333. fill: false
  334. }, {
  335. type: 'line',
  336. label: "本烧质量",
  337. yAxesGroup: 'A',
  338. yAxisID: 'A',
  339. backgroundColor: color(window.chartColors.green).alpha(0.5).rgbString(),
  340. borderColor: window.chartColors.green,
  341. borderWidth: 2,
  342. pointRadius: 10,
  343. fill: false
  344. }, {
  345. label: '本烧产量',
  346. yAxesGroup: 'B',
  347. yAxisID: 'B',
  348. backgroundColor: color(window.chartColors.blue).alpha(0.7).rgbString(),
  349. borderColor: window.chartColors.blue,
  350. barWidth: 1,
  351. fill: true
  352. }]
  353. },
  354. type: 'bar',
  355. barWidth: 10,
  356. options: {
  357. legend: {
  358. display: true
  359. },
  360. title: {
  361. display: false,
  362. text: '每周各车间产质量'
  363. },
  364. tooltips: {
  365. mode: 'index',
  366. intersect: false,
  367. },
  368. hover: {
  369. mode: 'nearest',
  370. intersect: true
  371. },
  372. responsive: true,
  373. scales: {
  374. xAxes: [{
  375. scaleLabel: {
  376. stacked: false,
  377. },
  378. barThickness: 90
  379. }],
  380. yAxes: [{
  381. display: true,
  382. id: 'B',
  383. name: 'B',
  384. barWidth: 10,
  385. barThickness: 10,
  386. position: 'left',
  387. scaleLabel: {
  388. display: false,
  389. labelString: 'Value'
  390. },
  391. ticks: {
  392. min: 0,
  393. stepSize: 10000,
  394. max: 40000
  395. }
  396. }
  397. , {
  398. display: true,
  399. id: 'A',
  400. name: 'A',
  401. scalePositionLeft: false,
  402. position: 'right',
  403. scaleLabel: {
  404. display: false,
  405. labelString: 'Value2',
  406. barWidth: 5,
  407. },
  408. ticks: {
  409. min: 80,
  410. stepSize: 5,
  411. max: 100
  412. }
  413. }]
  414. }
  415. }
  416. };
  417. var ctx01 = document.getElementById("canvas01").getContext("2d");
  418. window.chart01 = new Chart(ctx01, config01);
  419. }
  420. //成检一车间TOP3缺陷占比
  421. function init021() {
  422. window.config021 = {
  423. data: {
  424. labels: [],
  425. datasets: [{
  426. label: '缺陷',
  427. backgroundColor: [
  428. Chart.helpers.color(window.chartColors.red).rgbString(),
  429. Chart.helpers.color(window.chartColors.orange).rgbString(),
  430. Chart.helpers.color(window.chartColors.yellow).rgbString()
  431. ],
  432. fill: false,
  433. borderColor: [
  434. window.chartColors.red,
  435. window.chartColors.orange,
  436. window.chartColors.yellow
  437. ],
  438. borderWidth: 4,
  439. pointRadius: 30,
  440. data: []
  441. }]
  442. },
  443. type: 'doughnut',
  444. options: {
  445. legend: {
  446. display: true
  447. },
  448. textstyle: {
  449. fontsize: 2
  450. },
  451. title: {
  452. display: false,
  453. text: "缺陷",
  454. },
  455. tooltips: {
  456. mode: 'point',
  457. intersect: false
  458. },
  459. responsive: true
  460. }
  461. };
  462. var ctx021 = document.getElementById("canvas021").getContext("2d");
  463. window.chart021 = new Chart(ctx021, config021);
  464. }
  465. //成检二车间TOP3缺陷占比
  466. function init022() {
  467. window.config022 = {
  468. data: {
  469. labels: [],
  470. datasets: [{
  471. label: '缺陷',
  472. backgroundColor: [
  473. Chart.helpers.color(window.chartColors.green).rgbString(),
  474. Chart.helpers.color(window.chartColors.blue).rgbString(),
  475. Chart.helpers.color(window.chartColors.purple).rgbString()
  476. ],
  477. fill: false,
  478. borderColor: [
  479. window.chartColors.green,
  480. window.chartColors.blue,
  481. window.chartColors.purple
  482. ],
  483. borderWidth: 4,
  484. pointRadius: 30,
  485. data: []
  486. }]
  487. },
  488. type: 'doughnut',
  489. options: {
  490. legend: {
  491. display: true
  492. },
  493. title: {
  494. display: false,
  495. text: "缺陷"
  496. },
  497. tooltips: {
  498. mode: 'point',
  499. intersect: false
  500. },
  501. responsive: true
  502. }
  503. };
  504. var ctx022 = document.getElementById("canvas022").getContext("2d");
  505. window.chart022 = new Chart(ctx022, config022);
  506. }
  507. //成检三车间TOP3缺陷占比
  508. function init023() {
  509. window.config023 = {
  510. data: {
  511. labels: [],
  512. datasets: [{
  513. label: '缺陷',
  514. backgroundColor: [
  515. Chart.helpers.color(window.chartColors.Magenta1).rgbString(),
  516. Chart.helpers.color(window.chartColors.MediumVioletRed).rgbString(),
  517. Chart.helpers.color(window.chartColors.DarkViolet).rgbString()
  518. ],
  519. fill: false,
  520. borderColor: [
  521. window.chartColors.Magenta1,
  522. window.chartColors.MediumVioletRed,
  523. window.chartColors.DarkViolet
  524. ],
  525. borderWidth: 4,
  526. pointRadius: 30,
  527. data: []
  528. }]
  529. },
  530. type: 'doughnut',
  531. options: {
  532. legend: {
  533. display: true
  534. },
  535. title: {
  536. display: false,
  537. text: "缺陷"
  538. },
  539. tooltips: {
  540. mode: 'point',
  541. intersect: false
  542. },
  543. responsive: true
  544. }
  545. };
  546. var ctx023 = document.getElementById("canvas023").getContext("2d");
  547. window.chart023 = new Chart(ctx023, config023);
  548. }
  549. //半检一车间TOP3缺陷占比
  550. function init031() {
  551. window.config031 = {
  552. data: {
  553. labels: [],
  554. datasets: [{
  555. label: '缺陷',
  556. backgroundColor: [
  557. Chart.helpers.color(window.chartColors.red).rgbString(),
  558. Chart.helpers.color(window.chartColors.orange).rgbString(),
  559. Chart.helpers.color(window.chartColors.yellow).rgbString()
  560. ],
  561. fill: false,
  562. borderColor: [
  563. window.chartColors.red,
  564. window.chartColors.orange,
  565. window.chartColors.yellow
  566. ],
  567. borderWidth: 4,
  568. pointRadius: 30,
  569. data: []
  570. }]
  571. },
  572. type: 'doughnut',
  573. options: {
  574. legend: {
  575. display: true
  576. },
  577. textstyle: {
  578. fontsize: 2
  579. },
  580. title: {
  581. display: false,
  582. text: "缺陷",
  583. },
  584. tooltips: {
  585. mode: 'point',
  586. intersect: false
  587. },
  588. responsive: true
  589. }
  590. };
  591. var ctx031 = document.getElementById("canvas031").getContext("2d");
  592. window.chart031 = new Chart(ctx031, config031);
  593. }
  594. //半检二车间TOP3缺陷占比
  595. function init032() {
  596. window.config032 = {
  597. data: {
  598. labels: [],
  599. datasets: [{
  600. label: '缺陷',
  601. backgroundColor: [
  602. Chart.helpers.color(window.chartColors.green).rgbString(),
  603. Chart.helpers.color(window.chartColors.purple).rgbString(),
  604. Chart.helpers.color(window.chartColors.blue).rgbString()
  605. ],
  606. fill: false,
  607. borderColor: [
  608. window.chartColors.green,
  609. window.chartColors.purple,
  610. window.chartColors.blue
  611. ],
  612. borderWidth: 4,
  613. pointRadius: 30,
  614. data: []
  615. }]
  616. },
  617. type: 'doughnut',
  618. options: {
  619. legend: {
  620. display: true
  621. },
  622. title: {
  623. display: false,
  624. text: "缺陷"
  625. },
  626. tooltips: {
  627. mode: 'point',
  628. intersect: false
  629. },
  630. responsive: true
  631. }
  632. };
  633. var ctx032 = document.getElementById("canvas032").getContext("2d");
  634. window.chart032 = new Chart(ctx032, config032);
  635. }
  636. //半检三车间TOP3缺陷占比
  637. function init033() {
  638. window.config033 = {
  639. data: {
  640. labels: [],
  641. datasets: [{
  642. label: '缺陷',
  643. backgroundColor: [
  644. Chart.helpers.color(window.chartColors.MediumVioletRed).rgbString(),
  645. Chart.helpers.color(window.chartColors.DarkViolet).rgbString(),
  646. Chart.helpers.color(window.chartColors.Magenta1).rgbString()
  647. ],
  648. fill: false,
  649. borderColor: [
  650. window.chartColors.MediumVioletRed,
  651. window.chartColors.DarkViolet,
  652. window.chartColors.Magenta1
  653. ],
  654. borderWidth: 4,
  655. pointRadius: 30,
  656. data: []
  657. }]
  658. },
  659. type: 'doughnut',
  660. options: {
  661. legend: {
  662. display: true
  663. },
  664. title: {
  665. display: false,
  666. text: "缺陷"
  667. },
  668. tooltips: {
  669. mode: 'point',
  670. intersect: false
  671. },
  672. responsive: true
  673. }
  674. };
  675. var ctx033 = document.getElementById("canvas033").getContext("2d");
  676. window.chart033 = new Chart(ctx033, config033);
  677. }
  678. //新品入仓
  679. function init04() {
  680. window.config04 = {
  681. data: {
  682. labels: [],
  683. datasets: [{
  684. label: '新品入库',
  685. backgroundColor: Chart.helpers.color(window.chartColors.orange).alpha(0.6).rgbString(),
  686. fill: false,
  687. borderColor: window.chartColors.orange,
  688. borderWidth: 4,
  689. pointRadius: 30,
  690. data: []
  691. },]
  692. },
  693. type: 'bar',
  694. options: {
  695. legend: {
  696. display: true
  697. },
  698. title: {
  699. display: false,
  700. text: "产量"
  701. },
  702. tooltips: {
  703. mode: 'point',
  704. intersect: false
  705. },
  706. axisLabel: {
  707. textStyle: {
  708. fontSize: 5,
  709. },
  710. },
  711. responsive: true,
  712. scales: {
  713. xAxes: [{
  714. display: true,
  715. scaleLabel: {
  716. display: false,
  717. labelString: '',
  718. fontsize: 10
  719. },
  720. barThickness: 60,
  721. },
  722. ],
  723. yAxes: [{
  724. display: true,
  725. id: 'A',
  726. name: 'A',
  727. scalePositionLeft: true,
  728. position: 'left',
  729. scaleLabel: {
  730. display: false,
  731. labelString: 'Value'
  732. },
  733. ticks: {
  734. min: 0,
  735. stepSize: 500
  736. }
  737. }]
  738. }
  739. }
  740. };
  741. var ctx04 = document.getElementById("canvas04").getContext("2d");
  742. ctx04.fontsize = 10;
  743. window.chart04 = new Chart(ctx04, config04);
  744. }
  745. //各车间缺陷周环比
  746. function init05() {
  747. }
  748. //每周干补率及冷补率
  749. function init06() {
  750. window.config06 = {
  751. data: {
  752. labels: [],
  753. datasets: [
  754. {
  755. type: 'line',
  756. label: "成检废品率",
  757. yAxesGroup: 'A',
  758. yAxisID: 'A',
  759. backgroundColor: color(window.chartColors.orange).alpha(0.5).rgbString(),
  760. borderColor: window.chartColors.MediumVioletRed,
  761. borderWidth: 4,
  762. pointRadius: 20,
  763. fill: false
  764. }, {
  765. label: '成检检验数',
  766. yAxesGroup: 'B',
  767. yAxisID: 'B',
  768. backgroundColor: color(window.chartColors.blue).alpha(0.7).rgbString(),
  769. borderColor: window.chartColors.blue,
  770. barWidth: 1,
  771. fill: true
  772. }]
  773. },
  774. type: 'bar',
  775. barWidth: 10,
  776. options: {
  777. legend: {
  778. display: true,
  779. labels: {
  780. // 这个更具体的字体属性覆盖全局属性
  781. fontColor: 'white'
  782. }
  783. },
  784. title: {
  785. display: false,
  786. text: '每周产品检验报废率'
  787. },
  788. tooltips: {
  789. mode: 'index',
  790. intersect: false,
  791. },
  792. hover: {
  793. mode: 'nearest',
  794. intersect: true
  795. },
  796. responsive: true,
  797. scales: {
  798. xAxes: [{
  799. scaleLabel: {
  800. stacked: false,
  801. },
  802. barThickness: 90,
  803. ticks: {
  804. fontSize: 20 // 设置X轴标签的字体大小
  805. }
  806. }],
  807. yAxes: [{
  808. display: true,
  809. id: 'B',
  810. name: 'B',
  811. barWidth: 10,
  812. barThickness: 10,
  813. position: 'left',
  814. scaleLabel: {
  815. display: false,
  816. labelString: 'Value'
  817. },
  818. ticks: {
  819. min: 0,
  820. stepSize: 500
  821. }
  822. }
  823. , {
  824. display: true,
  825. id: 'A',
  826. name: 'A',
  827. scalePositionLeft: false,
  828. position: 'right',
  829. scaleLabel: {
  830. display: false,
  831. labelString: 'Value2',
  832. barWidth: 5,
  833. },
  834. ticks: {
  835. min: 0,
  836. stepSize: 10
  837. }
  838. }]
  839. }
  840. }
  841. };
  842. var ctx06 = document.getElementById("canvas06").getContext("2d");
  843. window.chart06 = new Chart(ctx06, config06);
  844. }
  845. //每周大小件大工序产量
  846. //function init07() {
  847. // window.config07 = {
  848. // data: {
  849. // labels: ["成型", "半检", "施釉", "烧成", "成检", "包装"],
  850. // datasets: [{
  851. // label: '大件产量',
  852. // backgroundColor: Chart.helpers.color(window.chartColors.orange).alpha(0.6).rgbString(),
  853. // fill: false,
  854. // borderColor: window.chartColors.orange,
  855. // borderWidth: 4,
  856. // pointRadius: 30,
  857. // data: []
  858. // },
  859. // {
  860. // label: '小件产量',
  861. // backgroundColor: Chart.helpers.color(window.chartColors.blue).alpha(0.6).rgbString(),
  862. // fill: false,
  863. // borderColor: window.chartColors.blue,
  864. // borderWidth: 4,
  865. // pointRadius: 30,
  866. // data: []
  867. // },]
  868. // },
  869. // type: 'bar',
  870. // options: {
  871. // legend: {
  872. // display: true
  873. // },
  874. // title: {
  875. // display: false,
  876. // text: "品管抽检数据展示"
  877. // },
  878. // tooltips: {
  879. // mode: 'point',
  880. // intersect: false
  881. // },
  882. // responsive: true,
  883. // scales: {
  884. // xAxes: [{
  885. // display: true,
  886. // scaleLabel: {
  887. // display: false,
  888. // labelString: ''
  889. // }
  890. // }],
  891. // yAxes: [{
  892. // display: true,
  893. // id: 'A',
  894. // name: 'A',
  895. // scalePositionLeft: true,
  896. // position: 'left',
  897. // scaleLabel: {
  898. // display: false,
  899. // labelString: 'Value'
  900. // },
  901. // ticks: {
  902. // min: 0,
  903. // stepSize: 10000,
  904. // max:40000
  905. // }
  906. // }]
  907. // }
  908. // }
  909. // };
  910. // var ctx07 = document.getElementById("canvas07").getContext("2d");
  911. // window.chart07 = new Chart(ctx07, config07);
  912. //}
  913. //每周产品半检验报废率
  914. function init08() {
  915. window.config10 = {
  916. data: {
  917. labels: [],
  918. datasets: [{
  919. type: 'line',
  920. label: "半检废品率",
  921. yAxesGroup: 'A',
  922. yAxisID: 'A',
  923. backgroundColor: color(window.chartColors.red).alpha(0.5).rgbString(),
  924. borderColor: window.chartColors.MediumVioletRed,
  925. borderWidth: 4,
  926. pointRadius: 20,
  927. fill: false,
  928. }, {
  929. label: '半检检验数',
  930. yAxesGroup: 'B',
  931. yAxisID: 'B',
  932. backgroundColor: color(window.chartColors.green).alpha(0.7).rgbString(),
  933. borderColor: window.chartColors.green,
  934. barWidth: 1,
  935. fill: true,
  936. },
  937. ]
  938. },
  939. type: 'bar',
  940. barWidth: 10,
  941. options: {
  942. legend: {
  943. display: true,
  944. labels: {
  945. // 这个更具体的字体属性覆盖全局属性
  946. fontColor: 'white'
  947. }
  948. },
  949. title: {
  950. display: false,
  951. text: '每周产品检验报废率'
  952. },
  953. tooltips: {
  954. mode: 'index',
  955. intersect: false,
  956. },
  957. hover: {
  958. mode: 'nearest',
  959. intersect: true
  960. },
  961. responsive: true,
  962. scales: {
  963. xAxes: [{
  964. scaleLabel: {
  965. stacked: false,
  966. },
  967. barThickness: 90,
  968. ticks: {
  969. fontSize: 20 // 设置X轴标签的字体大小
  970. }
  971. }],
  972. yAxes: [{
  973. display: true,
  974. id: 'B',
  975. name: 'B',
  976. barWidth: 10,
  977. barThickness: 10,
  978. position: 'left',
  979. scaleLabel: {
  980. display: false,
  981. labelString: 'Value'
  982. },
  983. ticks: {
  984. min: 0,
  985. stepSize: 500
  986. }
  987. }
  988. , {
  989. display: true,
  990. id: 'A',
  991. name: 'A',
  992. scalePositionLeft: false,
  993. position: 'right',
  994. scaleLabel: {
  995. display: false,
  996. labelString: 'Value2',
  997. barWidth: 5,
  998. },
  999. ticks: {
  1000. min: 0,
  1001. stepSize: 3
  1002. }
  1003. }]
  1004. }
  1005. }
  1006. };
  1007. var ctx10 = document.getElementById("canvas10").getContext("2d");
  1008. window.chart10 = new Chart(ctx10, config10);
  1009. }
  1010. //品管抽检数据展示
  1011. function init09() {
  1012. window.config09 = {
  1013. data: {
  1014. labels: [],
  1015. datasets: [{
  1016. label: '完成率',
  1017. type: 'line',
  1018. yAxesGroup: 'A',
  1019. yAxisID: 'A',
  1020. backgroundColor: Chart.helpers.color(window.chartColors.orange).alpha(0.6).rgbString(),
  1021. fill: false,
  1022. borderColor: window.chartColors.orange,
  1023. borderWidth: 2,
  1024. pointRadius: 15,
  1025. data: []
  1026. },
  1027. {
  1028. label: '合格率',
  1029. type: 'line',
  1030. yAxesGroup: 'A',
  1031. yAxisID: 'A',
  1032. backgroundColor: Chart.helpers.color(window.chartColors.blue).alpha(0.6).rgbString(),
  1033. fill: false,
  1034. borderColor: window.chartColors.blue,
  1035. borderWidth: 2,
  1036. pointRadius: 15,
  1037. data: []
  1038. },
  1039. {
  1040. label: '抽检数',
  1041. yAxesGroup: 'B',
  1042. yAxisID: 'B',
  1043. backgroundColor: color(window.chartColors.blue).alpha(0.7).rgbString(),
  1044. borderColor: window.chartColors.blue,
  1045. barWidth: 1,
  1046. fill: true
  1047. }
  1048. ]
  1049. },
  1050. type: 'bar',
  1051. options: {
  1052. legend: {
  1053. display: true
  1054. },
  1055. title: {
  1056. display: false,
  1057. text: "品管抽检数据展示"
  1058. },
  1059. tooltips: {
  1060. mode: 'point',
  1061. intersect: false
  1062. },
  1063. responsive: true,
  1064. scales: {
  1065. xAxes: [{
  1066. scaleLabel: {
  1067. stacked: false,
  1068. },
  1069. barThickness: 80
  1070. }],
  1071. yAxes: [{
  1072. display: true,
  1073. id: 'B',
  1074. name: 'B',
  1075. barWidth: 10,
  1076. barThickness: 10,
  1077. position: 'left',
  1078. scaleLabel: {
  1079. display: false,
  1080. labelString: 'Value'
  1081. },
  1082. ticks: {
  1083. min: 200,
  1084. stepSize: 1000
  1085. }
  1086. }
  1087. , {
  1088. display: true,
  1089. id: 'A',
  1090. name: 'A',
  1091. scalePositionLeft: false,
  1092. position: 'right',
  1093. scaleLabel: {
  1094. display: false,
  1095. labelString: 'Value2',
  1096. barWidth: 5,
  1097. },
  1098. ticks: {
  1099. min: 10,
  1100. stepSize: 20
  1101. }
  1102. }]
  1103. }
  1104. }
  1105. };
  1106. var ctx09 = document.getElementById("canvas09").getContext("2d");
  1107. window.chart09 = new Chart(ctx09, config09);
  1108. }
  1109. function init11() {
  1110. window.config11 = {
  1111. data: {
  1112. labels: [],
  1113. datasets: [{
  1114. type: 'line',
  1115. label: "缺陷率",
  1116. yAxesGroup: 'A',
  1117. yAxisID: 'A',
  1118. backgroundColor: color(window.chartColors.red).alpha(0.5).rgbString(),
  1119. borderColor: window.chartColors.MediumVioletRed,
  1120. borderWidth: 4,
  1121. pointRadius: 20,
  1122. fill: false,
  1123. }, {
  1124. label: '缺陷数',
  1125. yAxesGroup: 'B',
  1126. yAxisID: 'B',
  1127. backgroundColor: color(window.chartColors.green).alpha(0.7).rgbString(),
  1128. borderColor: window.chartColors.green,
  1129. barWidth: 1,
  1130. fill: true,
  1131. },
  1132. ]
  1133. },
  1134. type: 'bar',
  1135. barWidth: 10,
  1136. options: {
  1137. legend: {
  1138. display: true,
  1139. labels: {
  1140. // 这个更具体的字体属性覆盖全局属性
  1141. fontColor: 'white'
  1142. }
  1143. },
  1144. title: {
  1145. display: false,
  1146. text: '品管抽检缺陷率'
  1147. },
  1148. tooltips: {
  1149. mode: 'index',
  1150. intersect: false,
  1151. },
  1152. hover: {
  1153. mode: 'nearest',
  1154. intersect: true
  1155. },
  1156. responsive: true,
  1157. scales: {
  1158. xAxes: [{
  1159. scaleLabel: {
  1160. stacked: false,
  1161. },
  1162. barThickness: 90,
  1163. ticks: {
  1164. fontSize: 20 // 设置X轴标签的字体大小
  1165. }
  1166. }],
  1167. yAxes: [{
  1168. display: true,
  1169. id: 'B',
  1170. name: 'B',
  1171. barWidth: 10,
  1172. barThickness: 10,
  1173. position: 'left',
  1174. scaleLabel: {
  1175. display: false,
  1176. labelString: 'Value'
  1177. },
  1178. ticks: {
  1179. min: 0,
  1180. stepSize: 500
  1181. }
  1182. }
  1183. , {
  1184. display: true,
  1185. id: 'A',
  1186. name: 'A',
  1187. scalePositionLeft: false,
  1188. position: 'right',
  1189. scaleLabel: {
  1190. display: false,
  1191. labelString: 'Value2',
  1192. barWidth: 5,
  1193. },
  1194. ticks: {
  1195. min: 0,
  1196. stepSize: 3,
  1197. }
  1198. }]
  1199. }
  1200. }
  1201. };
  1202. var ctx11 = document.getElementById("canvas11").getContext("2d");
  1203. window.chart11 = new Chart(ctx11, config11);
  1204. }
  1205. //初期加载画面数据
  1206. function loadAll() {
  1207. load01(); load02(); load03(); load04(); load05(); load06(); load08(); load09(); load11();
  1208. }
  1209. //每周各车间产质量
  1210. function load01() {
  1211. //加载数据
  1212. $.get("rpt.ashx?m=Load01", function (data) {
  1213. //更新图表数据
  1214. var json = JSON.parse(data);
  1215. if (json["success"] == true) {
  1216. let onedate1 = [];
  1217. let onedate2 = [];
  1218. let onedate3 = [];
  1219. onedate1.push((json["rows"][0]["一车间"]));
  1220. onedate1.push((json["rows"][0]["二车间"]));
  1221. onedate1.push((json["rows"][0]["三车间"]));
  1222. onedate2.push((json["rows"][1]["一车间"]));
  1223. onedate2.push((json["rows"][1]["二车间"]));
  1224. onedate2.push((json["rows"][1]["三车间"]));
  1225. onedate3.push((json["rows"][2]["一车间"]));
  1226. onedate3.push((json["rows"][2]["二车间"]));
  1227. onedate3.push((json["rows"][2]["三车间"]));
  1228. window.chart01.data.datasets[0].data = onedate3;
  1229. window.chart01.data.datasets[1].data = onedate2;
  1230. window.chart01.data.datasets[2].data = onedate1;
  1231. window.chart01.update();
  1232. }
  1233. //加载完成,重置刷新时间。
  1234. currentTime01 = refreshTime01;
  1235. });
  1236. }
  1237. //半检大小件TOP3缺陷占比
  1238. function load02() {
  1239. //加载数据
  1240. $.get("rpt.ashx?m=Load02", function (data) {
  1241. //更新图表数据
  1242. var json = JSON.parse(data);
  1243. if (json["success"] == true) {
  1244. let onedate = []; let onelabel = [];
  1245. let twodate = []; let twolabel = [];
  1246. let threedate = []; let threelabel = [];
  1247. //var num = (json["rows"][0]["ROWNUM"]);
  1248. var num = (json["rows"].length);
  1249. for (var i = 0; i < num; i++) {
  1250. if (i <= 2) { //一车间
  1251. onedate.push((json["rows"][i]["缺陷占比"]));
  1252. onelabel.push(json["rows"][i]["缺陷名称"]);
  1253. }
  1254. if (i > 2 && i < 6) { //二车间
  1255. twodate.push((json["rows"][i]["缺陷占比"]));
  1256. twolabel.push(json["rows"][i]["缺陷名称"]);
  1257. }
  1258. if (i >= 6) {//三车间
  1259. threedate.push((json["rows"][i]["缺陷占比"]));
  1260. threelabel.push(json["rows"][i]["缺陷名称"]);
  1261. }
  1262. window.chart031.data.datasets[0].data = onedate;
  1263. window.chart031.data.labels = onelabel;
  1264. window.chart032.data.datasets[0].data = twodate;
  1265. window.chart032.data.labels = twolabel;
  1266. window.chart033.data.datasets[0].data = threedate;
  1267. window.chart033.data.labels = threelabel;
  1268. window.chart031.update();
  1269. window.chart032.update();
  1270. window.chart033.update();
  1271. }
  1272. //加载完成,重置刷新时间。
  1273. currentTime01 = refreshTime01;
  1274. }
  1275. });
  1276. }
  1277. //成检大小件TOP3缺陷占比
  1278. function load03() {
  1279. //加载数据
  1280. $.get("rpt.ashx?m=Load03", function (data) {
  1281. //更新图表数据
  1282. var json = JSON.parse(data);
  1283. if (json["success"] == true) {
  1284. let onedate = []; let onelabel = [];
  1285. let twodate = []; let twolabel = [];
  1286. let threedate = []; let threelabel = [];
  1287. if (json["success"] == true) {
  1288. //var num = (json["rows"][0]["ROWNUM"]);
  1289. var num = (json["rows"].length);
  1290. for (var i = 0; i < num; i++) {
  1291. if (i <= 2) { //一车间
  1292. onedate.push((json["rows"][i]["缺陷占比"]));
  1293. onelabel.push(json["rows"][i]["缺陷名称"]);
  1294. }
  1295. if (i > 2 && i < 6) { //二车间
  1296. twodate.push((json["rows"][i]["缺陷占比"]));
  1297. twolabel.push(json["rows"][i]["缺陷名称"]);
  1298. }
  1299. if (i >= 6) {//三车间
  1300. threedate.push((json["rows"][i]["缺陷占比"]));
  1301. threelabel.push(json["rows"][i]["缺陷名称"]);
  1302. }
  1303. window.chart021.data.datasets[0].data = onedate;
  1304. window.chart021.data.labels = onelabel;
  1305. window.chart022.data.datasets[0].data = twodate;
  1306. window.chart022.data.labels = twolabel;
  1307. window.chart023.data.datasets[0].data = threedate;
  1308. window.chart023.data.labels = threelabel;
  1309. window.chart021.update();
  1310. window.chart022.update();
  1311. window.chart023.update();
  1312. }
  1313. }
  1314. //加载完成,重置刷新时间。
  1315. currentTime01 = refreshTime01;
  1316. }
  1317. });
  1318. }
  1319. //新品入仓
  1320. function load04() {
  1321. //加载数据
  1322. $.get("rpt.ashx?m=Load04", function (data) {
  1323. //更新图表数据
  1324. var json = JSON.parse(data);
  1325. if (json["success"] == true) {
  1326. let onedate = []; let onelabel = [];
  1327. var num = (json["rows"].length);
  1328. for (var i = 0; i < num; i++) {
  1329. onedate.push((json["rows"][i]["COUNTS"]));
  1330. onelabel.push(json["rows"][i]["GOODCODE"]);
  1331. window.chart04.data.labels = onelabel;
  1332. window.chart04.data.datasets[0].data = onedate;
  1333. window.chart04.update();
  1334. }
  1335. }
  1336. //加载完成,重置刷新时间。
  1337. currentTime01 = refreshTime01;
  1338. });
  1339. }
  1340. //各车间缺陷周环比
  1341. function load05() {
  1342. if (mainInterval) {
  1343. clearInterval(mainInterval);
  1344. console.log("Interval Stop!");
  1345. }
  1346. //加载数据
  1347. $.get("rpt.ashx?m=Load05", function (data) {
  1348. //更新图表数据
  1349. var json = JSON.parse(data);
  1350. if (json["success"] == true) {
  1351. $("#tableheader").html("");
  1352. for (var i = 0; i < json["rows"].length; i++) {
  1353. var temp = $("#dayTable_template").html();
  1354. temp = temp.replace("<tbody>", "").replace("</tbody>", "");
  1355. temp = temp.replace('{产品类别}', json["rows"][i]['产品类别']);
  1356. temp = temp.replace('{缺陷名称}', json["rows"][i]['缺陷名称']);
  1357. temp = temp.replace('{缺陷数}', json["rows"][i]['缺陷数']);
  1358. temp = temp.replace('{缺陷占比}', json["rows"][i]['缺陷占比']);
  1359. temp = temp.replace('{上周比}', json["rows"][i]['上周比']);
  1360. temp = temp.replace('{对比趋势}', json["rows"][i]['对比趋势']);
  1361. $("#tableheader").append(temp);
  1362. }
  1363. var num = (json["rows"].length);
  1364. for (var i = 0; i < num; i++) {
  1365. var a = document.getElementById("tableheader").rows[i].cells[5].innerHTML;
  1366. if (a == '下降↓') {
  1367. document.getElementById("tableheader").rows[i].cells[5].style.color = '#3bf738';
  1368. }
  1369. else {
  1370. document.getElementById("tableheader").rows[i].cells[5].style.color = 'red';
  1371. }
  1372. }
  1373. mainRowCount = json["rows"].length;
  1374. mainInterval = setInterval(mainScroll, 3000);
  1375. //加载完成,重置刷新时间。
  1376. currentTime01 = refreshTime01;
  1377. }
  1378. });
  1379. }
  1380. function load06() {
  1381. //加载数据
  1382. $.get("rpt.ashx?m=Load06", function (data) {
  1383. //更新图表数据
  1384. var json = JSON.parse(data);
  1385. if (json["success"] == true) {
  1386. let onedate1 = [];
  1387. let onedate2 = [];
  1388. let onedate3 = [];
  1389. var num = (json["rows"].length);
  1390. for (var i = 0; i < num; i++) {
  1391. onedate3.push(json["rows"][i]["检验数"]);
  1392. onedate2.push(json["rows"][i]["废品率"]);
  1393. onedate1.push(json["rows"][i]["GOODSCODE"]);
  1394. }
  1395. window.chart06.data.datasets[0].data = onedate2;
  1396. window.chart06.data.datasets[1].data = onedate3;
  1397. window.chart06.data.labels = onedate1;
  1398. window.chart06.update();
  1399. }
  1400. //加载完成,重置刷新时间。
  1401. currentTime01 = refreshTime01;
  1402. });
  1403. }
  1404. //每周大小件大工序产量
  1405. function load07() {
  1406. //加载数据
  1407. $.get("rpt.ashx?m=Load07", function (data) {
  1408. var json = JSON.parse(data);
  1409. if (json["success"] == true) {
  1410. let onedate1 = [];
  1411. let onedate2 = [];
  1412. let onedate3 = [];
  1413. onedate1.push((json["rows"][0]["SMALLGDD"]));
  1414. onedate1.push((json["rows"][0]["SMALLHALF"]));
  1415. onedate1.push((json["rows"][0]["SMALLGLAZE"]));
  1416. onedate1.push((json["rows"][0]["SMALLKILN"]));
  1417. onedate1.push((json["rows"][0]["SMALLCHECK"]));
  1418. onedate1.push((json["rows"][0]["SMALLPACK"]));
  1419. onedate2.push((json["rows"][0]["BIGGDD"]));
  1420. onedate2.push((json["rows"][0]["BIGHALF"]));
  1421. onedate2.push((json["rows"][0]["BIGGLAZE"]));
  1422. onedate2.push((json["rows"][0]["BIGKILN"]));
  1423. onedate2.push((json["rows"][0]["BIGCHECK"]));
  1424. onedate2.push((json["rows"][0]["BIGPACK"]));
  1425. window.chart07.data.datasets[1].data = onedate1;
  1426. window.chart07.data.datasets[0].data = onedate2;
  1427. window.chart07.update();
  1428. }
  1429. //加载完成,重置刷新时间。
  1430. currentTime01 = refreshTime01;
  1431. });
  1432. }
  1433. //每周产品检验报废率
  1434. function load08() {
  1435. //加载数据
  1436. $.get("rpt.ashx?m=Load10", function (data) {
  1437. //更新图表数据
  1438. var json = JSON.parse(data);
  1439. if (json["success"] == true) {
  1440. let onedate1 = [];
  1441. let onedate2 = [];
  1442. let onedate3 = [];
  1443. var num = (json["rows"].length);
  1444. for (var i = 0; i < num; i++) {
  1445. onedate3.push(json["rows"][i]["检验数"]);
  1446. onedate2.push(json["rows"][i]["废品率"]);
  1447. onedate1.push(json["rows"][i]["GOODSCODE"]);
  1448. }
  1449. window.chart10.data.datasets[0].data = onedate2;
  1450. window.chart10.data.datasets[1].data = onedate3;
  1451. window.chart10.data.labels = onedate1;
  1452. window.chart10.update();
  1453. }
  1454. //加载完成,重置刷新时间。
  1455. currentTime01 = refreshTime01;
  1456. });
  1457. }
  1458. //品管抽检数据展示
  1459. function load09() {
  1460. //加载数据
  1461. $.get("rpt.ashx?m=Load09", function (data) {
  1462. //更新图表数据
  1463. var json = JSON.parse(data);
  1464. if (json["success"] == true) {
  1465. let onedate1 = [];
  1466. let onedate2 = [];
  1467. let onedate3 = [];
  1468. let onedate4 = [];
  1469. for (var i = 0; i < json["rows"].length; i++) {
  1470. onedate4.push((json["rows"][i]["INSPECTIONQUANTITY"]));
  1471. onedate1.push((json["rows"][i]["WANCHENGLV"]));
  1472. onedate2.push((json["rows"][i]["HEGELV"]));
  1473. onedate3.push(json["rows"][i]["PLANDATE"]);
  1474. }
  1475. window.chart09.data.datasets[0].data = onedate1;
  1476. window.chart09.data.datasets[1].data = onedate2;
  1477. window.chart09.data.datasets[2].data = onedate4;
  1478. window.chart09.data.labels = onedate3;
  1479. window.chart09.update();
  1480. }
  1481. //加载完成,重置刷新时间。
  1482. currentTime01 = refreshTime01;
  1483. });
  1484. }
  1485. //每周产品检验报废率
  1486. function load11() {
  1487. //加载数据
  1488. $.get("rpt.ashx?m=Load91", function (data) {
  1489. //更新图表数据
  1490. var json = JSON.parse(data);
  1491. if (json["success"] == true) {
  1492. let onedate1 = [];
  1493. let onedate2 = [];
  1494. let onedate3 = [];
  1495. var num = (json["rows"].length);
  1496. for (var i = 0; i < num; i++) {
  1497. onedate3.push(json["rows"][i]["缺陷数"]);
  1498. onedate2.push(json["rows"][i]["缺陷占比"]);
  1499. onedate1.push(json["rows"][i]["缺陷名称"]);
  1500. }
  1501. window.chart11.data.datasets[0].data = onedate2;
  1502. window.chart11.data.datasets[1].data = onedate3;
  1503. window.chart11.data.labels = onedate1;
  1504. window.chart11.update();
  1505. }
  1506. //加载完成,重置刷新时间。
  1507. currentTime01 = refreshTime01;
  1508. });
  1509. }
  1510. </script>
  1511. </body>
  1512. </html>