|
|
@@ -0,0 +1,1564 @@
|
|
|
+<!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>
|