From 9e03cef43d18178f1c12f1755f7abfc8af351cec Mon Sep 17 00:00:00 2001
From: 野心家 <1051256694@qq.com>
Date: 星期二, 05 九月 2023 14:13:39 +0800
Subject: [PATCH] #

---
 src/main/webapp/views/monitor/index.html |   56 ++++++++++++++++++++++++++++++++++----------------------
 1 files changed, 34 insertions(+), 22 deletions(-)

diff --git a/src/main/webapp/views/monitor/index.html b/src/main/webapp/views/monitor/index.html
index 698134e..f99362d 100644
--- a/src/main/webapp/views/monitor/index.html
+++ b/src/main/webapp/views/monitor/index.html
@@ -56,8 +56,8 @@
 </body>
 </html>
 <script>
-    let url = 'http://192.168.4.34:8080/fnwms'
-    var item = []
+    let url = 'http://10.12.55.200:8080/fnwms'
+    var item = [{locNo: '1',locSts: '1',mk: '1',packStatus$: '1'}]
     var year = '2020';
     var month = '05';
     var day = '01';
@@ -80,11 +80,23 @@
         //location.reload()
     },10000)
     function initTest() {
-        console.log(item)
         var box = ''
         var el
+        var len = item.length
+        var autoplay = true
+        var css = 'table-td'
+        if (len == 0) {
+            box = "<div class='swiper-none'>鏆傛棤娴嬭瘯鏁版嵁</div>"
+        } else if (len < 5) {
+            var itemInfo = {locNo: '',locSts: '',mk: '',packStatus$: ''}
+            for (var j = 0; j < 5-len;j++) {
+                css = 'table-td2'
+                autoplay = false
+                item.push(itemInfo)
+            }
+        }
         for (var i = 0; i < item.length; i++) {
-            el = "<div class='swiper-slide table-td'><div style='flex: 1'>"
+            el = "<div class='swiper-slide "+ css + " '><div style='flex: 1'>"
                 + item[i].locNo + "</div><div style='flex: 1'>"
                 + item[i].locSts  + "</div><div style='flex: 1'>"
                 + item[i].mk  + "</div><div style='flex: 1'>"
@@ -96,7 +108,7 @@
         var mySwiper = new Swiper ('.swiper', {
             direction: 'vertical', // 鍨傜洿鍒囨崲閫夐」
             loop: true, // 寰幆妯″紡閫夐」
-            autoplay:true,
+            autoplay:autoplay,
             slidesPerView: 5,
         })
     }
@@ -114,7 +126,7 @@
      * 鑾峰彇鏃堕棿
      */
     function getDate() {
-        http.get("http://localhost:9090/fnwcs/monitor/date", null, function (res) {
+        http.get("http://10.12.55.200:8080/fnwcs/monitor/date", null, function (res) {
             if (res.code === 200){
                 year = res.data.year;
                 month = res.data.month;
@@ -261,26 +273,27 @@
             {
                 name: '鍚堟牸',
                 type: 'bar',
-                itemStyle: {
-                  normal: {
-                      label: {
-                          show: true,
-                          position: 'top'
-                      }
-                  }
+                stack: 'Ad',
+                label: {
+                    show: true,
+                    fontSize: 16,
+                    fontWeight: 'bold',
+                    position: 'top',
+                    color: '#FFF',
+                    offset: [15,5],
                 },
+                z:99,
+                barWidth:'50%',
                 data: [10, 1]
             },
             {
                 name: '涓嶅悎鏍�',
                 type: 'bar',
-                itemStyle: {
-                    normal: {
-                        label: {
-                            show: true,
-                            position: 'top'
-                        }
-                    }
+                stack: 'Ad',
+                label: {
+                    show: true,
+                    fontSize: 16,fontWeight: 'bold',
+                    position: 'top',offset: [-15,5],
                 },
                 data: [9, 3]
             }
@@ -409,7 +422,6 @@
             }
         });
     }
-
     function initBasicInformation() {
         $.ajax({
             url: url+"/mobile/pack/basic/information",
@@ -420,7 +432,7 @@
                     for (var i = 0; i < res.data.length; i++) {
                         array.push(res.data[i])
                     }
-                    item =  array
+                    item = array
                 }
             }
         });

--
Gitblit v1.9.1