| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353 |
- <!doctype html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
- <link rel="shortcut icon" href="/img/logo.png" />
- <link rel="bookmark" href="/img/logo.png" />
- <link href="/Plugins/animate/animate.min.css" rel="stylesheet" />
- <link rel="stylesheet" href="../DashBoard.css?v3" />
- <script src="/Plugins/jquery-3.4.1/jquery-3.4.1.min.js"></script>
- <script src="/Plugins/xrequest/xrequest.min.js"></script>
- <title>东科软件</title>
- </head>
- <body style="background-color:black;">
- <div class="box_1920_1080">
- <div class="box_title">
- 生产数据监控 <span class="box_title_arrow">>>></span>
- </div>
- <div class="box_body" style="display: flex; flex-direction: column;">
- <div style="width:1840px;height:960px;display:flex;flex-direction:row;">
- <div style="width: 100%; padding-top:10px;">
- <table cellspacing="0" cellpadding="0" border="0" style="width:100%;">
- <tr class="tr_title">
- <td style="width:230px"></td>
- <td style="width:230px">成型</td>
- <td style="width:230px">一检</td>
- <td style="width:230px">改洗</td>
- <td style="width:230px">二检</td>
- <td style="width:230px">施釉</td>
- <td style="width:230px">烧成</td>
- <td style="width:230px">成检</td>
- </tr>
- <tr class="tr_bg_light">
- <td style="width:230px">今日累计</td>
- <td style="width:230px"><span id="cxlj_num">0</span> <span id="cxlj_add" style="color:orange"></span></td>
- <td style="width:230px"><span id="yjlj_num">0</span> <span id="yjlj_add" style="color:orange"></span></td>
- <td style="width:230px"><span id="gxlj_num">0</span> <span id="gxlj_add" style="color:orange"></span></td>
- <td style="width:230px"><span id="ejlj_num">0</span> <span id="ejlj_add" style="color:orange"></span></td>
- <td style="width:230px"><span id="sylj_num">0</span> <span id="sylj_add" style="color:orange"></span></td>
- <td style="width:230px"><span id="sclj_num">0</span> <span id="sclj_add" style="color:orange"></span></td>
- <td style="width:230px"><span id="cjlj_num">0</span> <span id="cjlj_add" style="color:orange"></span></td>
- </tr>
- <tr class="tr_bg_dark">
- <td style="width:230px">累计计件</td>
- <td style="width:230px">0</td>
- <td style="width:230px">0</td>
- <td style="width:230px">0</td>
- <td style="width:230px">0</td>
- <td style="width:230px">0</td>
- <td style="width:230px">0</td>
- <td style="width:230px">0</td>
- </tr>
- <tr class="tr_bg_light">
- <td style="width:230px">累计异常</td>
- <td style="width:230px">0</td>
- <td style="width:230px">0</td>
- <td style="width:230px">0</td>
- <td style="width:230px">0</td>
- <td style="width:230px">0</td>
- <td style="width:230px">0</td>
- <td style="width:230px">0</td>
- </tr>
- <tr class="tr_bg_dark">
- <td style="width:230px">生产节拍</td>
- <td style="width:230px">0</td>
- <td style="width:230px">0</td>
- <td style="width:230px">0</td>
- <td style="width:230px">0</td>
- <td style="width:230px">0</td>
- <td style="width:230px">0</td>
- <td style="width:230px">0</td>
- </tr>
- <tr class="tr_bg_light" style="height:40px;">
- <td style="width:230px">实时数据</td>
- <td style="width: 230px; height: 40px; display: flex; flex-direction: column; align-items: center " id="cx"></td>
- <td style="width:230px" id="yj"></td>
- <td style="width:230px" id="gx"></td>
- <td style="width:230px" id="ej"></td>
- <td style="width:230px" id="sy"></td>
- <td style="width:230px" id="sc"></td>
- <td style="width:230px" id="cj"></td>
- </tr>
- </table>
- </div>
- </div>
- </div>
- </div>
- <script>
- const animateCSS = (element, animation, prefix = 'animate__') =>
- new Promise((resolve, reject) => {
- const animationName = `${prefix}${animation}`;
- const node = document.querySelector(element);
- node.classList.add(`${prefix}animated`, animationName);
- function handleAnimationEnd(event) {
- event.stopPropagation();
- node.classList.remove(`${prefix}animated`, animationName);
- resolve('Animation ended');
- }
- node.addEventListener('animationend', handleAnimationEnd, { once: true });
- });
- $(document).ready(function () {
- //initData();
- //loadData();
- //barCodeSuccess("#cx", "条码:12345678901 工号:DONGKEXW");
- //barCodeError("#cx", "11111111111");
- doGetData = setInterval(function () { timeUpdate(); }, 500);
- });
- function timeUpdate() {
- if (Math.round(Math.random() * 2) == 1) addNum("#cxlj");
- if (Math.round(Math.random() * 2) == 1) addNum("#yjlj");
- if (Math.round(Math.random() * 2) == 1) addNum("#gxlj");
- if (Math.round(Math.random() * 2) == 1) addNum("#ejlj");
- if (Math.round(Math.random() * 2) == 1) addNum("#sylj");
- if (Math.round(Math.random() * 2) == 1) addNum("#sclj");
- if (Math.round(Math.random() * 2) == 1) addNum("#cjlj");
- }
- //产品计件成功显示
- function barCodeSuccess(id, title) {
- var num = Math.round(Math.random() * 10000);
- $(id).append("<div id='" + id.replace('#', '') + num + "' style='position: absolute'>" + title + "</div>");
- animateCSS(id + num, 'fadeInUp').then((message) => {
- setTimeout(function () {
- animateCSS(id + num, 'fadeOutUp').then((message) => {
- $(id + num).remove();
- });
- }, 1000);
- });
- }
- //产品计件失败显示
- function barCodeError(id, title) {
- var num = Math.round(Math.random() * 10000);
- $(id).append("<div id='" + id.replace('#', '') + num + "' style='position: absolute'>" + title + "</div>");
- animateCSS(id + num, 'fadeInUp').then((message) => {
- animateCSS(id + num, 'tada').then((message) => {
- animateCSS(id + num, 'fadeOutUp').then((message) => {
- $(id + num).remove();
- });
- });
- });
- }
- //数量+1
- function addNum(id) {
- $(id + '_num').text(parseInt($(id + '_num').text()) + 1);
- var num = Math.round(Math.random() * 10000);
- $(id + '_add').append("<div id='" + id.replace('#', '') + '_add' + num + "' style='position: absolute;left:" + ($(id + '_add').offset().left + 30) + "px;top:" + ($(id + '_add').offset().top - 20) + "px;'>+1</div>");
- animateCSS(id + '_add' + num, 'fadeInUp').then((message) => {
- animateCSS(id + '_add' + num, 'fadeOutUp').then((message) => {
- $(id + '_add' + num).remove();
- });
- });
- }
- function loadData() {
- //产品达成数据===================================
- window.GoodsCL.data.datasets[0].data = [
- 3000,
- 3000,
- 3000,
- 3000,
- 3000,
- 3000
- ];
- window.GoodsCL.data.datasets[1].data = [
- randomScalingFactor(1000) + 2000,
- randomScalingFactor(1000) + 2000,
- randomScalingFactor(1000) + 2000,
- randomScalingFactor(1000) + 2000,
- randomScalingFactor(1000) + 2000,
- randomScalingFactor(1000) + 2000
- ];
- window.GoodsCL.update();
- //===================================================
- //产量计划达成数据===================================
- window.ProcedureCL.data.datasets[0].data = [
- 3000,
- 3000,
- 3000,
- 3000,
- 3000,
- 3000,
- 3000
- ];
- window.ProcedureCL.data.datasets[1].data = [
- randomScalingFactor(1000) + 2000,
- randomScalingFactor(1000) + 2000,
- randomScalingFactor(1000) + 2000,
- randomScalingFactor(1000) + 2000,
- randomScalingFactor(1000) + 2000,
- randomScalingFactor(1000) + 2000,
- randomScalingFactor(1000) + 2000
- ];
- window.ProcedureCL.update();
- //===================================================
- }
- function initData() {
- 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)'
- };
- var color = Chart.helpers.color;
- window.randomScalingFactor = function (num) {
- return Math.round(Math.random() * num);
- }
- Chart.defaults.global.defaultFontColor = 'white';
- Chart.defaults.global.defaultFontSize = 24;
- Chart.defaults.global.legend.display = false;
- //产品型号达成=======================================
- window.configGoodsCL = {
- data: {
- labels: ['H0962L-A', 'H0962M-A', 'H0966L-W', 'H0966M-W', 'H0967L-W', 'H0967M-W'],
- datasets: [{
- type: 'line',
- label: '计划产量',
- backgroundColor: color(window.chartColors.orange).alpha(0.35).rgbString(),
- fill: false,
- borderColor: window.chartColors.orange,
- borderWidth: 2,
- pointRadius: 30,
- data: [0, 0, 0, 0, 0, 0, 0]
- }, {
- label: '实际产量',
- backgroundColor: color(window.chartColors.blue).alpha(0.35).rgbString(),
- borderColor: window.chartColors.blue,
- borderWidth: 1,
- data: [0, 0, 0, 0, 0, 0, 0]
- }]
- },
- type: 'bar',
- options: {
- legend: {
- display: true
- },
- title: {
- display: true,
- text: "月度产品完工统计"
- },
- tooltips: {
- mode: 'point',
- intersect: false
- },
- responsive: true,
- scales: {
- xAxes: [{
- stacked: false
- }],
- yAxes: [{
- display: true,
- stacked: false,
- ticks: {
- min: 0,
- stepSize: 500,
- max: 3500
- }
- }]
- }
- }
- };
- var ctxGoodsCL = document.getElementById("canvasGoodsCL").getContext("2d");
- window.GoodsCL = new Chart(ctxGoodsCL, configGoodsCL);
- //===================================================
- //工序产量达成=======================================
- window.configProcedureCL = {
- data: {
- labels: ['成型', '一检', '改洗', '二检', '施釉', '烧成', '成检'],
- datasets: [{
- type: 'line',
- label: '计划产量',
- backgroundColor: color(window.chartColors.orange).alpha(0.35).rgbString(),
- fill: false,
- borderColor: window.chartColors.orange,
- borderWidth: 2,
- pointRadius: 30,
- data: [0, 0, 0, 0, 0, 0, 0]
- }, {
- label: '实际产量',
- backgroundColor: color(window.chartColors.blue).alpha(0.35).rgbString(),
- borderColor: window.chartColors.blue,
- borderWidth: 1,
- data: [0, 0, 0, 0, 0, 0, 0]
- }]
- },
- type: 'bar',
- options: {
- legend: {
- display: true
- },
- title: {
- display: true,
- text: "月度工序完工统计"
- },
- tooltips: {
- mode: 'point',
- intersect: false
- },
- responsive: true,
- scales: {
- xAxes: [{
- stacked: false
- }],
- yAxes: [{
- display: true,
- stacked: false,
- ticks: {
- min: 0,
- stepSize: 500,
- max: 3500
- }
- }]
- }
- }
- };
- var ctxProcedureCL = document.getElementById("canvasProcedureCL").getContext("2d");
- window.ProcedureCL = new Chart(ctxProcedureCL, configProcedureCL);
- //===================================================
- }
- </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="/Plugins/circleChart/circleChart.min.js"></script>
- </body>
- </html>
|