From 55d23f727dbf9f8350dd29c87b2b706025937b35 Mon Sep 17 00:00:00 2001
From: 野心家 <1051256694@qq.com>
Date: 星期一, 04 九月 2023 18:45:14 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/zjfnwcs' into zjfnwcs

---
 src/main/webapp/views/monitor/css/index.css |   13 ++++++
 src/main/webapp/views/monitor/index.html    |   54 ++++++++++++++++----------
 2 files changed, 46 insertions(+), 21 deletions(-)

diff --git a/src/main/webapp/views/monitor/css/index.css b/src/main/webapp/views/monitor/css/index.css
index d4d6c51..05a5f70 100644
--- a/src/main/webapp/views/monitor/css/index.css
+++ b/src/main/webapp/views/monitor/css/index.css
@@ -96,6 +96,11 @@
     align-items: center;
     font-size: 18px;
 }
+.table-td2 {
+    display: flex;
+    align-items: center;
+    font-size: 18px;
+}
 .table-td:nth-child(even) {
     background-color: rgba(90, 163, 172, 0.3);
 }
@@ -120,4 +125,12 @@
     height: 10%;
     text-align: center;
     color: #FFF;
+}
+.swiper-none {
+    height: 100%;
+    width: 100%;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    font-size: 40px;
 }
\ No newline at end of file
diff --git a/src/main/webapp/views/monitor/index.html b/src/main/webapp/views/monitor/index.html
index 698134e..4a06c80 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://192.168.4.188:8085/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,
         })
     }
@@ -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