| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564 |
- <!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;
- height:100vh;
- }
- .col {
- width: 1680px;
- height: 960px;
- margin: auto;
- }
- .bigtitle {
- width:100%;
- background-repeat: no-repeat;
- background-position: center;
- background-image: url(/Img/title9in1.png);
- background-size: 100% auto;
- }
- .boardone {
- background-repeat: no-repeat;
- background-position: center;
- background-image: url(/Img/bg9in1.png);
- background-size: 1500px 800px; /* 宽度*高度*/
- }
- .boardone .title {
- padding-top: 140px;
- color: white;
- font-size: 40px;
- font-weight: 600;
- }
- .boardone .chart {
- margin-left: 150px;
- margin-top: 10px;
- width: 100%;
- height: 550px;
- font-size: 10px;
- 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;
- }
- .container {
- width: 100%;
- display: grid;
- grid-template-columns: repeat(3, 1fr); /* 创建3列,每列等宽 */
- grid-gap: 200px;
- box-sizing: border-box;
- padding: 0 20px;
- box-sizing: border-box; /* 确保padding被包含在容器的总宽度内 */
- max-width: none !important;
- }
- .workshop {
- font-size: 30px;
- color: white;
- }
- </style>
- </head>
- <body class="m-0 p-0 border-0" style="width:100%;height:100%;">
- <!--Android-->
- <div class="m-1"style="width:100%;height:100%;">
- <div class="row pb-4" style="width:100%;">
- <div class=" bigtitle"></div>
- </div>
- <div class="row text-center g-2 container" style="width:100%;">
- <div class="col boardone ">
- <div class="title">
- 新品入仓
- </div>
- <div class="chart" style="height:100%; width:80%">
- <canvas id="canvas04" height="125"></canvas>
- </div>
- </div>
- <div class="col boardone ">
- <div class="title">
- 每周产品半检检验报废率TOP5
- </div>
- <div class="chart" style="height:100%; width: 82%; margin-left: 120px ;margin-top:-15px">
- <canvas id="canvas10" height="130"></canvas>
- </div>
- </div>
- <div class="col boardone ">
- <div class="title pb-2">
- 每周产品成检检验报废率TOP5
- </div>
- <div class="chart" style="height:100%; width: 72%; margin-left: 200px ;">
- <canvas id="canvas06" height="140"></canvas>
- </div>
- </div>
- <div class="col boardone ">
- <div class="title">
- 每周各车间半检TOP3
- </div>
- <div class="doughnut">
- <div style=" margin-top: 120px; height: 500px; width: 800px;">
- <canvas id="canvas031"></canvas>
- <span class="workshop">一车间</span>
- </div>
- <div style="margin-left: 420px; margin-top: -620px; height: 500px; width: 800px; ">
- <canvas id="canvas032"></canvas>
- <span class="workshop">二车间</span>
- </div>
- <div style="margin-left: 900px; margin-top: -370px; height: 500px; width: 800px;">
- <canvas id="canvas033"></canvas>
- <span class="workshop">三车间</span>
- </div>
- </div>
- </div>
- <div class="col boardone ">
- <div class="title">
- 每周各车间产质量
- </div>
- <div class="chart" style="height:100%; width: 72%; margin-left: 200px ;">
- <canvas id="canvas01" height="145"></canvas>
- </div>
- </div>
- <div class="col boardone ">
- <div class="title">
- 每周各车间成检TOP3
- </div>
- <div class="doughnut">
- <div style="margin-top: 120px; height: 500px; width: 800px;">
- <canvas id="canvas021"></canvas>
- <span class="workshop">一车间</span>
- </div>
- <div style="margin-left: 420px; margin-top: -620px; height: 500px; width: 800px; ">
- <canvas id="canvas022"></canvas>
- <span class="workshop">二车间</span>
- </div>
- <div style="margin-left: 900px; margin-top: -370px; height: 500px; width: 800px;">
- <canvas id="canvas023"></canvas>
- <span class="workshop">三车间</span>
- </div>
- </div>
- </div>
- <div class="col boardone ">
- <div class="title">
- 品管抽检缺陷率
- </div>
- <div class="chart" style="height: 100%;width:82%; margin-left: 120px ;">
- <canvas id="canvas11" height="125"></canvas>
- </div>
- </div>
- <div class="col boardone ">
- <div class="title">
- 品管抽检数据展示
- </div>
- <div class="chart" style="height:100%;width: 82%; margin-left: 120px ;">
- <canvas id="canvas09" height="125"></canvas>
- </div>
- </div>
- <div class="col boardone ">
- <div class="title pb-2">
- 各车间缺陷周环比
- </div>
- <div class="chart" style="margin-left: 150px;">
- <table style="width:80%; height:50px;" class="table-striped">
- <tr class="各车间缺陷周环比">
- <td style="width:160px; height:10%;">产品类别</td>
- <td style="width: 160px; height: 10%;">缺陷名称</td>
- <td style="width: 160px; height: 10%;">缺陷数</td>
- <td style="width: 180px; height: 10%;">缺陷占比 </td>
- <td style="width: 180px; height: 10%;">上周比</td>
- <td>对比趋势</td>
- </tr>
- </table>
- <div>
- <div>
- <table id="dayTable_template" style="display:none;">
- <tr>
- <td style="width: 160px; height: 10%;">{产品类别}</td>
- <td style="width: 160px; height: 10%;">{缺陷名称}</td>
- <td style="width: 160px; height: 10%;">{缺陷数}</td>
- <td style="width: 180px; height: 10%;">{缺陷占比}</td>
- <td style="width: 180px; height: 10%;">{上周比}</td>
- <td>{对比趋势}</td>
- </tr>
- </table>
- </div>
- <table id="tableheader" class="tablefix" style="width:80%;height:100%; ">
- </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.56);
- 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>
|