index.html 61 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436
  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/navbar.js"></script>
  19. <!--统计-->
  20. <div class="container-fluid">
  21. <!--页头-->
  22. <div class="row">
  23. <div class="col-4 d-inline-flex align-items-center justify-content-start">
  24. <img src="/Img/dongke_logo_white.png" style="height: 40px;" />
  25. <span class="pl-3" id="报表加载"></span>
  26. </div>
  27. <div class="col-4 d-inline-flex align-items-center justify-content-center">
  28. <h3 class="text-center"><span style="font-weight:600;font-size:36px;">改洗(质量)</span></h3>
  29. </div>
  30. <div class="col-4 d-inline-flex align-items-center justify-content-end">
  31. <span id="当前时间"></span>
  32. <a class="pl-2" href="javascript:void(0)" onclick="fullScreen(); $('#navbar').toggle();">
  33. <img src="/Img/hegii_logo_white.png" style="height: 26px;" />
  34. </a>
  35. </div>
  36. </div>
  37. <!--行1-->
  38. <div class="row pt-0">
  39. <div class="col-12 pt-0">
  40. <div class="p-3 rounded border border-secondary d-flex flex-column" style="height:280px">
  41. <!--每小时合格率-->
  42. <div class="d-flex justify-content-center">
  43. <canvas id="canvasHour" style="-moz-user-select: none;-webkit-user-select: none;-ms-user-select: none; height:260px;width:100%"></canvas>
  44. </div>
  45. </div>
  46. </div>
  47. </div>
  48. <!--行2-->
  49. <div class="row pt-0">
  50. <div class="col-12 pt-0">
  51. <div class="p-3 rounded border border-secondary d-flex flex-column" style="height:280px">
  52. <!--每日合格率-->
  53. <div class="d-flex justify-content-center">
  54. <canvas id="canvasDay" style="-moz-user-select: none;-webkit-user-select: none;-ms-user-select: none; height:260px;width:100%"></canvas>
  55. </div>
  56. </div>
  57. </div>
  58. </div>
  59. <!--行3-->
  60. <div class="row pt-0">
  61. <div class="col-6 pt-0">
  62. <div class="p-3 rounded border border-secondary d-flex flex-row" style="height:280px">
  63. <div style="flex:1 1 auto;align-self:center;text-align:center;width:25%;height:100%; margin:1px;">
  64. <!--改洗累计-->
  65. <div style="padding-top:5px;">改洗累计</div>
  66. <canvas id="piecanvas1" style="-moz-user-select: none;-webkit-user-select: none;-ms-user-select: none; height:220px; width:100%; padding-bottom:5px;"></canvas>
  67. </div>
  68. <div style="flex:1 1 auto;align-self:center;text-align:center;width:25%;height:100%; margin:1px;">
  69. <canvas id="canvasCount1" style="-moz-user-select: none;-webkit-user-select: none;-ms-user-select: none; height:260px;width:100%"></canvas>
  70. </div>
  71. <!--<div style="flex:1 1 auto;align-self:center;text-align:center;width:20%;height:100%;margin:1px;">
  72. <canvas id="canvasCount2" style="-moz-user-select: none;-webkit-user-select: none;-ms-user-select: none; height:260px;width:100%"></canvas>
  73. </div>-->
  74. <div style="flex:1 1 auto;align-self:center;text-align:center;width:25%;height:100%;margin:1px;">
  75. <canvas id="canvasCount3" style="-moz-user-select: none;-webkit-user-select: none;-ms-user-select: none; height:260px;width:100%"></canvas>
  76. </div>
  77. <div style="flex:1 1 auto;align-self:center;text-align:center;width:25%;height:100%;margin:1px;">
  78. <canvas id="canvasCount4" style="-moz-user-select: none;-webkit-user-select: none;-ms-user-select: none; height:260px;width:100%"></canvas>
  79. </div>
  80. </div>
  81. </div>
  82. <div class="col-6 pt-0">
  83. <div class="p-3 rounded border border-secondary d-flex flex-row" style="height:280px">
  84. <div style="flex:1 1 auto;align-self:center;text-align:center;width:20%;height:100%; margin:1px;">
  85. <!--二检累计-->
  86. <div style="padding-top:5px;">二检累计</div>
  87. <canvas id="piecanvas3" style="-moz-user-select: none;-webkit-user-select: none;-ms-user-select: none; height:220px; width:100%; padding-bottom:5px;"></canvas>
  88. </div>
  89. <div style="flex:1 1 auto;align-self:center;text-align:center;width:20%;height:100%; margin:1px;">
  90. <canvas id="canvasCount21" style="-moz-user-select: none;-webkit-user-select: none;-ms-user-select: none; height:260px;width:100%"></canvas>
  91. </div>
  92. <div style="flex:1 1 auto;align-self:center;text-align:center;width:20%;height:100%;margin:1px;">
  93. <canvas id="canvasCount22" style="-moz-user-select: none;-webkit-user-select: none;-ms-user-select: none; height:260px;width:100%"></canvas>
  94. </div>
  95. <div style="flex:1 1 auto;align-self:center;text-align:center;width:20%;height:100%;margin:1px;">
  96. <canvas id="canvasCount23" style="-moz-user-select: none;-webkit-user-select: none;-ms-user-select: none; height:260px;width:100%"></canvas>
  97. </div>
  98. <div style="flex:1 1 auto;align-self:center;text-align:center;width:20%;height:100%;margin:1px;">
  99. <canvas id="canvasCount24" style="-moz-user-select: none;-webkit-user-select: none;-ms-user-select: none; height:260px;width:100%"></canvas>
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. <!--行4-->
  105. <div class="row pt-0">
  106. <div class="col-6 pt-0">
  107. <div class="p-3 rounded border border-secondary d-flex flex-row" style="height:280px">
  108. <div style="flex:1 1 auto;align-self:center;text-align:center;width:20%;height:100%; margin:1px;">
  109. <!--成检累计-->
  110. <div style="padding-top:5px;">成检累计</div>
  111. <canvas id="piecanvas4" style="-moz-user-select: none;-webkit-user-select: none;-ms-user-select: none; height:220px; width:100%; padding-bottom:5px;"></canvas>
  112. </div>
  113. <div style="flex:1 1 auto;align-self:center;text-align:center;width:20%;height:100%; margin:1px;">
  114. <canvas id="canvasCount31" style="-moz-user-select: none;-webkit-user-select: none;-ms-user-select: none; height:260px;width:100%"></canvas>
  115. </div>
  116. <div style="flex:1 1 auto;align-self:center;text-align:center;width:20%;height:100%;margin:1px;">
  117. <canvas id="canvasCount32" style="-moz-user-select: none;-webkit-user-select: none;-ms-user-select: none; height:260px;width:100%"></canvas>
  118. </div>
  119. <div style="flex:1 1 auto;align-self:center;text-align:center;width:20%;height:100%;margin:1px;">
  120. <canvas id="canvasCount33" style="-moz-user-select: none;-webkit-user-select: none;-ms-user-select: none; height:260px;width:100%"></canvas>
  121. </div>
  122. <div style="flex:1 1 auto;align-self:center;text-align:center;width:20%;height:100%;margin:1px;">
  123. <canvas id="canvasCount34" style="-moz-user-select: none;-webkit-user-select: none;-ms-user-select: none; height:260px;width:100%"></canvas>
  124. </div>
  125. </div>
  126. </div>
  127. </div>
  128. </div>
  129. <!--版权信息-->
  130. <!--<script src="../common/footer.js"></script>-->
  131. <script src="/Plugins/bootstrap-4.3.1/js/bootstrap.bundle.min.js"></script>
  132. <script src="/Plugins/bootstrap-table/bootstrap-table.min.js"></script>
  133. <script src="/Plugins/bootstrap-table/bootstrap-table-locale-all.min.js"></script>
  134. <script src="/Plugins/sweetalert/sweetalert.min.js"></script>
  135. <script src="/Plugins/chartjs-2.8.0/chart-2.8.min.js"></script>
  136. <script src="/Plugins/chartjs-2.8.0/chartjs-plugin-datalabels.js"></script>
  137. <script src="/Plugins/chartjs-2.8.0/utils.js"></script>
  138. <script src="/Plugins/circleChart/circleChart.min.js"></script>
  139. <script>
  140. //缺陷统计刷新时间
  141. var refreshTime1 = 60000;
  142. var currentTime1 = 0;
  143. var doGetData;
  144. var doGetTime;
  145. var frameHeight;
  146. var tableHeight;
  147. var offsetHeight = 20;
  148. $(document).ready(function () {
  149. //设置缩放
  150. //xuwell.setScale(1);
  151. //初始化
  152. init();
  153. //首次加载
  154. //loadData();
  155. //定时刷新数据
  156. doGetData = setInterval(function () { timeUpdate(); }, 1000);
  157. //刷新时间
  158. loadServerTime();
  159. doGetTime = setInterval(function () { loadServerTime(); }, 15000);
  160. });
  161. //取服务器时间
  162. function loadServerTime() {
  163. $.get('../api/GetDateTime.ashx', function (data) {
  164. var json = JSON.parse(data);
  165. if (json["success"] == true) {
  166. $('#当前时间').html(json["rows"]["时间"]);
  167. }
  168. });
  169. }
  170. function timeUpdate() {
  171. if (currentTime1 <= 0) {
  172. loadData(function () { currentTime1 = refreshTime1; });
  173. }
  174. else {
  175. if (currentTime1 > 0) {
  176. $('#报表加载').html('刷新:' + currentTime1 / 1000 + ' 秒');
  177. currentTime1 = currentTime1 - 1000;
  178. }
  179. }
  180. }
  181. function loadData(callback) {
  182. //正式数据===========================================================
  183. //加载每小时合格率
  184. $.get("hourCount.ashx", function (data) {
  185. var jsonHourCount = JSON.parse(data);
  186. if (jsonHourCount["success"] == true) {
  187. window.Hour.data.labels = [];
  188. window.Hour.data.datasets[0].data = [];
  189. window.Hour.data.datasets[1].data = [];
  190. window.Hour.data.labels = [];
  191. window.Hour.data.datasets[0].data = [];
  192. window.Hour.data.datasets[1].data = [];
  193. for (var i = 0; i < jsonHourCount["rows"].length; i++) {
  194. window.Hour.data.labels.push(jsonHourCount["rows"][i]["项目"]);
  195. window.Hour.data.datasets[0].data.push(jsonHourCount["rows"][i]["合格目标"]);
  196. window.Hour.data.datasets[1].data.push(jsonHourCount["rows"][i]["合格率"]);
  197. }
  198. window.Hour.update();
  199. }
  200. });
  201. //加载每日合格和报废
  202. $.get("dayCount.ashx", function (data) {
  203. var jsonDayCount = JSON.parse(data);
  204. if (jsonDayCount["success"] == true) {
  205. window.Day.data.labels = [];
  206. window.Day.data.datasets[0].data = [];
  207. window.Day.data.datasets[1].data = [];
  208. window.Day.data.labels = [];
  209. window.Day.data.datasets[0].data = [];
  210. window.Day.data.datasets[1].data = [];
  211. for (var i = 0; i < jsonDayCount["rows"].length; i++) {
  212. window.Day.data.labels.push(jsonDayCount["rows"][i]["项目"]);
  213. window.Day.data.datasets[0].data.push(jsonDayCount["rows"][i]["合格目标"]);
  214. window.Day.data.datasets[1].data.push(jsonDayCount["rows"][i]["合格率"]);
  215. }
  216. window.Day.update();
  217. }
  218. });
  219. //改洗
  220. //var washtotal = $.ajax({ url: "washCount.ashx?m=total", dataType: "json", type: "get" });
  221. //var washdefectname = $.ajax({ url: "washCount.ashx?m=defectname", dataType: "json", type: "get" });
  222. //var washdefectposition = $.ajax({ url: "washCount.ashx?m=defectposition", dataType: "json", type: "get" });
  223. //var washgoodscode = $.ajax({ url: "washCount.ashx?m=goodscode", dataType: "json", type: "get" });
  224. //var washgroutingline = $.ajax({ url: "washCount.ashx?m=groutingline", dataType: "json", type: "get" });
  225. //$.when(washtotal, washdefectname, washdefectposition, washgoodscode, washgroutingline).then(
  226. // function (result1, result2, result3, result4, result5) {
  227. var washtotal = $.ajax({ url: "washCount.ashx?m=total", dataType: "json", type: "get" });
  228. var washreason= $.ajax({ url: "washCount.ashx?m=RREASON", dataType: "json", type: "get" });
  229. var washgoodscode = $.ajax({ url: "washCount.ashx?m=goodscode", dataType: "json", type: "get" });
  230. var washgroutingline = $.ajax({ url: "washCount.ashx?m=groutingline", dataType: "json", type: "get" });
  231. $.when(washtotal, washreason, washgoodscode, washgroutingline).then(
  232. function (result1, result2, result4, result5) {
  233. //改洗饼图
  234. var jsonData1 = result1[0];
  235. if (jsonData1["success"] == true) {
  236. var n1 = jsonData1["rows"][0]["NUM1"];
  237. var n2 = jsonData1["rows"][0]["NUM2"];
  238. var n3 = jsonData1["rows"][0]["NUM3"];
  239. var num1 = jsonData1["rows"][0]["QUALIFIED"];
  240. var num2 = jsonData1["rows"][0]["UNQUALIFIED"];
  241. var num3 = jsonData1["rows"][0]["SCRAP"];
  242. window.pieConfig1.data.labels = ["良品:" + n1, "不良:" + n2, "报废:" + n3];
  243. window.pieConfig1.data.datasets[0].data = [num1, num2, num3];
  244. window.pie1.update();
  245. }
  246. ////加载改洗缺陷统计数据
  247. //var jsonData2 = result2[0];
  248. //if (jsonData2["success"] == true) {
  249. // var labelsArray = [];
  250. // var datalabelsArray = [];
  251. // for (var n = 0; n < jsonData2["rows"].length; n++) {
  252. // labelsArray.push(jsonData2["rows"][n]["DEFECTNAME"]);
  253. // datalabelsArray.push(jsonData2["rows"][n]["DTOTAL"]);
  254. // }
  255. // window.Count1.data.labels = labelsArray;
  256. // window.Count1.data.datasets[0].data = datalabelsArray;
  257. // //window.Count1.data.labels = [jsonData2["rows"][0]["DEFECTNAME"], jsonData2["rows"][1]["DEFECTNAME"], jsonData2["rows"][2]["DEFECTNAME"], jsonData2["rows"][3]["DEFECTNAME"], jsonData2["rows"][4]["DEFECTNAME"]];
  258. // //window.Count1.data.datasets[0].data = [jsonData2["rows"][0]["DTOTAL"], jsonData2["rows"][1]["DTOTAL"], jsonData2["rows"][2]["DTOTAL"], jsonData2["rows"][3]["DTOTAL"], jsonData2["rows"][4]["DTOTAL"]];
  259. // window.Count1.update();
  260. // }
  261. //加载改洗报损原因统计数据
  262. var jsonData2 = result2[0];
  263. if (jsonData2["success"] == true) {
  264. var labelsArray = [];
  265. var datalabelsArray = [];
  266. for (var n = 0; n < jsonData2["rows"].length; n++) {
  267. labelsArray.push(jsonData2["rows"][n]["RREASON"]);
  268. datalabelsArray.push(jsonData2["rows"][n]["DTOTAL"]);
  269. }
  270. window.Count1.data.labels = labelsArray;
  271. window.Count1.data.datasets[0].data = datalabelsArray;
  272. //window.Count1.data.labels = [jsonData2["rows"][0]["DEFECTNAME"], jsonData2["rows"][1]["DEFECTNAME"], jsonData2["rows"][2]["DEFECTNAME"], jsonData2["rows"][3]["DEFECTNAME"], jsonData2["rows"][4]["DEFECTNAME"]];
  273. //window.Count1.data.datasets[0].data = [jsonData2["rows"][0]["DTOTAL"], jsonData2["rows"][1]["DTOTAL"], jsonData2["rows"][2]["DTOTAL"], jsonData2["rows"][3]["DTOTAL"], jsonData2["rows"][4]["DTOTAL"]];
  274. window.Count1.update();
  275. }
  276. ////加载改洗位置累计数据
  277. //var jsonData3 = result3[0];
  278. //if (jsonData3["success"] == true) {
  279. // var labelsArray = [];
  280. // var datalabelsArray = [];
  281. // for (var n = 0; n < jsonData3["rows"].length; n++) {
  282. // labelsArray.push(jsonData3["rows"][n]["DEFECTPOSITIONNAME"]);
  283. // datalabelsArray.push(jsonData3["rows"][n]["PTOTAL"]);
  284. // }
  285. // window.Count2.data.labels = labelsArray;
  286. // window.Count2.data.datasets[0].data = datalabelsArray;
  287. // //window.Count2.data.labels = [jsonData3["rows"][0]["DEFECTPOSITIONNAME"], jsonData3["rows"][1]["DEFECTPOSITIONNAME"], jsonData3["rows"][2]["DEFECTPOSITIONNAME"], jsonData3["rows"][3]["DEFECTPOSITIONNAME"], jsonData3["rows"][4]["DEFECTPOSITIONNAME"]];
  288. // //window.Count2.data.datasets[0].data = [jsonData3["rows"][0]["PTOTAL"], jsonData3["rows"][1]["PTOTAL"], jsonData3["rows"][2]["PTOTAL"], jsonData3["rows"][3]["PTOTAL"], jsonData3["rows"][4]["PTOTAL"]];
  289. // window.Count2.update();
  290. // }
  291. //加载改洗产品累计数据
  292. var jsonData4 = result4[0];
  293. if (jsonData4["success"] == true) {
  294. var labelsArray = [];
  295. var datalabelsArray = [];
  296. for (var n = 0; n < jsonData4["rows"].length; n++) {
  297. labelsArray.push(jsonData4["rows"][n]["GOODSCODE"]);
  298. datalabelsArray.push(jsonData4["rows"][n]["GTOTAL"]);
  299. }
  300. window.Count3.data.labels = labelsArray;
  301. window.Count3.data.datasets[0].data = datalabelsArray;
  302. //window.Count3.data.labels = [jsonData4["rows"][0]["GOODSCODE"], jsonData4["rows"][1]["GOODSCODE"], jsonData4["rows"][2]["GOODSCODE"], jsonData4["rows"][3]["GOODSCODE"], jsonData4["rows"][4]["GOODSCODE"]];
  303. //window.Count3.data.datasets[0].data = [jsonData4["rows"][0]["GTOTAL"], jsonData4["rows"][1]["GTOTAL"], jsonData4["rows"][2]["GTOTAL"], jsonData4["rows"][3]["GTOTAL"], jsonData4["rows"][4]["GTOTAL"]];
  304. window.Count3.update();
  305. }
  306. //加载改洗线号累计数据
  307. var jsonData5 = result5[0];
  308. if (jsonData5["success"] == true) {
  309. var labelsArray = [];
  310. var datalabelsArray = [];
  311. for (var n = 0; n < jsonData5["rows"].length; n++) {
  312. labelsArray.push(jsonData5["rows"][n]["GROUTINGLINENAME"]);
  313. datalabelsArray.push(jsonData5["rows"][n]["LTOTAL"]);
  314. }
  315. window.Count4.data.labels = labelsArray;
  316. window.Count4.data.datasets[0].data = datalabelsArray;
  317. //window.Count4.data.labels = [jsonData5["rows"][0]["GROUTINGLINENAME"], jsonData5["rows"][1]["GROUTINGLINENAME"], jsonData5["rows"][2]["GROUTINGLINENAME"], jsonData5["rows"][3]["GROUTINGLINENAME"]];
  318. //window.Count4.data.datasets[0].data = [jsonData5["rows"][0]["LTOTAL"], jsonData5["rows"][1]["LTOTAL"], jsonData5["rows"][2]["LTOTAL"], jsonData5["rows"][3]["LTOTAL"]];
  319. window.Count4.update();
  320. }
  321. });
  322. //改洗二检
  323. var semi2total = $.ajax({ url: "semi2Count.ashx?m=total", dataType: "json", type: "get" });
  324. var semi2defectname = $.ajax({ url: "semi2Count.ashx?m=defectname", dataType: "json", type: "get" });
  325. var semi2defectposition = $.ajax({ url: "semi2Count.ashx?m=defectposition", dataType: "json", type: "get" });
  326. var semi2goodscode = $.ajax({ url: "semi2Count.ashx?m=goodscode", dataType: "json", type: "get" });
  327. var semi2groutingline = $.ajax({ url: "semi2Count.ashx?m=groutingline", dataType: "json", type: "get" });
  328. $.when(semi2total, semi2defectname, semi2defectposition, semi2goodscode, semi2groutingline).then(
  329. function (result1,result2, result3, result4, result5) {
  330. //改洗二检饼图
  331. var jsonData1 = result1[0];
  332. if (jsonData1["success"] == true) {
  333. var n1 = jsonData1["rows"][0]["NUM1"];
  334. var n2 = jsonData1["rows"][0]["NUM2"];
  335. var num1 = jsonData1["rows"][0]["QUALIFIED"];
  336. var num2 = jsonData1["rows"][0]["UNQUALIFIED"];
  337. //window.pieConfig3.data.labels = ["良品:" + n1, "不良:" + n2];
  338. window.pieConfig3.data.datasets[0].data = [num1, num2];
  339. window.pie3.update();
  340. }
  341. //加载改洗二检缺陷统计数据
  342. var jsonData2 = result2[0];
  343. if (jsonData2["success"] == true) {
  344. var labelsArray = [];
  345. var datalabelsArray = [];
  346. for (var n = 0; n < jsonData2["rows"].length; n++) {
  347. labelsArray.push(jsonData2["rows"][n]["DEFECTNAME"]);
  348. datalabelsArray.push(jsonData2["rows"][n]["DTOTAL"]);
  349. }
  350. window.Count21.data.labels = labelsArray;
  351. window.Count21.data.datasets[0].data = datalabelsArray;
  352. //window.Count1.data.labels = [jsonData2["rows"][0]["DEFECTNAME"], jsonData2["rows"][1]["DEFECTNAME"], jsonData2["rows"][2]["DEFECTNAME"], jsonData2["rows"][3]["DEFECTNAME"], jsonData2["rows"][4]["DEFECTNAME"]];
  353. //window.Count1.data.datasets[0].data = [jsonData2["rows"][0]["DTOTAL"], jsonData2["rows"][1]["DTOTAL"], jsonData2["rows"][2]["DTOTAL"], jsonData2["rows"][3]["DTOTAL"], jsonData2["rows"][4]["DTOTAL"]];
  354. window.Count21.update();
  355. }
  356. //加载改洗二检位置累计数据
  357. var jsonData3 = result3[0];
  358. if (jsonData3["success"] == true) {
  359. var labelsArray = [];
  360. var datalabelsArray = [];
  361. for (var n = 0; n < jsonData3["rows"].length; n++) {
  362. labelsArray.push(jsonData3["rows"][n]["DEFECTPOSITIONNAME"]);
  363. datalabelsArray.push(jsonData3["rows"][n]["PTOTAL"]);
  364. }
  365. window.Count22.data.labels = labelsArray;
  366. window.Count22.data.datasets[0].data = datalabelsArray;
  367. //window.Count2.data.labels = [jsonData3["rows"][0]["DEFECTPOSITIONNAME"], jsonData3["rows"][1]["DEFECTPOSITIONNAME"], jsonData3["rows"][2]["DEFECTPOSITIONNAME"], jsonData3["rows"][3]["DEFECTPOSITIONNAME"], jsonData3["rows"][4]["DEFECTPOSITIONNAME"]];
  368. //window.Count2.data.datasets[0].data = [jsonData3["rows"][0]["PTOTAL"], jsonData3["rows"][1]["PTOTAL"], jsonData3["rows"][2]["PTOTAL"], jsonData3["rows"][3]["PTOTAL"], jsonData3["rows"][4]["PTOTAL"]];
  369. window.Count22.update();
  370. }
  371. //加载改洗二检产品累计数据
  372. var jsonData4 = result4[0];
  373. if (jsonData4["success"] == true) {
  374. var labelsArray = [];
  375. var datalabelsArray = [];
  376. for (var n = 0; n < jsonData4["rows"].length; n++) {
  377. labelsArray.push(jsonData4["rows"][n]["GOODSCODE"]);
  378. datalabelsArray.push(jsonData4["rows"][n]["GTOTAL"]);
  379. }
  380. window.Count23.data.labels = labelsArray;
  381. window.Count23.data.datasets[0].data = datalabelsArray;
  382. //window.Count3.data.labels = [jsonData4["rows"][0]["GOODSCODE"], jsonData4["rows"][1]["GOODSCODE"], jsonData4["rows"][2]["GOODSCODE"], jsonData4["rows"][3]["GOODSCODE"], jsonData4["rows"][4]["GOODSCODE"]];
  383. //window.Count3.data.datasets[0].data = [jsonData4["rows"][0]["GTOTAL"], jsonData4["rows"][1]["GTOTAL"], jsonData4["rows"][2]["GTOTAL"], jsonData4["rows"][3]["GTOTAL"], jsonData4["rows"][4]["GTOTAL"]];
  384. window.Count23.update();
  385. }
  386. //加载改洗二检线号累计数据
  387. var jsonData5 = result5[0];
  388. if (jsonData5["success"] == true) {
  389. var labelsArray = [];
  390. var datalabelsArray = [];
  391. for (var n = 0; n < jsonData5["rows"].length; n++) {
  392. labelsArray.push(jsonData5["rows"][n]["GROUTINGLINENAME"]);
  393. datalabelsArray.push(jsonData5["rows"][n]["LTOTAL"]);
  394. }
  395. window.Count24.data.labels = labelsArray;
  396. window.Count24.data.datasets[0].data = datalabelsArray;
  397. //window.Count4.data.labels = [jsonData5["rows"][0]["GROUTINGLINENAME"], jsonData5["rows"][1]["GROUTINGLINENAME"], jsonData5["rows"][2]["GROUTINGLINENAME"], jsonData5["rows"][3]["GROUTINGLINENAME"]];
  398. //window.Count4.data.datasets[0].data = [jsonData5["rows"][0]["LTOTAL"], jsonData5["rows"][1]["LTOTAL"], jsonData5["rows"][2]["LTOTAL"], jsonData5["rows"][3]["LTOTAL"]];
  399. window.Count24.update();
  400. }
  401. });
  402. //改洗成检
  403. var checktotal = $.ajax({ url: "checkCount.ashx?m=total", dataType: "json", type: "get" });
  404. var checkdefectname = $.ajax({ url: "checkCount.ashx?m=defectname", dataType: "json", type: "get" });
  405. var checkdefectposition = $.ajax({ url: "checkCount.ashx?m=defectposition", dataType: "json", type: "get" });
  406. var checkgoodscode = $.ajax({ url: "checkCount.ashx?m=goodscode", dataType: "json", type: "get" });
  407. var checkgroutingline = $.ajax({ url: "checkCount.ashx?m=groutingline", dataType: "json", type: "get" });
  408. $.when(checktotal, checkdefectname, checkdefectposition, checkgoodscode, checkgroutingline).then(
  409. function (result1,result2, result3, result4, result5) {
  410. //改洗成检饼图
  411. var jsonData1 = result1[0];
  412. if (jsonData1["success"] == true) {
  413. var n1 = jsonData1["rows"][0]["NUM1"];
  414. var n2 = jsonData1["rows"][0]["NUM2"];
  415. var n3 = jsonData1["rows"][0]["NUM3"];
  416. var num1 = jsonData1["rows"][0]["QUALIFIED"];
  417. var num2 = jsonData1["rows"][0]["UNQUALIFIED"];
  418. var num3 = jsonData1["rows"][0]["SCRAP"];
  419. window.pieConfig4.data.labels = ["良品:" + n1, "不良:" + n2, "报废:" + n3];
  420. window.pieConfig4.data.datasets[0].data = [num1, num2, num3];
  421. window.pie4.update();
  422. }
  423. //加载改洗成检缺陷统计数据
  424. var jsonData2 = result2[0];
  425. if (jsonData2["success"] == true) {
  426. var labelsArray = [];
  427. var datalabelsArray = [];
  428. for (var n = 0; n < jsonData2["rows"].length; n++) {
  429. labelsArray.push(jsonData2["rows"][n]["DEFECTNAME"]);
  430. datalabelsArray.push(jsonData2["rows"][n]["DTOTAL"]);
  431. }
  432. window.Count31.data.labels = labelsArray;
  433. window.Count31.data.datasets[0].data = datalabelsArray;
  434. //window.Count1.data.labels = [jsonData2["rows"][0]["DEFECTNAME"], jsonData2["rows"][1]["DEFECTNAME"], jsonData2["rows"][2]["DEFECTNAME"], jsonData2["rows"][3]["DEFECTNAME"], jsonData2["rows"][4]["DEFECTNAME"]];
  435. //window.Count1.data.datasets[0].data = [jsonData2["rows"][0]["DTOTAL"], jsonData2["rows"][1]["DTOTAL"], jsonData2["rows"][2]["DTOTAL"], jsonData2["rows"][3]["DTOTAL"], jsonData2["rows"][4]["DTOTAL"]];
  436. window.Count31.update();
  437. }
  438. //加载改洗成检位置累计数据
  439. var jsonData3 = result3[0];
  440. if (jsonData3["success"] == true) {
  441. var labelsArray = [];
  442. var datalabelsArray = [];
  443. for (var n = 0; n < jsonData3["rows"].length; n++) {
  444. labelsArray.push(jsonData3["rows"][n]["DEFECTPOSITIONNAME"]);
  445. datalabelsArray.push(jsonData3["rows"][n]["PTOTAL"]);
  446. }
  447. window.Count32.data.labels = labelsArray;
  448. window.Count32.data.datasets[0].data = datalabelsArray;
  449. //window.Count2.data.labels = [jsonData3["rows"][0]["DEFECTPOSITIONNAME"], jsonData3["rows"][1]["DEFECTPOSITIONNAME"], jsonData3["rows"][2]["DEFECTPOSITIONNAME"], jsonData3["rows"][3]["DEFECTPOSITIONNAME"], jsonData3["rows"][4]["DEFECTPOSITIONNAME"]];
  450. //window.Count2.data.datasets[0].data = [jsonData3["rows"][0]["PTOTAL"], jsonData3["rows"][1]["PTOTAL"], jsonData3["rows"][2]["PTOTAL"], jsonData3["rows"][3]["PTOTAL"], jsonData3["rows"][4]["PTOTAL"]];
  451. window.Count32.update();
  452. }
  453. //加载改洗成检产品累计数据
  454. var jsonData4 = result4[0];
  455. if (jsonData4["success"] == true) {
  456. var labelsArray = [];
  457. var datalabelsArray = [];
  458. for (var n = 0; n < jsonData4["rows"].length; n++) {
  459. labelsArray.push(jsonData4["rows"][n]["GOODSCODE"]);
  460. datalabelsArray.push(jsonData4["rows"][n]["GTOTAL"]);
  461. }
  462. window.Count33.data.labels = labelsArray;
  463. window.Count33.data.datasets[0].data = datalabelsArray;
  464. //window.Count3.data.labels = [jsonData4["rows"][0]["GOODSCODE"], jsonData4["rows"][1]["GOODSCODE"], jsonData4["rows"][2]["GOODSCODE"], jsonData4["rows"][3]["GOODSCODE"], jsonData4["rows"][4]["GOODSCODE"]];
  465. //window.Count3.data.datasets[0].data = [jsonData4["rows"][0]["GTOTAL"], jsonData4["rows"][1]["GTOTAL"], jsonData4["rows"][2]["GTOTAL"], jsonData4["rows"][3]["GTOTAL"], jsonData4["rows"][4]["GTOTAL"]];
  466. window.Count33.update();
  467. }
  468. //加载改洗成检线号累计数据
  469. var jsonData5 = result5[0];
  470. if (jsonData5["success"] == true) {
  471. var labelsArray = [];
  472. var datalabelsArray = [];
  473. for (var n = 0; n < jsonData5["rows"].length; n++) {
  474. labelsArray.push(jsonData5["rows"][n]["GROUTINGLINENAME"]);
  475. datalabelsArray.push(jsonData5["rows"][n]["LTOTAL"]);
  476. }
  477. window.Count34.data.labels = labelsArray;
  478. window.Count34.data.datasets[0].data = datalabelsArray;
  479. //window.Count4.data.labels = [jsonData5["rows"][0]["GROUTINGLINENAME"], jsonData5["rows"][1]["GROUTINGLINENAME"], jsonData5["rows"][2]["GROUTINGLINENAME"], jsonData5["rows"][3]["GROUTINGLINENAME"]];
  480. //window.Count4.data.datasets[0].data = [jsonData5["rows"][0]["LTOTAL"], jsonData5["rows"][1]["LTOTAL"], jsonData5["rows"][2]["LTOTAL"], jsonData5["rows"][3]["LTOTAL"]];
  481. window.Count34.update();
  482. }
  483. });
  484. //===================================================================
  485. if (typeof callback != 'undefined') callback();
  486. }
  487. function loadTable(id, url, callback) {
  488. }
  489. //日期格式化
  490. function washDate(value, row, index) {
  491. var d = new Date(value);
  492. return d.getFullYear() + '-' + d.getMonth() + '-' + d.getDay();
  493. }
  494. function dateFormat(fmt, date) {
  495. let ret;
  496. const opt = {
  497. "Y+": date.getFullYear().toString(), // 年
  498. "m+": (date.getMonth() + 1).toString(), // 月
  499. "d+": date.getDate().toString(), // 日
  500. "H+": date.getHours().toString(), // 时
  501. "M+": date.getMinutes().toString(), // 分
  502. "S+": date.getSeconds().toString() // 秒
  503. // 有其他格式化字符需求可以继续添加,必须转化成字符串
  504. };
  505. for (let k in opt) {
  506. ret = new RegExp("(" + k + ")").exec(fmt);
  507. if (ret) {
  508. fmt = fmt.replace(ret[1], (ret[1].length == 1) ? (opt[k]) : (opt[k].padStart(ret[1].length, "0")))
  509. };
  510. };
  511. return fmt;
  512. }
  513. </script>
  514. <script>
  515. window.chartColors = {
  516. red: 'rgb(255, 99, 132)',
  517. orange: 'rgb(255, 159, 64)',
  518. yellow: 'rgb(255, 250, 86)',
  519. green: 'rgb(75, 192, 192)',
  520. blue: 'rgb(54, 162, 250)',
  521. purple: 'rgb(153, 102, 255)',
  522. grey: 'rgb(231,233,237)'
  523. };
  524. var color = Chart.helpers.color;
  525. window.randomScalingFactor = function (num) {
  526. return Math.round(Math.random() * num);
  527. }
  528. function init() {
  529. Chart.defaults.global.defaultFontColor = 'white';
  530. Chart.defaults.global.defaultFontSize = 12;
  531. //每小时合格率=========================================
  532. window.configHour = {
  533. data: {
  534. labels: [],
  535. datasets: [{
  536. label: "合格目标",
  537. backgroundColor: color(window.chartColors.red).alpha(0.6).rgbString(),
  538. borderColor: window.chartColors.red,
  539. borderWidth: 2,
  540. pointRadius: 12,
  541. data: [],
  542. fill: false,
  543. }, {
  544. label: "合格率",
  545. fill: false,
  546. backgroundColor: color(window.chartColors.blue).alpha(0.6).rgbString(),
  547. borderColor: window.chartColors.blue,
  548. borderWidth: 2,
  549. pointRadius: 12,
  550. data: []
  551. }]
  552. },
  553. type: 'line',
  554. options: {
  555. responsive: true,
  556. title: {
  557. display: true,
  558. text: '每小时合格率(注浆)'
  559. },
  560. tooltips: {
  561. mode: 'index',
  562. intersect: false,
  563. },
  564. hover: {
  565. mode: 'nearest',
  566. intersect: true
  567. },
  568. scales: {
  569. xAxes: [{
  570. display: true,
  571. scaleLabel: {
  572. display: false,
  573. labelString: ''
  574. }
  575. }],
  576. yAxes: [{
  577. display: true,
  578. scaleLabel: {
  579. display: false,
  580. labelString: 'Value'
  581. }
  582. }]
  583. }
  584. }
  585. };
  586. var ctxHour = document.getElementById("canvasHour").getContext("2d");
  587. window.Hour = new Chart(ctxHour, configHour);
  588. //====================================================
  589. //每日计合格率=======================================
  590. window.configDay = {
  591. data: {
  592. labels: [],
  593. datasets: [{
  594. label: "合格目标",
  595. backgroundColor: color(window.chartColors.red).alpha(0.6).rgbString(),
  596. borderColor: window.chartColors.red,
  597. borderWidth: 2,
  598. pointRadius: 12,
  599. data: [],
  600. fill: false,
  601. }, {
  602. label: "合格率",
  603. fill: false,
  604. backgroundColor: color(window.chartColors.blue).alpha(0.6).rgbString(),
  605. borderColor: window.chartColors.blue,
  606. borderWidth: 2,
  607. pointRadius: 12,
  608. data: []
  609. }]
  610. },
  611. type: 'line',
  612. options: {
  613. responsive: true,
  614. title: {
  615. display: true,
  616. text: '每日合格率(注浆)'
  617. },
  618. tooltips: {
  619. mode: 'index',
  620. intersect: false,
  621. },
  622. hover: {
  623. mode: 'nearest',
  624. intersect: true
  625. },
  626. scales: {
  627. xAxes: [{
  628. display: true,
  629. scaleLabel: {
  630. display: false,
  631. labelString: ''
  632. }
  633. }],
  634. yAxes: [{
  635. display: true,
  636. scaleLabel: {
  637. display: false,
  638. labelString: 'Value'
  639. }
  640. }]
  641. }
  642. }
  643. };
  644. var ctxDay = document.getElementById("canvasDay").getContext("2d");
  645. window.Day = new Chart(ctxDay, configDay);
  646. //===================================================
  647. //饼图
  648. window.pieConfig1 = {
  649. data: {
  650. datasets: [{
  651. data: [
  652. 0,
  653. 0,
  654. 0
  655. ],
  656. backgroundColor: [
  657. color(window.chartColors.blue).alpha(0.6).rgbString(),
  658. color(window.chartColors.yellow).alpha(0.6).rgbString(),
  659. color(window.chartColors.red).alpha(0.6).rgbString()
  660. ],
  661. borderColor: [
  662. window.chartColors.blue,
  663. window.chartColors.yellow,
  664. window.chartColors.red
  665. ],
  666. borderWidth: 1,
  667. label: '数据1'
  668. }],
  669. labels: [
  670. "良品",
  671. "不良",
  672. "报废"
  673. ]
  674. },
  675. type: 'pie',
  676. options: {
  677. responsive: true,
  678. legend: {
  679. position: 'top'
  680. }
  681. }
  682. };
  683. var ctxPie1 = document.getElementById("piecanvas1").getContext("2d");
  684. window.pie1 = new Chart(ctxPie1, pieConfig1);
  685. window.pieConfig3 = {
  686. data: {
  687. datasets: [{
  688. data: [
  689. 0,
  690. 0
  691. ],
  692. backgroundColor: [
  693. color(window.chartColors.blue).alpha(0.6).rgbString(),
  694. color(window.chartColors.yellow).alpha(0.6).rgbString()
  695. ],
  696. borderColor: [
  697. window.chartColors.blue,
  698. window.chartColors.yellow
  699. ],
  700. borderWidth: 1,
  701. label: '数据1'
  702. }],
  703. labels: [
  704. "良品",
  705. "不良"
  706. ]
  707. },
  708. type: 'pie',
  709. options: {
  710. responsive: true,
  711. legend: {
  712. position: 'top'
  713. }
  714. }
  715. };
  716. var ctxPie3 = document.getElementById("piecanvas3").getContext("2d");
  717. window.pie3 = new Chart(ctxPie3, pieConfig3);
  718. window.pieConfig4 = {
  719. data: {
  720. datasets: [{
  721. data: [
  722. 0,
  723. 0,
  724. 0
  725. ],
  726. backgroundColor: [
  727. color(window.chartColors.blue).alpha(0.6).rgbString(),
  728. color(window.chartColors.yellow).alpha(0.6).rgbString(),
  729. color(window.chartColors.red).alpha(0.6).rgbString()
  730. ],
  731. borderColor: [
  732. window.chartColors.blue,
  733. window.chartColors.yellow,
  734. window.chartColors.red
  735. ],
  736. borderWidth: 1,
  737. label: '数据1'
  738. }],
  739. labels: [
  740. "良品",
  741. "不良",
  742. "报废"
  743. ]
  744. },
  745. type: 'pie',
  746. options: {
  747. responsive: true,
  748. legend: {
  749. position: 'top'
  750. }
  751. }
  752. };
  753. var ctxPie4 = document.getElementById("piecanvas4").getContext("2d");
  754. window.pie4 = new Chart(ctxPie4, pieConfig4);
  755. };
  756. window.configCount1 = {
  757. data: {
  758. labels: [],
  759. datasets: [{
  760. label: '',
  761. backgroundColor: color(window.chartColors.blue).alpha(0.5).rgbString(),
  762. fill: false,
  763. borderColor: window.chartColors.blue,
  764. borderWidth: 2,
  765. pointRadius: 12,
  766. data: []
  767. }]
  768. },
  769. type: 'horizontalBar',
  770. options: {
  771. legend: {
  772. display: false
  773. },
  774. title: {
  775. display: true,
  776. text: "报损原因累计"
  777. },
  778. tooltips: {
  779. mode: 'point',
  780. intersect: false
  781. },
  782. responsive: true,
  783. scales: {
  784. xAxes: [{
  785. stacked: false
  786. }],
  787. yAxes: [{
  788. display: true,
  789. stacked: false,
  790. ticks: {
  791. min: 0,
  792. //stepSize: 20,
  793. //max: 20
  794. }
  795. }]
  796. }
  797. }
  798. };
  799. var ctxCount1 = document.getElementById("canvasCount1").getContext("2d");
  800. window.Count1 = new Chart(ctxCount1, configCount1);
  801. //window.configCount2 = {
  802. // data: {
  803. // labels: [],
  804. // datasets: [{
  805. // label: '',
  806. // backgroundColor: color(window.chartColors.blue).alpha(0.5).rgbString(),
  807. // fill: false,
  808. // borderColor: window.chartColors.blue,
  809. // borderWidth: 2,
  810. // pointRadius: 12,
  811. // data: []
  812. // }]
  813. // },
  814. // type: 'horizontalBar',
  815. // options: {
  816. // legend: {
  817. // display: false
  818. // },
  819. // title: {
  820. // display: true,
  821. // text: "改洗位置累计"
  822. // },
  823. // tooltips: {
  824. // mode: 'point',
  825. // intersect: false
  826. // },
  827. // responsive: true,
  828. // scales: {
  829. // xAxes: [{
  830. // stacked: false
  831. // }],
  832. // yAxes: [{
  833. // display: true,
  834. // stacked: false,
  835. // ticks: {
  836. // min: 0,
  837. // //stepSize: 20,
  838. // //max: 20
  839. // }
  840. // }]
  841. // }
  842. // }
  843. //};
  844. //var ctxCount2 = document.getElementById("canvasCount2").getContext("2d");
  845. //window.Count2 = new Chart(ctxCount2, configCount2);
  846. window.configCount3 = {
  847. data: {
  848. labels: [],
  849. datasets: [{
  850. label: '',
  851. backgroundColor: color(window.chartColors.blue).alpha(0.5).rgbString(),
  852. fill: false,
  853. borderColor: window.chartColors.blue,
  854. borderWidth: 2,
  855. pointRadius: 12,
  856. data: []
  857. }]
  858. },
  859. type: 'horizontalBar',
  860. options: {
  861. legend: {
  862. display: false
  863. },
  864. title: {
  865. display: true,
  866. text: "报损产品累计"
  867. },
  868. tooltips: {
  869. mode: 'point',
  870. intersect: false
  871. },
  872. responsive: true,
  873. scales: {
  874. xAxes: [{
  875. stacked: false
  876. }],
  877. yAxes: [{
  878. display: true,
  879. stacked: false,
  880. ticks: {
  881. min: 0,
  882. //stepSize: 20,
  883. //max: 20
  884. }
  885. }]
  886. }
  887. }
  888. };
  889. var ctxCount3 = document.getElementById("canvasCount3").getContext("2d");
  890. window.Count3 = new Chart(ctxCount3, configCount3);
  891. window.configCount4 = {
  892. data: {
  893. labels: [],
  894. datasets: [{
  895. label: '',
  896. backgroundColor: color(window.chartColors.blue).alpha(0.5).rgbString(),
  897. fill: false,
  898. borderColor: window.chartColors.blue,
  899. borderWidth: 2,
  900. pointRadius: 12,
  901. data: []
  902. }]
  903. },
  904. type: 'horizontalBar',
  905. options: {
  906. legend: {
  907. display: false
  908. },
  909. title: {
  910. display: true,
  911. text: "报损成型线号累计"
  912. },
  913. tooltips: {
  914. mode: 'point',
  915. intersect: false
  916. },
  917. responsive: true,
  918. scales: {
  919. xAxes: [{
  920. stacked: false
  921. }],
  922. yAxes: [{
  923. display: true,
  924. stacked: false,
  925. ticks: {
  926. min: 0,
  927. //stepSize: 20,
  928. //max: 20
  929. }
  930. }]
  931. }
  932. }
  933. };
  934. var ctxCount4 = document.getElementById("canvasCount4").getContext("2d");
  935. window.Count4 = new Chart(ctxCount4, configCount4);
  936. window.configCount21 = {
  937. data: {
  938. labels: [],
  939. datasets: [{
  940. label: '',
  941. backgroundColor: color(window.chartColors.blue).alpha(0.5).rgbString(),
  942. fill: false,
  943. borderColor: window.chartColors.blue,
  944. borderWidth: 2,
  945. pointRadius: 12,
  946. data: []
  947. }]
  948. },
  949. type: 'horizontalBar',
  950. options: {
  951. legend: {
  952. display: false
  953. },
  954. title: {
  955. display: true,
  956. text: "改洗缺陷累计"
  957. },
  958. tooltips: {
  959. mode: 'point',
  960. intersect: false
  961. },
  962. responsive: true,
  963. scales: {
  964. xAxes: [{
  965. stacked: false
  966. }],
  967. yAxes: [{
  968. display: true,
  969. stacked: false,
  970. ticks: {
  971. min: 0,
  972. //stepSize: 20,
  973. //max: 20
  974. }
  975. }]
  976. }
  977. }
  978. };
  979. var ctxCount21 = document.getElementById("canvasCount21").getContext("2d");
  980. window.Count21 = new Chart(ctxCount21, configCount21);
  981. window.configCount22 = {
  982. data: {
  983. labels: [],
  984. datasets: [{
  985. label: '',
  986. backgroundColor: color(window.chartColors.blue).alpha(0.5).rgbString(),
  987. fill: false,
  988. borderColor: window.chartColors.blue,
  989. borderWidth: 2,
  990. pointRadius: 12,
  991. data: []
  992. }]
  993. },
  994. type: 'horizontalBar',
  995. options: {
  996. legend: {
  997. display: false
  998. },
  999. title: {
  1000. display: true,
  1001. text: "改洗位置累计"
  1002. },
  1003. tooltips: {
  1004. mode: 'point',
  1005. intersect: false
  1006. },
  1007. responsive: true,
  1008. scales: {
  1009. xAxes: [{
  1010. stacked: false
  1011. }],
  1012. yAxes: [{
  1013. display: true,
  1014. stacked: false,
  1015. ticks: {
  1016. min: 0,
  1017. //stepSize: 20,
  1018. //max: 20
  1019. }
  1020. }]
  1021. }
  1022. }
  1023. };
  1024. var ctxCount22 = document.getElementById("canvasCount22").getContext("2d");
  1025. window.Count22 = new Chart(ctxCount22, configCount22);
  1026. window.configCount23 = {
  1027. data: {
  1028. labels: [],
  1029. datasets: [{
  1030. label: '',
  1031. backgroundColor: color(window.chartColors.blue).alpha(0.5).rgbString(),
  1032. fill: false,
  1033. borderColor: window.chartColors.blue,
  1034. borderWidth: 2,
  1035. pointRadius: 12,
  1036. data: []
  1037. }]
  1038. },
  1039. type: 'horizontalBar',
  1040. options: {
  1041. legend: {
  1042. display: false
  1043. },
  1044. title: {
  1045. display: true,
  1046. text: "改洗产品累计"
  1047. },
  1048. tooltips: {
  1049. mode: 'point',
  1050. intersect: false
  1051. },
  1052. responsive: true,
  1053. scales: {
  1054. xAxes: [{
  1055. stacked: false
  1056. }],
  1057. yAxes: [{
  1058. display: true,
  1059. stacked: false,
  1060. ticks: {
  1061. min: 0,
  1062. //stepSize: 20,
  1063. //max: 20
  1064. }
  1065. }]
  1066. }
  1067. }
  1068. };
  1069. var ctxCount23 = document.getElementById("canvasCount23").getContext("2d");
  1070. window.Count23 = new Chart(ctxCount23, configCount23);
  1071. window.configCount24 = {
  1072. data: {
  1073. labels: [],
  1074. datasets: [{
  1075. label: '',
  1076. backgroundColor: color(window.chartColors.blue).alpha(0.5).rgbString(),
  1077. fill: false,
  1078. borderColor: window.chartColors.blue,
  1079. borderWidth: 2,
  1080. pointRadius: 12,
  1081. data: []
  1082. }]
  1083. },
  1084. type: 'horizontalBar',
  1085. options: {
  1086. legend: {
  1087. display: false
  1088. },
  1089. title: {
  1090. display: true,
  1091. text: "改洗成型线号累计"
  1092. },
  1093. tooltips: {
  1094. mode: 'point',
  1095. intersect: false
  1096. },
  1097. responsive: true,
  1098. scales: {
  1099. xAxes: [{
  1100. stacked: false
  1101. }],
  1102. yAxes: [{
  1103. display: true,
  1104. stacked: false,
  1105. ticks: {
  1106. min: 0,
  1107. //stepSize: 20,
  1108. //max: 20
  1109. }
  1110. }]
  1111. }
  1112. }
  1113. };
  1114. var ctxCount24 = document.getElementById("canvasCount24").getContext("2d");
  1115. window.Count24 = new Chart(ctxCount24, configCount24);
  1116. window.configCount31 = {
  1117. data: {
  1118. labels: [],
  1119. datasets: [{
  1120. label: '',
  1121. backgroundColor: color(window.chartColors.blue).alpha(0.5).rgbString(),
  1122. fill: false,
  1123. borderColor: window.chartColors.blue,
  1124. borderWidth: 2,
  1125. pointRadius: 12,
  1126. data: []
  1127. }]
  1128. },
  1129. type: 'horizontalBar',
  1130. options: {
  1131. legend: {
  1132. display: false
  1133. },
  1134. title: {
  1135. display: true,
  1136. text: "改洗缺陷累计"
  1137. },
  1138. tooltips: {
  1139. mode: 'point',
  1140. intersect: false
  1141. },
  1142. responsive: true,
  1143. scales: {
  1144. xAxes: [{
  1145. stacked: false
  1146. }],
  1147. yAxes: [{
  1148. display: true,
  1149. stacked: false,
  1150. ticks: {
  1151. min: 0,
  1152. //stepSize: 20,
  1153. //max: 20
  1154. }
  1155. }]
  1156. }
  1157. }
  1158. };
  1159. var ctxCount31 = document.getElementById("canvasCount31").getContext("2d");
  1160. window.Count31 = new Chart(ctxCount31, configCount31);
  1161. window.configCount32 = {
  1162. data: {
  1163. labels: [],
  1164. datasets: [{
  1165. label: '',
  1166. backgroundColor: color(window.chartColors.blue).alpha(0.5).rgbString(),
  1167. fill: false,
  1168. borderColor: window.chartColors.blue,
  1169. borderWidth: 2,
  1170. pointRadius: 12,
  1171. data: []
  1172. }]
  1173. },
  1174. type: 'horizontalBar',
  1175. options: {
  1176. legend: {
  1177. display: false
  1178. },
  1179. title: {
  1180. display: true,
  1181. text: "改洗位置累计"
  1182. },
  1183. tooltips: {
  1184. mode: 'point',
  1185. intersect: false
  1186. },
  1187. responsive: true,
  1188. scales: {
  1189. xAxes: [{
  1190. stacked: false
  1191. }],
  1192. yAxes: [{
  1193. display: true,
  1194. stacked: false,
  1195. ticks: {
  1196. min: 0,
  1197. //stepSize: 20,
  1198. //max: 20
  1199. }
  1200. }]
  1201. }
  1202. }
  1203. };
  1204. var ctxCount32 = document.getElementById("canvasCount32").getContext("2d");
  1205. window.Count32 = new Chart(ctxCount32, configCount32);
  1206. window.configCount33 = {
  1207. data: {
  1208. labels: [],
  1209. datasets: [{
  1210. label: '',
  1211. backgroundColor: color(window.chartColors.blue).alpha(0.5).rgbString(),
  1212. fill: false,
  1213. borderColor: window.chartColors.blue,
  1214. borderWidth: 2,
  1215. pointRadius: 12,
  1216. data: []
  1217. }]
  1218. },
  1219. type: 'horizontalBar',
  1220. options: {
  1221. legend: {
  1222. display: false
  1223. },
  1224. title: {
  1225. display: true,
  1226. text: "改洗产品累计"
  1227. },
  1228. tooltips: {
  1229. mode: 'point',
  1230. intersect: false
  1231. },
  1232. responsive: true,
  1233. scales: {
  1234. xAxes: [{
  1235. stacked: false
  1236. }],
  1237. yAxes: [{
  1238. display: true,
  1239. stacked: false,
  1240. ticks: {
  1241. min: 0,
  1242. //stepSize: 20,
  1243. //max: 20
  1244. }
  1245. }]
  1246. }
  1247. }
  1248. };
  1249. var ctxCount33 = document.getElementById("canvasCount33").getContext("2d");
  1250. window.Count33 = new Chart(ctxCount33, configCount33);
  1251. window.configCount34 = {
  1252. data: {
  1253. labels: [],
  1254. datasets: [{
  1255. label: '',
  1256. backgroundColor: color(window.chartColors.blue).alpha(0.5).rgbString(),
  1257. fill: false,
  1258. borderColor: window.chartColors.blue,
  1259. borderWidth: 2,
  1260. pointRadius: 12,
  1261. data: []
  1262. }]
  1263. },
  1264. type: 'horizontalBar',
  1265. options: {
  1266. legend: {
  1267. display: false
  1268. },
  1269. title: {
  1270. display: true,
  1271. text: "改洗成型线号累计"
  1272. },
  1273. tooltips: {
  1274. mode: 'point',
  1275. intersect: false
  1276. },
  1277. responsive: true,
  1278. scales: {
  1279. xAxes: [{
  1280. stacked: false
  1281. }],
  1282. yAxes: [{
  1283. display: true,
  1284. stacked: false,
  1285. ticks: {
  1286. min: 0,
  1287. //stepSize: 20,
  1288. //max: 20
  1289. }
  1290. }]
  1291. }
  1292. }
  1293. };
  1294. var ctxCount34 = document.getElementById("canvasCount34").getContext("2d");
  1295. window.Count34 = new Chart(ctxCount34, configCount34);
  1296. </script>
  1297. </body>
  1298. </html>