| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259 |
- <!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 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 style="color:darkorange">>>></span>
- </div>
- <div class="box_body" style="display: flex; flex-direction: column;">
- <div style="width:1840px;height:480px;display:flex;flex-direction:row;">
- <div style="width: 70%;height:480px;">
- <!--月计划达成率表格-->
- <table cellspacing="0" cellpadding="0" border="0" style="width:100%;">
- <tr class="tr_title">
- <td>序号</td>
- <td>产品型号</td>
- <td>本月计划数</td>
- <td>目标达成率</td>
- <td>单位</td>
- </tr>
- <tr class="tr_bg_light">
- <td>1</td>
- <td>H0966M</td>
- <td>3000</td>
- <td>80%</td>
- <td>件</td>
- </tr>
- <tr class="tr_bg_dark">
- <td>2</td>
- <td>H0966M</td>
- <td>3000</td>
- <td>80%</td>
- <td>件</td>
- </tr>
- <tr class="tr_bg_light">
- <td>3</td>
- <td>H0966M</td>
- <td>3000</td>
- <td>80%</td>
- <td>件</td>
- </tr>
- <tr class="tr_bg_dark">
- <td>4</td>
- <td>H0966M</td>
- <td>3000</td>
- <td>80%</td>
- <td>件</td>
- </tr>
- <tr class="tr_bg_light">
- <td>5</td>
- <td>H0966M</td>
- <td>3000</td>
- <td>80%</td>
- <td>件</td>
- </tr>
- <tr class="tr_bg_dark">
- <td>6</td>
- <td>H0966M</td>
- <td>3000</td>
- <td>80%</td>
- <td>件</td>
- </tr>
- </table>
- </div>
- <div style="width: 30%; height: 480px; ">
- <!--型号完成度百分比-->
- </div>
- </div>
- <div style="width:1840px;height:480px;display:flex;flex-direction:row;">
- <div style="width: 70%;height:480px;">
- <!--工序完工占比-->
- <div class="d-flex justify-content-center">
- <canvas id="canvasDayCL" style="-moz-user-select: none;-webkit-user-select: none;-ms-user-select: none; height:480px;width:100%"></canvas>
- </div>
- </div>
- <div style="width: 30%; height: 480px; ">
- <!--工序预警-->
- </div>
- </div>
- </div>
- </div>
- <script>
- $(document).ready(function () {
- initData();
- loadData();
- });
- function loadData() {
- window.DayCL.data.datasets[0].data = [
- randomScalingFactor(12) + 5,
- randomScalingFactor(12) + 5,
- randomScalingFactor(12) + 5,
- randomScalingFactor(12) + 5,
- randomScalingFactor(12) + 5,
- randomScalingFactor(12) + 5,
- randomScalingFactor(12) + 5,
- randomScalingFactor(12) + 5,
- randomScalingFactor(12) + 5,
- randomScalingFactor(12) + 5,
- randomScalingFactor(12) + 5,
- randomScalingFactor(12) + 5,
- randomScalingFactor(12) + 5,
- randomScalingFactor(12) + 5,
- randomScalingFactor(12) + 5,
- randomScalingFactor(12) + 5,
- randomScalingFactor(12) + 5,
- randomScalingFactor(12) + 5,
- randomScalingFactor(12) + 5,
- randomScalingFactor(12) + 5,
- randomScalingFactor(12) + 5,
- randomScalingFactor(12) + 5,
- randomScalingFactor(12) + 5,
- randomScalingFactor(12) + 5,
- randomScalingFactor(12) + 5,
- randomScalingFactor(12) + 5,
- randomScalingFactor(12) + 5,
- randomScalingFactor(12) + 5,
- randomScalingFactor(12) + 5,
- randomScalingFactor(12) + 5,
- randomScalingFactor(12) + 5
- ];
- window.DayCL.data.datasets[1].data = [
- randomScalingFactor(12) + 0,
- randomScalingFactor(12) + 0,
- randomScalingFactor(12) + 0,
- randomScalingFactor(12) + 0,
- randomScalingFactor(12) + 0,
- randomScalingFactor(12) + 0,
- randomScalingFactor(12) + 0,
- randomScalingFactor(12) + 0,
- randomScalingFactor(12) + 0,
- randomScalingFactor(12) + 0,
- randomScalingFactor(12) + 0,
- randomScalingFactor(12) + 0,
- randomScalingFactor(12) + 0,
- randomScalingFactor(12) + 0,
- randomScalingFactor(12) + 0,
- randomScalingFactor(12) + 0,
- randomScalingFactor(12) + 0,
- randomScalingFactor(12) + 0,
- randomScalingFactor(12) + 0,
- randomScalingFactor(12) + 0,
- randomScalingFactor(12) + 0,
- randomScalingFactor(12) + 0,
- randomScalingFactor(12) + 0,
- randomScalingFactor(12) + 0,
- randomScalingFactor(12) + 0,
- randomScalingFactor(12) + 0,
- randomScalingFactor(12) + 0,
- randomScalingFactor(12) + 0,
- randomScalingFactor(12) + 0,
- randomScalingFactor(12) + 0,
- randomScalingFactor(12) + 0
- ];
- window.DayCL.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 = 16;
- //每日计划达成=======================================
- window.configDayCL = {
- data: {
- labels: ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31'],
- datasets: [{
- type: 'line',
- label: '目标产量',
- backgroundColor: color(window.chartColors.red).alpha(0.5).rgbString(),
- fill: false,
- borderColor: window.chartColors.red,
- borderWidth: 2,
- pointRadius: 12,
- data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
- }, {
- label: '实际产量',
- backgroundColor: color(window.chartColors.blue).alpha(0.5).rgbString(),
- borderColor: window.chartColors.blue,
- borderWidth: 1,
- data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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: 2,
- // max: 18
- //}
- }]
- }
- }
- };
- var ctxDayCL = document.getElementById("canvasDayCL").getContext("2d");
- window.DayCL = new Chart(ctxDayCL, configDayCL);
- //===================================================
- }
- </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>
|