From 04a9dc98aab72d4cda3d24be233d82c712b4122b Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期二, 17 十一月 2020 10:17:20 +0800
Subject: [PATCH] #

---
 src/main/webapp/views/monitor/monitor.html |   26 +++++++++++++++-----------
 1 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/src/main/webapp/views/monitor/monitor.html b/src/main/webapp/views/monitor/monitor.html
index 7bdb4b6..e5807f2 100644
--- a/src/main/webapp/views/monitor/monitor.html
+++ b/src/main/webapp/views/monitor/monitor.html
@@ -296,7 +296,7 @@
                             鍦ㄥ簱
                         </div>
                         <div class="elem-footer">
-                            3,300
+                            <span id="stock-count">0</span>
                         </div>
                     </div>
                     <div class="top-footer-elem">
@@ -306,7 +306,7 @@
                             绌哄簱
                         </div>
                         <div class="elem-footer">
-                            161
+                            <span id="empty-count">0</span>
                         </div>
                     </div>
                     <div class="top-footer-elem">
@@ -316,7 +316,7 @@
                             浣跨敤涓�
                         </div>
                         <div class="elem-footer">
-                            666
+                            <span id="used-count">0</span>
                         </div>
                     </div>
                 </div>
@@ -486,7 +486,7 @@
         legend: {
             orient: 'vertical',
             left: 10,
-            data: ['鍦ㄥ簱搴撲綅', '绌哄簱浣�', '浣跨敤搴撲綅', '绂佺敤搴撲綅']
+            data: ['鍦ㄥ簱', '绌�']
         },
         series: [
             {
@@ -509,10 +509,10 @@
                     show: false
                 },
                 data: [
-                    {value: 1, name: '鍦ㄥ簱搴撲綅'},
-                    {value: 1, name: '绌哄簱浣�'},
-                    {value: 1, name: '浣跨敤搴撲綅'},
-                    {value: 1, name: '绂佺敤搴撲綅'},
+                    {value: 1, name: '鍦ㄥ簱'},
+                    {value: 1, name: '绌�'},
+                    {value: 1, name: '浣跨敤'},
+                    {value: 1, name: '绂佺敤'},
                 ],
                 itemStyle: {
                     emphasis: {
@@ -533,7 +533,6 @@
             }
         ]
     };
-    // pieCharts.setOption(pieChartOption)
     // 楗煎浘鍔犺浇
     function initPieChart() {
         $.ajax({
@@ -541,8 +540,13 @@
             method: 'GET',
             success: function (res) {
                 if (res.code === 200){
-                    pieChartOption.series[0].data = res.data;
-                    pieCharts.setOption(pieChartOption)
+                    console.log(res.data);
+                    pieChartOption.series[0].data = res.data.pie;
+                    pieCharts.setOption(pieChartOption);
+
+                    $('#stock-count').text(res.data.stockCunt);
+                    $('#empty-count').text(res.data.emptyCount);
+                    $('#none-count').text(res.data.noneCount);
                 } else if (res.code === 403){
                     top.location.href = "/";
                 } else {

--
Gitblit v1.9.1