| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553 |
- <!doctype html>
- <html lang="en" data-bs-theme="auto">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width">
- <link rel="icon" href="/app/images/dongke-logo.png">
- <link href="/plugins/bootstrap/bootstrap.min.css" rel="stylesheet">
- <title>东科软件</title>
- <style>
- body {
- background-color: black;
- }
- .col {
- width: 1280px;
- height: 660px;
- }
- .bigtitle {
- height: 137px;
- background-repeat: no-repeat;
- background-position: center;
- background-image: url(/Img/title9in1.png);
- }
- .boardone {
- background-repeat: no-repeat;
- background-position: center;
- background-image: url(/Img/bg9in1.png);
- }
- .boardone .title {
- padding-top: 50px;
- color: white;
- font-size: 40px;
- font-weight: 600;
- }
- .boardone .chart {
- margin-left: 150px;
- margin-top: 10px;
- width: 980px;
- height: 450px;
- font-size: 6px;
- outline-width: 10px;
- }
- .doughnut {
- width: 600px !important;
- height: 800px !important;
- }
- table, tr, td {
- border: 1px solid #84C1FF;
- font-size: 30px;
- color: #D0D0D0;
- white-space: nowrap;
- /*line-height: 200%;*/
- }
- .tableheader {
- font-weight: 800;
- background-color: #0f58a2;
- }
- .pinguan {
- margin-left: 10px;
- margin-top: 10px;
- width: 1230px;
- height: 450px;
- font-size: 5px;
- }
- </style>
- </head>
- <body class="m-0 p-0 border-0">
- <div class="m-1">
- <div class="row pb-4" style="width:100%;">
- <div class="col bigtitle"></div>
- </div>
- <div class="row row-cols-3 text-center g-2">
- <div class="col mx-1 boardone">
- <div class="title">
- 新品入仓
- </div>
- <div class="chart">
- <canvas id="canvas04" height="145"></canvas>
- </div>
- </div>
- <div class="col mx-1 boardone">
- <div class="title">
- 每周产品半检检验报废率TOP5
- </div>
- <div class="chart">
- <canvas id="canvas10" height="135"></canvas>
- </div>
- </div>
- <div class="col mx-1 boardone">
- <div class="title pb-2">
- 每周产品成检检验报废率TOP5
- </div>
- <div class="chart">
- <canvas id="canvas06" height="145"></canvas>
- </div>
- </div>
- <div class="col mx-1 boardone">
- <div class="title">
- 每周各车间半检TOP3
- </div>
- <div class="doughnut">
- <canvas id="canvas031" style="margin-left:-50px; margin-top:120px;"></canvas>
- <label style="font-size: 30px; color: white; margin-left: 100px; width:1070px">
- 一车间
-
- 二车间
-
- 三车间
- </label>
- <canvas id="canvas032" style="margin-left:340px; margin-top:-450px"></canvas>
- <canvas id="canvas033" style="margin-left:720px; margin-top:-200px"></canvas>
- </div>
- </div>
- <div class="col mx-1 boardone">
- <div class="title">
- 每周各车间产质量
- </div>
- <div class="chart">
- <canvas id="canvas01" height="145"></canvas>
- </div>
- </div>
- <div class="col mx-1 boardone">
- <div class="title">
- 每周各车间成检TOP3
- </div>
- <div class="doughnut">
- <canvas id="canvas021" style="margin-left:-60px; margin-top:150px;"></canvas>
- <label style="font-size: 30px; color: white; margin-left: 80px; width:1070px">
- 一车间
-
- <span style="font-size: 30px; color: white; margin-top: -950px"> 二车间 </span>
-
- 三车间
- </label>
- <canvas id="canvas022" style="margin-left:340px; margin-top:-500px"></canvas>
- <canvas id="canvas023" style="margin-left: 700px; margin-top: -140px "></canvas>
- </div>
- </div>
- <div class="col mx-1 boardone">
- <div class="title">
- 品管抽检缺陷率
- </div>
- <div class="pinguan" height="100" style="width: 92%; margin-left: 40px ;margin-top:-15px">
- <canvas id="canvas11" height="130"></canvas>
- </div>
- </div>
- <div class="col mx-1 boardone">
- <div class="title">
- 品管抽检数据展示
- </div>
- <div class="pinguan" height="100" style="width: 92%; margin-left: 40px ;margin-top:-15px">
- <canvas id="canvas09" height="130"></canvas>
- </div>
- </div>
- <div class="col mx-1 boardone">
- <div class="title pb-2">
- 各车间缺陷周环比
- </div>
- <div class="chart" style=" margin-left:60px">
- <table width="118%" class="table-striped">
- <tr class="各车间缺陷周环比">
- <td style="width:160px;">产品类别</td>
- <td style="width:160px;">缺陷名称</td>
- <td style="width:160px;">缺陷数</td>
- <td style="width:180px;">缺陷占比 </td>
- <td style="width:180px;">上周比</td>
- <td>对比趋势</td>
- </tr>
- </table>
- <div>
- <div>
- <table id="dayTable_template" style="display:none;">
- <tr>
- <td style="width:160px;">{产品类别}</td>
- <td style="width:160px;">{缺陷名称}</td>
- <td style="width:160px;">{缺陷数}</td>
- <td style="width:180px;">{缺陷占比}</td>
- <td style="width:180px;">{上周比}</td>
- <td>{对比趋势}</td>
- </tr>
- </table>
- </div>
- <table id="tableheader" class="tablefix" style="width: 118%;">
- </table>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script src="/plugins/bootstrap/bootstrap.bundle.min.js"></script>
- <script src="/plugins/jquery-3.4.1/jquery-3.4.1.min.js"></script>
- <script src="/Plugins/chartjs-2.8.0/chart-2.8.min.js"></script>
- <script src="/Plugins/chartjs-2.8.0/chartjs-plugin-datalabels.js"></script>
- <script src="/Plugins/chartjs-2.8.0/utils.js"></script>
- <script src="/main/Common/xuwell.js"></script>
- <script>
- //定义color
- var color = Chart.helpers.color;
- //每周各车间产质量
- var refreshTime01 = 30;
- var currentTime01 = 10;
- //半检大小件TOP3缺陷占比
- var refreshTime02 = 60;
- var currentTime02 = 10;
- //成检大小件TOP3缺陷占比
- var refreshTime03 = 120;
- var currentTime03 = 10;
- //每周各车间成型产量湿收率
- var refreshTime04 = 180;
- var currentTime04 = 10;
- //各车间缺陷周环比
- var refreshTime05 = 240;
- var currentTime05 = 10;
- //每周干补率及冷补率
- var refreshTime06 = 300;
- var currentTime06 = 10;
- //每周大小件大工序产量
- var refreshTime07 = 360;
- var currentTime07 = 10;
- //模具库存周转率,产品SKU周转率
- var refreshTime08 = 420;
- var currentTime08 = 10;
- //品管抽检数据展示
- var refreshTime09 = 480;
- var currentTime09 = 10;
- var mainInterval;
- var mainRowCount = 0;
- //刷新时间
- function doTimer() {
- if (currentTime01 == 0) load01();
- if (currentTime01 >= 0) $("#currentTime01").text(currentTime01);
- currentTime01--;
- if (currentTime02 == 0) load02();
- if (currentTime02 >= 0) $("#currentTime02").text(currentTime02);
- currentTime02--;
- if (currentTime03 == 0) load03();
- if (currentTime03 >= 0) $("#currentTime03").text(currentTime03);
- currentTime03--;
- if (currentTime04 == 0) load04();
- if (currentTime04 >= 0) $("#currentTime04").text(currentTime04);
- currentTime04--;
- if (currentTime05 == 0) load05();
- if (currentTime05 >= 0) $("#currentTime05").text(currentTime05);
- currentTime05--;
- if (currentTime06 == 0) load06();
- if (currentTime06 >= 0) $("#currentTime06").text(currentTime06);
- currentTime06--;
- if (currentTime07 == 0) load07();
- if (currentTime07 >= 0) $("#currentTime07").text(currentTime07);
- currentTime07--;
- if (currentTime08 == 0) load08();
- if (currentTime08 >= 0) $("#currentTime08").text(currentTime08);
- currentTime08--;
- if (currentTime09 == 0) load09();
- if (currentTime09 >= 0) $("#currentTime09").text(currentTime09);
- currentTime09--;
- }
- //页面初期
- $(document).ready(function () {
- initAll();
- //设置缩放
- xuwell.setScale(0.391);
- loadAll();
- });
- function mainScroll() {
- var scrollHeight = $("#tableheader").find("tr").outerHeight();
- $("#tableheader").animate({ marginTop: -scrollHeight, }, 500,
- function () {
- $(this).css({ marginTop: "0px", }).find("tr:first").appendTo(this);
- if (--mainRowCount == -1) load05();
- }
- );
- }
- //初期加载画面样式
- function initAll() {
- window.chartColors = {
- red: 'rgb(255, 99, 132)',
- orange: 'rgb(255, 159, 64)',
- yellow: 'rgb(255, 250, 86)',
- green: 'rgb(75, 192, 192)',
- blue: 'rgb(54, 162, 250)',
- purple: 'rgb(153, 102, 255)',
- grey: 'rgb(231,233,237)',
- MediumVioletRed: 'rgb(199,21,133)',
- DarkViolet: 'rgb(148,0,211)',
- Magenta1: 'rgb(255,0,255)'
- };
- window.randomScalingFactor = function (num) {
- return Math.round(Math.random() * num);
- }
- Chart.defaults.global.defaultFontColor = 'white';
- Chart.defaults.global.defaultFontSize = 30;
- //调用数据加载
- init01(); init021(); init022(); init023(); init031(); init032(); init033(); init04(); init05(); init06(); init08(); init09(); init11();
- }
- //每周各车间产质量
- function init01() {
- window.config01 = {
- data: {
- labels: ["一车间", "二车间", "三车间"],
- barWidth: 10,
- datasets: [{
- type: 'line',
- label: "综合质量",
- yAxesGroup: 'A',
- yAxisID: 'A',
- backgroundColor: color(window.chartColors.orange).alpha(0.5).rgbString(),
- borderColor: window.chartColors.orange,
- borderWidth: 2,
- pointRadius: 10,
- fill: false
- }, {
- type: 'line',
- label: "本烧质量",
- yAxesGroup: 'A',
- yAxisID: 'A',
- backgroundColor: color(window.chartColors.green).alpha(0.5).rgbString(),
- borderColor: window.chartColors.green,
- borderWidth: 2,
- pointRadius: 10,
- fill: false
- }, {
- label: '本烧产量',
- yAxesGroup: 'B',
- yAxisID: 'B',
- backgroundColor: color(window.chartColors.blue).alpha(0.7).rgbString(),
- borderColor: window.chartColors.blue,
- barWidth: 1,
- fill: true
- }]
- },
- type: 'bar',
- barWidth: 10,
- options: {
- legend: {
- display: true
- },
- title: {
- display: false,
- text: '每周各车间产质量'
- },
- tooltips: {
- mode: 'index',
- intersect: false,
- },
- hover: {
- mode: 'nearest',
- intersect: true
- },
- responsive: true,
- scales: {
- xAxes: [{
- scaleLabel: {
- stacked: false,
- },
- barThickness: 90
- }],
- yAxes: [{
- display: true,
- id: 'B',
- name: 'B',
- barWidth: 10,
- barThickness: 10,
- position: 'left',
- scaleLabel: {
- display: false,
- labelString: 'Value'
- },
- ticks: {
- min: 0,
- stepSize: 10000,
- max: 40000
- }
- }
- , {
- display: true,
- id: 'A',
- name: 'A',
- scalePositionLeft: false,
- position: 'right',
- scaleLabel: {
- display: false,
- labelString: 'Value2',
- barWidth: 5,
- },
- ticks: {
- min: 80,
- stepSize: 5,
- max: 100
- }
- }]
- }
- }
- };
- var ctx01 = document.getElementById("canvas01").getContext("2d");
- window.chart01 = new Chart(ctx01, config01);
- }
- //成检一车间TOP3缺陷占比
- function init021() {
- window.config021 = {
- data: {
- labels: [],
- datasets: [{
- label: '缺陷',
- backgroundColor: [
- Chart.helpers.color(window.chartColors.red).rgbString(),
- Chart.helpers.color(window.chartColors.orange).rgbString(),
- Chart.helpers.color(window.chartColors.yellow).rgbString()
- ],
- fill: false,
- borderColor: [
- window.chartColors.red,
- window.chartColors.orange,
- window.chartColors.yellow
- ],
- borderWidth: 4,
- pointRadius: 30,
- data: []
- }]
- },
- type: 'doughnut',
- options: {
- legend: {
- display: true
- },
- textstyle: {
- fontsize: 2
- },
- title: {
- display: false,
- text: "缺陷",
- },
- tooltips: {
- mode: 'point',
- intersect: false
- },
- responsive: true
- }
- };
- var ctx021 = document.getElementById("canvas021").getContext("2d");
- window.chart021 = new Chart(ctx021, config021);
- }
- //成检二车间TOP3缺陷占比
- function init022() {
- window.config022 = {
- data: {
- labels: [],
- datasets: [{
- label: '缺陷',
- backgroundColor: [
- Chart.helpers.color(window.chartColors.green).rgbString(),
- Chart.helpers.color(window.chartColors.blue).rgbString(),
- Chart.helpers.color(window.chartColors.purple).rgbString()
- ],
- fill: false,
- borderColor: [
- window.chartColors.green,
- window.chartColors.blue,
- window.chartColors.purple
- ],
- borderWidth: 4,
- pointRadius: 30,
- data: []
- }]
- },
- type: 'doughnut',
- options: {
- legend: {
- display: true
- },
- title: {
- display: false,
- text: "缺陷"
- },
- tooltips: {
- mode: 'point',
- intersect: false
- },
- responsive: true
- }
- };
- var ctx022 = document.getElementById("canvas022").getContext("2d");
- window.chart022 = new Chart(ctx022, config022);
- }
- //成检三车间TOP3缺陷占比
- function init023() {
- window.config023 = {
- data: {
- labels: [],
- datasets: [{
- label: '缺陷',
- backgroundColor: [
- Chart.helpers.color(window.chartColors.Magenta1).rgbString(),
- Chart.helpers.color(window.chartColors.MediumVioletRed).rgbString(),
- Chart.helpers.color(window.chartColors.DarkViolet).rgbString()
- ],
- fill: false,
- borderColor: [
- window.chartColors.Magenta1,
- window.chartColors.MediumVioletRed,
- window.chartColors.DarkViolet
- ],
- borderWidth: 4,
- pointRadius: 30,
- data: []
- }]
- },
- type: 'doughnut',
- options: {
- legend: {
- display: true
- },
- title: {
- display: false,
- text: "缺陷"
- },
- tooltips: {
- mode: 'point',
- intersect: false
- },
- responsive: true
- }
- };
- var ctx023 = document.getElementById("canvas023").getContext("2d");
- window.chart023 = new Chart(ctx023, config023);
- }
- //半检一车间TOP3缺陷占比
- function init031() {
- window.config031 = {
- data: {
- labels: [],
- datasets: [{
- label: '缺陷',
- backgroundColor: [
- Chart.helpers.color(window.chartColors.red).rgbString(),
- Chart.helpers.color(window.chartColors.orange).rgbString(),
- Chart.helpers.color(window.chartColors.yellow).rgbString()
- ],
- fill: false,
- borderColor: [
- window.chartColors.red,
- window.chartColors.orange,
- window.chartColors.yellow
- ],
- borderWidth: 4,
- pointRadius: 30,
- data: []
- }]
- },
- type: 'doughnut',
- options: {
- legend: {
- display: true
- },
- textstyle: {
- fontsize: 2
- },
- title: {
- display: false,
- text: "缺陷",
- },
- tooltips: {
- mode: 'point',
- intersect: false
- },
- responsive: true
- }
- };
- var ctx031 = document.getElementById("canvas031").getContext("2d");
- window.chart031 = new Chart(ctx031, config031);
- }
- //半检二车间TOP3缺陷占比
- function init032() {
- window.config032 = {
- data: {
- labels: [],
- datasets: [{
- label: '缺陷',
- backgroundColor: [
- Chart.helpers.color(window.chartColors.green).rgbString(),
- Chart.helpers.color(window.chartColors.purple).rgbString(),
- Chart.helpers.color(window.chartColors.blue).rgbString()
- ],
- fill: false,
- borderColor: [
- window.chartColors.green,
- window.chartColors.purple,
- window.chartColors.blue
- ],
- borderWidth: 4,
- pointRadius: 30,
- data: []
- }]
- },
- type: 'doughnut',
- options: {
- legend: {
- display: true
- },
- title: {
- display: false,
- text: "缺陷"
- },
- tooltips: {
- mode: 'point',
- intersect: false
- },
- responsive: true
- }
- };
- var ctx032 = document.getElementById("canvas032").getContext("2d");
- window.chart032 = new Chart(ctx032, config032);
- }
- //半检三车间TOP3缺陷占比
- function init033() {
- window.config033 = {
- data: {
- labels: [],
- datasets: [{
- label: '缺陷',
- backgroundColor: [
- Chart.helpers.color(window.chartColors.MediumVioletRed).rgbString(),
- Chart.helpers.color(window.chartColors.DarkViolet).rgbString(),
- Chart.helpers.color(window.chartColors.Magenta1).rgbString()
- ],
- fill: false,
- borderColor: [
- window.chartColors.MediumVioletRed,
- window.chartColors.DarkViolet,
- window.chartColors.Magenta1
- ],
- borderWidth: 4,
- pointRadius: 30,
- data: []
- }]
- },
- type: 'doughnut',
- options: {
- legend: {
- display: true
- },
- title: {
- display: false,
- text: "缺陷"
- },
- tooltips: {
- mode: 'point',
- intersect: false
- },
- responsive: true
- }
- };
- var ctx033 = document.getElementById("canvas033").getContext("2d");
- window.chart033 = new Chart(ctx033, config033);
- }
- //新品入仓
- function init04() {
- window.config04 = {
- data: {
- labels: [],
- datasets: [{
- label: '新品入库',
- backgroundColor: Chart.helpers.color(window.chartColors.orange).alpha(0.6).rgbString(),
- fill: false,
- borderColor: window.chartColors.orange,
- borderWidth: 4,
- pointRadius: 30,
- data: []
- },]
- },
- type: 'bar',
- options: {
- legend: {
- display: true
- },
- title: {
- display: false,
- text: "产量"
- },
- tooltips: {
- mode: 'point',
- intersect: false
- },
- axisLabel: {
- textStyle: {
- fontSize: 5,
- },
- },
- responsive: true,
- scales: {
- xAxes: [{
- display: true,
- scaleLabel: {
- display: false,
- labelString: '',
- fontsize: 10
- },
- barThickness: 60,
- },
- ],
- yAxes: [{
- display: true,
- id: 'A',
- name: 'A',
- scalePositionLeft: true,
- position: 'left',
- scaleLabel: {
- display: false,
- labelString: 'Value'
- },
- ticks: {
- min: 0,
- stepSize: 500
- }
- }]
- }
- }
- };
- var ctx04 = document.getElementById("canvas04").getContext("2d");
- ctx04.fontsize = 10;
- window.chart04 = new Chart(ctx04, config04);
- }
- //各车间缺陷周环比
- function init05() {
- }
- //每周干补率及冷补率
- function init06() {
- window.config06 = {
- data: {
- labels: [],
- datasets: [
- {
- type: 'line',
- label: "成检废品率",
- yAxesGroup: 'A',
- yAxisID: 'A',
- backgroundColor: color(window.chartColors.orange).alpha(0.5).rgbString(),
- borderColor: window.chartColors.MediumVioletRed,
- borderWidth: 4,
- pointRadius: 20,
- fill: false
- }, {
- label: '成检检验数',
- yAxesGroup: 'B',
- yAxisID: 'B',
- backgroundColor: color(window.chartColors.blue).alpha(0.7).rgbString(),
- borderColor: window.chartColors.blue,
- barWidth: 1,
- fill: true
- }]
- },
- type: 'bar',
- barWidth: 10,
- options: {
- legend: {
- display: true,
- labels: {
- // 这个更具体的字体属性覆盖全局属性
- fontColor: 'white'
- }
- },
- title: {
- display: false,
- text: '每周产品检验报废率'
- },
- tooltips: {
- mode: 'index',
- intersect: false,
- },
- hover: {
- mode: 'nearest',
- intersect: true
- },
- responsive: true,
- scales: {
- xAxes: [{
- scaleLabel: {
- stacked: false,
- },
- barThickness: 90,
- ticks: {
- fontSize: 20 // 设置X轴标签的字体大小
- }
- }],
- yAxes: [{
- display: true,
- id: 'B',
- name: 'B',
- barWidth: 10,
- barThickness: 10,
- position: 'left',
- scaleLabel: {
- display: false,
- labelString: 'Value'
- },
- ticks: {
- min: 0,
- stepSize: 500
- }
- }
- , {
- display: true,
- id: 'A',
- name: 'A',
- scalePositionLeft: false,
- position: 'right',
- scaleLabel: {
- display: false,
- labelString: 'Value2',
- barWidth: 5,
- },
- ticks: {
- min: 0,
- stepSize: 10
- }
- }]
- }
- }
- };
- var ctx06 = document.getElementById("canvas06").getContext("2d");
- window.chart06 = new Chart(ctx06, config06);
- }
- //每周大小件大工序产量
- //function init07() {
- // window.config07 = {
- // data: {
- // labels: ["成型", "半检", "施釉", "烧成", "成检", "包装"],
- // datasets: [{
- // label: '大件产量',
- // backgroundColor: Chart.helpers.color(window.chartColors.orange).alpha(0.6).rgbString(),
- // fill: false,
- // borderColor: window.chartColors.orange,
- // borderWidth: 4,
- // pointRadius: 30,
- // data: []
- // },
- // {
- // label: '小件产量',
- // backgroundColor: Chart.helpers.color(window.chartColors.blue).alpha(0.6).rgbString(),
- // fill: false,
- // borderColor: window.chartColors.blue,
- // borderWidth: 4,
- // pointRadius: 30,
- // data: []
- // },]
- // },
- // type: 'bar',
- // options: {
- // legend: {
- // display: true
- // },
- // title: {
- // display: false,
- // text: "品管抽检数据展示"
- // },
- // tooltips: {
- // mode: 'point',
- // intersect: false
- // },
- // responsive: true,
- // scales: {
- // xAxes: [{
- // display: true,
- // scaleLabel: {
- // display: false,
- // labelString: ''
- // }
- // }],
- // yAxes: [{
- // display: true,
- // id: 'A',
- // name: 'A',
- // scalePositionLeft: true,
- // position: 'left',
- // scaleLabel: {
- // display: false,
- // labelString: 'Value'
- // },
- // ticks: {
- // min: 0,
- // stepSize: 10000,
- // max:40000
- // }
- // }]
- // }
- // }
- // };
- // var ctx07 = document.getElementById("canvas07").getContext("2d");
- // window.chart07 = new Chart(ctx07, config07);
- //}
- //每周产品半检验报废率
- function init08() {
- window.config10 = {
- data: {
- labels: [],
- datasets: [{
- type: 'line',
- label: "半检废品率",
- yAxesGroup: 'A',
- yAxisID: 'A',
- backgroundColor: color(window.chartColors.red).alpha(0.5).rgbString(),
- borderColor: window.chartColors.MediumVioletRed,
- borderWidth: 4,
- pointRadius: 20,
- fill: false,
-
- }, {
- label: '半检检验数',
- yAxesGroup: 'B',
- yAxisID: 'B',
- backgroundColor: color(window.chartColors.green).alpha(0.7).rgbString(),
- borderColor: window.chartColors.green,
- barWidth: 1,
- fill: true,
-
- },
- ]
- },
- type: 'bar',
- barWidth: 10,
- options: {
- legend: {
- display: true,
- labels: {
- // 这个更具体的字体属性覆盖全局属性
- fontColor: 'white'
- }
- },
- title: {
- display: false,
- text: '每周产品检验报废率'
- },
- tooltips: {
- mode: 'index',
- intersect: false,
- },
- hover: {
- mode: 'nearest',
- intersect: true
- },
- responsive: true,
- scales: {
- xAxes: [{
- scaleLabel: {
- stacked: false,
- },
- barThickness: 90,
- ticks: {
- fontSize:20 // 设置X轴标签的字体大小
- }
- }],
- yAxes: [{
- display: true,
- id: 'B',
- name: 'B',
- barWidth: 10,
- barThickness: 10,
- position: 'left',
- scaleLabel: {
- display: false,
- labelString: 'Value'
- },
- ticks: {
- min: 0,
- stepSize: 500
- }
- }
- , {
- display: true,
- id: 'A',
- name: 'A',
- scalePositionLeft: false,
- position: 'right',
- scaleLabel: {
- display: false,
- labelString: 'Value2',
- barWidth: 5,
- },
- ticks: {
- min: 0,
- stepSize: 3
- }
- }]
- }
- }
- };
- var ctx10 = document.getElementById("canvas10").getContext("2d");
- window.chart10 = new Chart(ctx10, config10);
- }
- //品管抽检数据展示
- function init09() {
- window.config09 = {
- data: {
- labels: [],
- datasets: [{
- label: '完成率',
- type: 'line',
- yAxesGroup: 'A',
- yAxisID: 'A',
- backgroundColor: Chart.helpers.color(window.chartColors.orange).alpha(0.6).rgbString(),
- fill: false,
- borderColor: window.chartColors.orange,
- borderWidth: 2,
- pointRadius: 15,
- data: []
- },
- {
- label: '合格率',
- type: 'line',
- yAxesGroup: 'A',
- yAxisID: 'A',
- backgroundColor: Chart.helpers.color(window.chartColors.blue).alpha(0.6).rgbString(),
- fill: false,
- borderColor: window.chartColors.blue,
- borderWidth: 2,
- pointRadius: 15,
- data: []
- },
- {
- label: '抽检数',
- yAxesGroup: 'B',
- yAxisID: 'B',
- backgroundColor: color(window.chartColors.blue).alpha(0.7).rgbString(),
- borderColor: window.chartColors.blue,
- barWidth: 1,
- fill: true
- }
- ]
- },
- type: 'bar',
- options: {
- legend: {
- display: true
- },
- title: {
- display: false,
- text: "品管抽检数据展示"
- },
- tooltips: {
- mode: 'point',
- intersect: false
- },
- responsive: true,
- scales: {
- xAxes: [{
- scaleLabel: {
- stacked: false,
- },
- barThickness: 80
- }],
- yAxes: [{
- display: true,
- id: 'B',
- name: 'B',
- barWidth: 10,
- barThickness: 10,
- position: 'left',
- scaleLabel: {
- display: false,
- labelString: 'Value'
- },
- ticks: {
- min: 200,
- stepSize: 1000
- }
- }
- , {
- display: true,
- id: 'A',
- name: 'A',
- scalePositionLeft: false,
- position: 'right',
- scaleLabel: {
- display: false,
- labelString: 'Value2',
- barWidth: 5,
- },
- ticks: {
- min: 10,
- stepSize: 20
- }
- }]
- }
- }
- };
- var ctx09 = document.getElementById("canvas09").getContext("2d");
- window.chart09 = new Chart(ctx09, config09);
- }
- function init11() {
- window.config11 = {
- data: {
- labels: [],
- datasets: [{
- type: 'line',
- label: "缺陷率",
- yAxesGroup: 'A',
- yAxisID: 'A',
- backgroundColor: color(window.chartColors.red).alpha(0.5).rgbString(),
- borderColor: window.chartColors.MediumVioletRed,
- borderWidth: 4,
- pointRadius: 20,
- fill: false,
- }, {
- label: '缺陷数',
- yAxesGroup: 'B',
- yAxisID: 'B',
- backgroundColor: color(window.chartColors.green).alpha(0.7).rgbString(),
- borderColor: window.chartColors.green,
- barWidth: 1,
- fill: true,
- },
- ]
- },
- type: 'bar',
- barWidth: 10,
- options: {
- legend: {
- display: true,
- labels: {
- // 这个更具体的字体属性覆盖全局属性
- fontColor: 'white'
- }
- },
- title: {
- display: false,
- text: '品管抽检缺陷率'
- },
- tooltips: {
- mode: 'index',
- intersect: false,
- },
- hover: {
- mode: 'nearest',
- intersect: true
- },
- responsive: true,
- scales: {
- xAxes: [{
- scaleLabel: {
- stacked: false,
- },
- barThickness: 90,
- ticks: {
- fontSize: 20 // 设置X轴标签的字体大小
- }
- }],
- yAxes: [{
- display: true,
- id: 'B',
- name: 'B',
- barWidth: 10,
- barThickness: 10,
- position: 'left',
- scaleLabel: {
- display: false,
- labelString: 'Value'
- },
- ticks: {
- min: 0,
- stepSize: 500
- }
- }
- , {
- display: true,
- id: 'A',
- name: 'A',
- scalePositionLeft: false,
- position: 'right',
- scaleLabel: {
- display: false,
- labelString: 'Value2',
- barWidth: 5,
- },
- ticks: {
- min: 0,
- stepSize: 3,
- }
- }]
- }
- }
- };
- var ctx11 = document.getElementById("canvas11").getContext("2d");
- window.chart11 = new Chart(ctx11, config11);
- }
- //初期加载画面数据
- function loadAll() {
- load01(); load02(); load03(); load04(); load05(); load06(); load08(); load09(); load11();
- }
- //每周各车间产质量
- function load01() {
- //加载数据
- $.get("rpt.ashx?m=Load01", function (data) {
- //更新图表数据
- var json = JSON.parse(data);
- if (json["success"] == true) {
- let onedate1 = [];
- let onedate2 = [];
- let onedate3 = [];
- onedate1.push((json["rows"][0]["一车间"]));
- onedate1.push((json["rows"][0]["二车间"]));
- onedate1.push((json["rows"][0]["三车间"]));
- onedate2.push((json["rows"][1]["一车间"]));
- onedate2.push((json["rows"][1]["二车间"]));
- onedate2.push((json["rows"][1]["三车间"]));
- onedate3.push((json["rows"][2]["一车间"]));
- onedate3.push((json["rows"][2]["二车间"]));
- onedate3.push((json["rows"][2]["三车间"]));
- window.chart01.data.datasets[0].data = onedate3;
- window.chart01.data.datasets[1].data = onedate2;
- window.chart01.data.datasets[2].data = onedate1;
- window.chart01.update();
- }
- //加载完成,重置刷新时间。
- currentTime01 = refreshTime01;
- });
- }
- //半检大小件TOP3缺陷占比
- function load02() {
- //加载数据
- $.get("rpt.ashx?m=Load02", function (data) {
- //更新图表数据
- var json = JSON.parse(data);
- if (json["success"] == true) {
- let onedate = []; let onelabel = [];
- let twodate = []; let twolabel = [];
- let threedate = []; let threelabel = [];
- //var num = (json["rows"][0]["ROWNUM"]);
- var num = (json["rows"].length);
- for (var i = 0; i < num; i++) {
- if (i <= 2) { //一车间
- onedate.push((json["rows"][i]["缺陷占比"]));
- onelabel.push(json["rows"][i]["缺陷名称"]);
- }
- if (i > 2 && i < 6) { //二车间
- twodate.push((json["rows"][i]["缺陷占比"]));
- twolabel.push(json["rows"][i]["缺陷名称"]);
- }
- if (i >= 6) {//三车间
- threedate.push((json["rows"][i]["缺陷占比"]));
- threelabel.push(json["rows"][i]["缺陷名称"]);
- }
- window.chart031.data.datasets[0].data = onedate;
- window.chart031.data.labels = onelabel;
- window.chart032.data.datasets[0].data = twodate;
- window.chart032.data.labels = twolabel;
- window.chart033.data.datasets[0].data = threedate;
- window.chart033.data.labels = threelabel;
- window.chart031.update();
- window.chart032.update();
- window.chart033.update();
- }
- //加载完成,重置刷新时间。
- currentTime01 = refreshTime01;
- }
- });
- }
- //成检大小件TOP3缺陷占比
- function load03() {
- //加载数据
- $.get("rpt.ashx?m=Load03", function (data) {
- //更新图表数据
- var json = JSON.parse(data);
- if (json["success"] == true) {
- let onedate = []; let onelabel = [];
- let twodate = []; let twolabel = [];
- let threedate = []; let threelabel = [];
- if (json["success"] == true) {
- //var num = (json["rows"][0]["ROWNUM"]);
- var num = (json["rows"].length);
- for (var i = 0; i < num; i++) {
- if (i <= 2) { //一车间
- onedate.push((json["rows"][i]["缺陷占比"]));
- onelabel.push(json["rows"][i]["缺陷名称"]);
- }
- if (i > 2 && i < 6) { //二车间
- twodate.push((json["rows"][i]["缺陷占比"]));
- twolabel.push(json["rows"][i]["缺陷名称"]);
- }
- if (i >= 6) {//三车间
- threedate.push((json["rows"][i]["缺陷占比"]));
- threelabel.push(json["rows"][i]["缺陷名称"]);
- }
- window.chart021.data.datasets[0].data = onedate;
- window.chart021.data.labels = onelabel;
- window.chart022.data.datasets[0].data = twodate;
- window.chart022.data.labels = twolabel;
- window.chart023.data.datasets[0].data = threedate;
- window.chart023.data.labels = threelabel;
- window.chart021.update();
- window.chart022.update();
- window.chart023.update();
- }
- }
- //加载完成,重置刷新时间。
- currentTime01 = refreshTime01;
- }
- });
- }
- //新品入仓
- function load04() {
- //加载数据
- $.get("rpt.ashx?m=Load04", function (data) {
- //更新图表数据
- var json = JSON.parse(data);
- if (json["success"] == true) {
- let onedate = []; let onelabel = [];
- var num = (json["rows"].length);
- for (var i = 0; i < num; i++) {
- onedate.push((json["rows"][i]["COUNTS"]));
- onelabel.push(json["rows"][i]["GOODCODE"]);
- window.chart04.data.labels = onelabel;
- window.chart04.data.datasets[0].data = onedate;
- window.chart04.update();
- }
- }
- //加载完成,重置刷新时间。
- currentTime01 = refreshTime01;
- });
- }
- //各车间缺陷周环比
- function load05() {
- if (mainInterval) {
- clearInterval(mainInterval);
- console.log("Interval Stop!");
- }
- //加载数据
- $.get("rpt.ashx?m=Load05", function (data) {
- //更新图表数据
- var json = JSON.parse(data);
- if (json["success"] == true) {
- $("#tableheader").html("");
- for (var i = 0; i < json["rows"].length; i++) {
- var temp = $("#dayTable_template").html();
- temp = temp.replace("<tbody>", "").replace("</tbody>", "");
- temp = temp.replace('{产品类别}', json["rows"][i]['产品类别']);
- temp = temp.replace('{缺陷名称}', json["rows"][i]['缺陷名称']);
- temp = temp.replace('{缺陷数}', json["rows"][i]['缺陷数']);
- temp = temp.replace('{缺陷占比}', json["rows"][i]['缺陷占比']);
- temp = temp.replace('{上周比}', json["rows"][i]['上周比']);
- temp = temp.replace('{对比趋势}', json["rows"][i]['对比趋势']);
- $("#tableheader").append(temp);
- }
- var num = (json["rows"].length);
- for (var i = 0; i < num; i++) {
- var a = document.getElementById("tableheader").rows[i].cells[5].innerHTML;
- if (a == '下降↓') {
- document.getElementById("tableheader").rows[i].cells[5].style.color = '#3bf738';
- }
- else {
- document.getElementById("tableheader").rows[i].cells[5].style.color = 'red';
- }
- }
- mainRowCount = json["rows"].length;
- mainInterval = setInterval(mainScroll, 3000);
- //加载完成,重置刷新时间。
- currentTime01 = refreshTime01;
- }
- });
- }
-
- function load06() {
- //加载数据
- $.get("rpt.ashx?m=Load06", function (data) {
- //更新图表数据
- var json = JSON.parse(data);
- if (json["success"] == true) {
- let onedate1 = [];
- let onedate2 = [];
- let onedate3 = [];
- var num = (json["rows"].length);
- for (var i = 0; i < num; i++) {
- onedate3.push(json["rows"][i]["检验数"]);
- onedate2.push(json["rows"][i]["废品率"]);
- onedate1.push(json["rows"][i]["GOODSCODE"]);
- }
- window.chart06.data.datasets[0].data = onedate2;
- window.chart06.data.datasets[1].data = onedate3;
- window.chart06.data.labels = onedate1;
- window.chart06.update();
- }
- //加载完成,重置刷新时间。
- currentTime01 = refreshTime01;
- });
- }
- //每周大小件大工序产量
- function load07() {
- //加载数据
- $.get("rpt.ashx?m=Load07", function (data) {
- var json = JSON.parse(data);
- if (json["success"] == true) {
- let onedate1 = [];
- let onedate2 = [];
- let onedate3 = [];
- onedate1.push((json["rows"][0]["SMALLGDD"]));
- onedate1.push((json["rows"][0]["SMALLHALF"]));
- onedate1.push((json["rows"][0]["SMALLGLAZE"]));
- onedate1.push((json["rows"][0]["SMALLKILN"]));
- onedate1.push((json["rows"][0]["SMALLCHECK"]));
- onedate1.push((json["rows"][0]["SMALLPACK"]));
- onedate2.push((json["rows"][0]["BIGGDD"]));
- onedate2.push((json["rows"][0]["BIGHALF"]));
- onedate2.push((json["rows"][0]["BIGGLAZE"]));
- onedate2.push((json["rows"][0]["BIGKILN"]));
- onedate2.push((json["rows"][0]["BIGCHECK"]));
- onedate2.push((json["rows"][0]["BIGPACK"]));
- window.chart07.data.datasets[1].data = onedate1;
- window.chart07.data.datasets[0].data = onedate2;
- window.chart07.update();
- }
- //加载完成,重置刷新时间。
- currentTime01 = refreshTime01;
- });
- }
- //每周产品检验报废率
- function load08() {
- //加载数据
- $.get("rpt.ashx?m=Load10", function (data) {
- //更新图表数据
- var json = JSON.parse(data);
- if (json["success"] == true) {
- let onedate1 = [];
- let onedate2 = [];
- let onedate3 = [];
- var num = (json["rows"].length);
- for (var i = 0; i < num; i++) {
-
- onedate3.push(json["rows"][i]["检验数"]);
- onedate2.push(json["rows"][i]["废品率"]);
-
- onedate1.push(json["rows"][i]["GOODSCODE"]);
- }
- window.chart10.data.datasets[0].data = onedate2;
- window.chart10.data.datasets[1].data = onedate3;
- window.chart10.data.labels = onedate1;
- window.chart10.update();
- }
- //加载完成,重置刷新时间。
- currentTime01 = refreshTime01;
- });
- }
- //品管抽检数据展示
- function load09() {
- //加载数据
- $.get("rpt.ashx?m=Load09", function (data) {
- //更新图表数据
- var json = JSON.parse(data);
- if (json["success"] == true) {
- let onedate1 = [];
- let onedate2 = [];
- let onedate3 = [];
- let onedate4 = [];
- for (var i = 0; i < json["rows"].length; i++) {
- onedate4.push((json["rows"][i]["INSPECTIONQUANTITY"]));
- onedate1.push((json["rows"][i]["WANCHENGLV"]));
- onedate2.push((json["rows"][i]["HEGELV"]));
- onedate3.push(json["rows"][i]["PLANDATE"]);
- }
- window.chart09.data.datasets[0].data = onedate1;
- window.chart09.data.datasets[1].data = onedate2;
- window.chart09.data.datasets[2].data = onedate4;
- window.chart09.data.labels = onedate3;
- window.chart09.update();
- }
- //加载完成,重置刷新时间。
- currentTime01 = refreshTime01;
- });
- }
- //每周产品检验报废率
- function load11() {
- //加载数据
- $.get("rpt.ashx?m=Load91", function (data) {
- //更新图表数据
- var json = JSON.parse(data);
- if (json["success"] == true) {
- let onedate1 = [];
- let onedate2 = [];
- let onedate3 = [];
- var num = (json["rows"].length);
- for (var i = 0; i < num; i++) {
- onedate3.push(json["rows"][i]["缺陷数"]);
- onedate2.push(json["rows"][i]["缺陷占比"]);
- onedate1.push(json["rows"][i]["缺陷名称"]);
- }
- window.chart11.data.datasets[0].data = onedate2;
- window.chart11.data.datasets[1].data = onedate3;
- window.chart11.data.labels = onedate1;
- window.chart11.update();
- }
- //加载完成,重置刷新时间。
- currentTime01 = refreshTime01;
- });
- }
- </script>
- </body>
- </html>
|