From 0b34e606b528b6fd34ba78dfbebc3e25438911b5 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期三, 18 十二月 2024 15:03:04 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI

---
 WebTM/layuiadmin/modules/console.js |   64 +++++++++++++++++++++++++++----
 1 files changed, 55 insertions(+), 9 deletions(-)

diff --git a/WebTM/layuiadmin/modules/console.js b/WebTM/layuiadmin/modules/console.js
index 4f9bb49..c0b33b5 100644
--- a/WebTM/layuiadmin/modules/console.js
+++ b/WebTM/layuiadmin/modules/console.js
@@ -8,7 +8,8 @@
  */
 
 
-layui.define(function(exports){
+layui.define(function (exports) {
+    
   
   /*
     涓嬮潰閫氳繃 layui.use 鍒嗘鍔犺浇涓嶅悓鐨勬ā鍧楋紝瀹炵幇涓嶅悓鍖哄煙鐨勫悓鏃舵覆鏌擄紝浠庤�屼繚璇佽鍥剧殑蹇�熷憟鐜�
@@ -41,18 +42,29 @@
     
   });
 
+    
+
+    
+
   //鏁版嵁姒傝
   layui.use(['admin', 'carousel', 'echarts'], function(){
     var $ = layui.$
     ,admin = layui.admin
     ,carousel = layui.carousel
     ,echarts = layui.echarts;
-    
+
+      //姹囨姤鍗曟暟閲�
+      var quantity = [];
+      //姹囨姤鏃堕棿杈栧尯
+      var time = [];
+
+      get_Display();
+
     var echartsApp = [], options = [
-      //浠婃棩娴侀噺瓒嬪娍
+      //浠婃棩浜ч噺瓒嬪娍
       {
         title: {
-          text: '浠婃棩娴侀噺瓒嬪娍',
+          text: '浠婃棩浜ч噺瓒嬪娍',
           x: 'center',
           textStyle: {
             fontSize: 14
@@ -67,7 +79,7 @@
         xAxis : [{
           type : 'category',
           boundaryGap : false,
-          data: ['06:00','06:30','07:00','07:30','08:00','08:30','09:00','09:30','10:00','11:30','12:00','12:30','13:00','13:30','14:00','14:30','15:00','15:30','16:00','16:30','17:00','17:30','18:00','18:30','19:00','19:30','20:00','20:30','21:00','21:30','22:00','22:30','23:00','23:30']
+          data: time
         }],
         yAxis : [{
           type : 'value'
@@ -76,14 +88,14 @@
           name:'PV',
           type:'line',
           smooth:true,
-          itemStyle: {normal: {areaStyle: {type: 'default'}}},
-          data: [111,222,333,444,555,666,3333,33333,55555,66666,33333,3333,6666,11888,26666,38888,56666,42222,39999,28888,17777,9666,6555,5555,3333,2222,3111,6999,5888,2777,1666,999,888,777]
+            itemStyle: { normal: { areaStyle: { type: 'default' } } },
+            data: quantity
         },{
           name:'UV',
           type:'line',
           smooth:true,
-          itemStyle: {normal: {areaStyle: {type: 'default'}}},
-          data: [11,22,33,44,55,66,333,3333,5555,12666,3333,333,666,1188,2666,3888,6666,4222,3999,2888,1777,966,655,555,333,222,311,699,588,277,166,99,88,77]
+            itemStyle: { normal: { areaStyle: { type: 'default' } } },
+            data: quantity
         }]
       },
       
@@ -181,6 +193,40 @@
     layui.admin.on('hash(tab)', function(){
       layui.router().path.join('') || renderDataView(carouselIndex);
     });
+
+
+
+      //鏌ヨ
+      function get_Display() {
+          var index = layer.load(0, { shade: false });
+          var ajaxLoad = layer.load();
+          //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
+          $.ajax({
+              url: GetWEBURL() + '/Web/GetICMOBillWorkQtyStatus_Tmp',
+              type: "GET",
+              async: false,
+              data: {},
+              success: function (data1) {
+                  if (data1.count == 1) {
+                      quantity = [];
+                      time = [];
+
+                      for (var i = 0; i < data1.data.length; i++) {
+                          time.push(data1.data[i].date);
+                          quantity.push(data1.data[i].quantity);
+                      }
+                      layer.close(ajaxLoad);
+                  } else {
+                      layer.close(ajaxLoad);
+                      layer.alert(data1.code + data1.Message, { icon: 5 });
+                  }
+              }, error: function () {
+                  layer.close(ajaxLoad);
+                  layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+              }
+          });
+          layer.close(index);
+      }
   });
 
   //鏈�鏂拌鍗�

--
Gitblit v1.9.1