From 0d59d664b3b81e9264df6ad513d06b1b2c84c931 Mon Sep 17 00:00:00 2001
From: sgj <1442489573@qq.com>
Date: 星期五, 27 三月 2026 11:43:34 +0800
Subject: [PATCH] 大屏首页储量数量展示,仅展示散粮;抓拍跟踪图片展示业务逻辑调整

---
 fzzy-igdss-web/src/main/resources/static/group/index.js |  589 ++++++++++++++++++++--------------------------------------
 1 files changed, 206 insertions(+), 383 deletions(-)

diff --git a/fzzy-igdss-web/src/main/resources/static/group/index.js b/fzzy-igdss-web/src/main/resources/static/group/index.js
index 30cf5e1..bc422a4 100644
--- a/fzzy-igdss-web/src/main/resources/static/group/index.js
+++ b/fzzy-igdss-web/src/main/resources/static/group/index.js
@@ -1,59 +1,59 @@
 var nowClientWidth = document.documentElement.clientWidth; // 褰撳墠瑙嗗彛瀹藉害
 var hisVarietyChart = null;   // 鍝佺鏌辩姸鍥�
-var deptAreaAllList = null;   // 鎵�鏈夊簱鍖哄垪琛ㄤ俊鎭�
-var deptAreaList = null;      // 瀛樻斁鍒囨崲搴撳尯鍒楄〃淇℃伅
-var companyList = null;       // 鍏徃淇℃伅
-var deptCode = null;          // 褰撳墠闂儊鍦板尯鐨勭紪鐮�
-var timer1;     // 搴撳尯瀹氭椂
-var index1 = 0; // 搴撳尯鍒囨崲涓嬫爣
-var timer2;     // 绮鏁伴噺瀹氭椂
-var index2 = 0; // 绮鏁伴噺鍒囨崲涓嬫爣
-var number2 = 2;// 绮鏁伴噺鍒囨崲鎬绘暟閲�
-var timer3;     // 鍌ㄩ噺楗煎浘瀹氭椂
-var index3 = 0; // 鍌ㄩ噺楗煎浘鍒囨崲涓嬫爣
-var number3 = 2;// 鍌ㄩ噺楗煎浘鍒囨崲鎬绘暟閲�
-
+var deptList = null;   // 鎵�鏈夊簱鍖哄垪琛ㄤ俊鎭�
+var snapList = null;          // 褰撳墠闂儊鍦板尯鐨勭紪鐮�
+var deptListMap = {};
+var timer;     // 搴撳尯瀹氭椂
+var deptNum = 0;  //搴撳尯鍒囨崲涓嬫爣
 var mapChart = null;
 var geoMap = [{name: '浼婄妬鍝堣惃鍏嬭嚜娌诲窞', value: [81.317946, 43.92186]}]; //榛樿鐐逛綅
 var map = chinaMapOutline; //榛樿鍔犺浇鍏ㄥ浗鍦板浘
+
 $(function () {
     // 鍒濆鍖栭〉闈�
     init();
 
     // 鍒濆鍖朩ebSocket
-    initWS(companyId,bizType, bizTag, userId);
+    // initWS(companyId,bizType, bizTag, userId);
 });
 
 // 鍒濆鍖栭〉闈�
 function init() {
     // 閫傚簲灞忓箷澶у皬
     initScrollbar();
-    // 鏃堕棿
-    initTime();
+
     // 鍒濆鍖栧浘琛�
     initChart();
-    //鍒濆鍖栨爣璇�
-    initDicSlogan();
+
     //鍒濆鍖栧湴鍥�
     initMap();
+
+    // 鏃堕棿
+    initTime();
+
+    if (deptAllList) {
+        for (var i = 0; i < deptAllList.length; i++) {
+            deptListMap[deptAllList[i].id] = deptAllList[i].kqmc;
+        }
+    }
+
+    //鍒濆鍖栨爣璇�
+    initDicSlogan();
+
     //鍔犺浇鎸囧畾鍦板尯鍦板浘
     renderMapPoints("涔岄瞾鏈ㄩ綈甯�,鍏嬫媺鐜涗緷甯�,鍚愰瞾鐣競,鍝堝瘑甯�,鏄屽悏鍥炴棌鑷不宸�,鍗氬皵濉旀媺钂欏彜鑷不宸�,宸撮煶閮钂欏彜鑷不宸�,闃垮厠鑻忓湴鍖�,鍏嬪瓬鍕掕嫃鏌皵鍏嬪瓬鑷不宸�,鍠�浠�鍦板尯,鍜岀敯鍦板尯,浼婄妬鍝堣惃鍏嬭嚜娌诲窞,濉斿煄鍦板尯,闃垮嫆娉板湴鍖�");
 
-    //TODO 缁熻鐩稿叧鏁伴噺淇℃伅锛屽寘鍚簱鐐瑰強绮鏁伴噺
-    // ajaxFoodNum();
+    //缁熻鐩稿叧鏁伴噺淇℃伅锛屽寘鍚簱鐐瑰強绮鏁伴噺
+    ajaxFoodNum();
 
-    //TODO 璇锋眰鐩戠搴撳尯淇℃伅
-    // ajaxDeptArea();
+    //璇锋眰鐩戠搴撳尯淇℃伅
+    ajaxDeptList();
 
-    //TODO 璇锋眰AI浜嬩欢淇℃伅
-    // ajaxMsg();
+    //璇锋眰鎶撴媿璺熻釜淇℃伅
+    ajaxSnapList();
 
-    //TODO 璇锋眰鎶撴媿璺熻釜淇℃伅
-    // ajaxFoodNum();
-
-    //鎶撴媿璺熻釜婊氬姩
-    jQuery(".block2").slide({ mainCell: ".bd ul", autoPage: true, effect: "topLoop", autoPlay: true, vis: 4 });
-    jQuery(".follow").slide({ mainCell: ".bd ul", autoPlay: true, effect: "leftMarquee", vis: 5, interTime: 50 });
+    clearInterval(timer);
+    timing();
 }
 
 // socket淇℃伅杩斿洖铏曠悊
@@ -63,6 +63,77 @@
         dicSlogan = data;
         initDicSlogan();
     }
+}
+
+/**
+ * 璇锋眰鑾峰彇搴撳尯鐩稿叧淇℃伅
+ */
+function ajaxSnapList() {
+    snapList = null;
+    $.ajax({
+        type: "POST",
+        url: "/group/index-snap-list",
+        dataType: "json",
+        contentType: "application/json;charset=UTF-8",
+        data: JSON.stringify({
+            "companyId": companyId,
+            "deptId": deptId
+        }),
+        success: function (result) {
+            if (result.code == "0000") {
+                snapList = result.data;
+                renderSnap();
+            }
+        },
+        error: function (error) {
+
+        }
+    });
+}
+
+function renderSnap() {
+    var html = '';
+    if (snapList != null && snapList.length > 0) {
+        $.each(snapList, function (index, item) {
+            html += '<li style="float: left; width: 246px;">';
+            html += '<div class="item">';
+            html += '<div class="pic">';
+            html += '<img src="' + item.imgName + '" alt="">';
+            html += '</div><div class="tit">' + item.time + '</div>';
+            html += '<div class="tit" style="white-space: nowrap;">' + deptListMap[item.deptId] + '</div>';
+            html += '</div></li>';
+        })
+    } else {
+        $.each(deptAllList, function (index, item) {
+            html += '<li style="float: left; width: 246px;">';
+            html += '<div class="item">';
+            html += '<div class="pic">';
+            html += '<img src="/img/img-fail.jpg" alt="">';
+            html += '</div><div class="tit">杩戞湡鏆傛棤鎶撴媿鍥�</div>';
+            html += '<div class="tit" style="white-space: nowrap;">' + item.kqmc + '</div>';
+            html += '</div></li>';
+        })
+    }
+    $("#snapList").html(html);
+
+    //鎶撴媿璺熻釜婊氬姩
+    jQuery(".block2").slide({mainCell: ".bd ul", autoPage: true, effect: "topLoop", autoPlay: true, vis: 4});
+    jQuery(".follow").slide({mainCell: ".bd ul", autoPlay: true, effect: "leftMarquee", vis: 5, interTime: 40});
+
+}
+
+/**
+ * 搴撳尯瀹氭椂鍒囨崲
+ */
+function timing() {
+    timer = setInterval(function () {
+        if (deptNum === deptList.length) {
+            deptNum = 0;
+        }
+
+        renderDeptInfo();
+        deptNum += 1;
+    }, 5000);
 }
 
 //鍔犺浇搴撳尯鍦板浘浣嶇疆
@@ -77,11 +148,11 @@
 
 //鍔犺浇鎸囧畾鍦板尯鍦板浘鍜岀偣浣�
 function renderMapPoints(areaName) {
-    if(!areaName){
+    if (!areaName) {
         return;
     }
     var names = areaName.split(",");
-    if(names.length < 1){
+    if (names.length < 1) {
         return;
     }
 
@@ -96,15 +167,15 @@
     geoMap = [];
     for (var j = 0; j < names.length; j++) {
         for (var i = 0; i < all.length; i++) {
-            if(all[i].properties.name == names[j]){
+            if (all[i].properties.name === names[j]) {
                 map.features.push(all[i]);
-                if(all[i].properties.name == "浼婄妬鍝堣惃鍏嬭嚜娌诲窞"){
-                    geoMap.push({
-                        name: all[i].properties.centerName,
-                        value: [all[i].properties.center[0], all[i].properties.center[1], 12]
-                    });
-                }
-                renderMap();
+                // if(all[i].properties.name === "浼婄妬鍝堣惃鍏嬭嚜娌诲窞"){
+                geoMap.push({
+                    name: all[i].properties.centerName,
+                    value: [all[i].properties.center[0], all[i].properties.center[1], 12]
+                });
+                // }
+                // renderMap();
                 break;
             }
         }
@@ -122,7 +193,7 @@
     echarts.registerMap('chinaMapOutline', map);
 
     var option = {
-        backgroundColor:'transparent',
+        backgroundColor: 'transparent',
         tooltip: {
             show: false,
             trigger: 'item'
@@ -239,7 +310,7 @@
                 type: 'effectScatter',
                 coordinateSystem: 'geo',
                 data: geoMap,
-                symbolSize:  function (val) {
+                symbolSize: function (val) {
                     return val[2];
                 },
                 rippleEffect: {
@@ -268,37 +339,69 @@
         ]
     };
 
-    myChart.setOption( option );
+    myChart.setOption(option);
     mapChart = {"chart": myChart, "option": option};
 }
 
 /**
- * 鑾峰彇鍏徃淇℃伅
+ * 鏇存柊AI鍔ㄦ�佸垎鏋�
+ * @param data
  */
-function ajaxCompany() {
-    $.ajax({
-        type: "POST",
-        url: "../../visual/index-company",
-        dataType: "json",
-        contentType: "application/json;charset=UTF-8",
-        data: JSON.stringify({
-            "companyId": companyId
-        }),
-        success: function (result) {
-            if (result.code == "0000") {
-                companyList = result.data;
+function renderMsg() {
+    var html = '';
+    var num1 = '';
+    var num7 = '';
+    var flag = false;
+    if (deptList != null && deptList.length > 0) {
+        $.each(deptList, function (index, item) {
+            if (item.dailyTotal === 0) {
+                num1 = '褰撴棩涓�鍒囨甯�';
+            } else if (item.dailyTotal < 0) {
+                num1 = '鏈娴嬪埌缃戝叧';
+            } else {
+                num1 = '褰撴棩鏁伴噺' + item.dailyTotal + '涓�';
             }
-        }
-    });
+            if (item.warnNum7 === 0) {
+                num7 = '杩戜竷澶╀竴鍒囨甯�';
+            } else {
+                num7 = '杩戜竷澶╂暟閲�' + item.warnNum7 + '涓�';
+            }
+            html += '<div class="panel-content-body-tr">';
+            if (item.dailyTotal > 0) {
+                flag = true;
+            }
+            // if (item.warnNum7 > 10) {
+            //     flag = true;
+            //     html += '<span class="body-item sp" style="color: #bc2032;flex: 1.5;">' + item.deptName + '</span>';
+            //     html += '<span class="body-item sp" style="color: #bc2032;">' + num1 + '</span>';
+            //     html += '<span class="body-item sp" style="color: #bc2032;">' + num7 + '</span>';
+            // } else if (item.warnNum7 > 1 && item.warnNum7 < 10) {
+            //     flag = true;
+            //     html += '<span class="body-item sp" style="color: #f37b3d;flex: 1.5;">' + item.deptName + '</span>';
+            //     html += '<span class="body-item sp" style="color: #f37b3d;">' + num1+ '</span>';
+            //     html += '<span class="body-item sp" style="color: #f37b3d;">' + num7 + '</span>';
+            // }else {
+            html += '<span class="body-item sp" style="flex: 1.5;">' + item.deptName + '</span>';
+            html += '<span class="body-item sp">' + num1 + '</span>';
+            html += '<span class="body-item sp">' + num7 + '</span>';
+            // }
+            html += '</div>';
+        })
+    }
+    if (flag) {
+        $("#panel-title").html('搴撳尯AI浜嬩欢淇℃伅  <i class="dot"></i>');
+    }
+    $("#inventoryInfo").html(html);
 }
 
 /**
- * 璇锋眰鑾峰彇鍔ㄦ�佷俊鎭�
+ * 璇锋眰鑾峰彇搴撳尯鐩稿叧淇℃伅
  */
-function ajaxMsg() {
+function ajaxDeptList() {
+    deptList = null;
     $.ajax({
         type: "POST",
-        url: "../../visual/index-info",
+        url: "/group/index-dept-list",
         dataType: "json",
         contentType: "application/json;charset=UTF-8",
         data: JSON.stringify({
@@ -306,7 +409,9 @@
         }),
         success: function (result) {
             if (result.code == "0000") {
-                renderMsg(result.data);
+                deptList = result.data;
+                renderDeptInfo();
+                renderMsg();
             }
         },
         error: function (error) {
@@ -315,103 +420,21 @@
     });
 }
 
-// 鏇存柊鍔ㄦ�佷俊鎭�
-function renderMsg(data) {
-    var html = '';
-    var flag = false;
-    var num1 = '';
-    var num7 = '';
-    if (data != null && data.length > 0) {
-        $.each(data, function (index, item) {
-            var deptAreaId = item.deptAreaId;
-            if(item.dailyTotal === 0){
-                num1 = '褰撴棩涓�鍒囨甯�';
-            }else{
-                num1 = '褰撴棩鏁伴噺'+ item.dailyTotal + '涓�';
-            }
-            if(item.warnNum7 === 0){
-                num7 = '杩戜竷澶╀竴鍒囨甯�';
-            }else{
-                num7 = '杩戜竷澶╂暟閲�'+ item.warnNum7 + '涓�';
-            }
-            html += '<div class="panel-content-body-tr">';
-            if (item.level && item.level === "01") {
-                flag = true;
-                // html += '<img src="../../static/images/visual/l1.png"  style="width:10%; height:85%;" alt="">';
-                html += '<span class="body-item sp" style="color: #bc2032;" onclick=\"toAiHome('+'\''+ deptAreaId+'\'' + ')\" >' + item.deptAreaName + '</span>';
-                html += '<span class="body-item sp" style="color: #bc2032;">' + num1 + '</span>';
-                html += '<span class="body-item sp" style="color: #bc2032;">' + num7 + '</span>';
-                // html += '<span class="body-item" style="color: #bc2032; flex: 0.3;">' + item.createTime + '</span>';
-            } else if (item.level && item.level === "02") {
-                flag = true;
-                // html += '<img src="../../static/images/visual/l2.png" style="width:10%; height:85%;" alt="">';
-                html += '<span class="body-item sp" style="color: #f37b3d;" onclick=\"toAiHome('+'\''+ deptAreaId+'\'' + ')\"  >' + item.deptAreaName + '</span>';
-                html += '<span class="body-item sp" style="color: #f37b3d;">' + num1+ '</span>';
-                html += '<span class="body-item sp" style="color: #f37b3d;">' + num7 + '</span>';
-                // html += '<span class="body-item" style="color: #f37b3d; flex: 0.3;">' + item.createTime + '</span>';
-            } else if (item.level && item.level === "03"){
-                flag = true;
-                // html += '<img src="../../static/images/visual/l3.png" style="width:10%; height:85%;" alt="">';
-                html += '<span class="body-item sp"  onclick=\"toAiHome('+'\''+ deptAreaId+'\'' + ')\" >' + item.deptAreaName + '</span>';
-                html += '<span class="body-item sp">' + num1 + '</span>';
-                html += '<span class="body-item sp">' + num7 + '</span>';
-                // html += '<span class="body-item" style="flex: 0.3;">' + item.createTime + '</span>';
-            }else {
-                flag = true;
-                // html += '<img src="../../static/images/visual/l3.png" style="width:10%; height:85%;" alt="">';
-                html += '<span class="body-item sp"  onclick=\"toAiHome('+'\''+ deptAreaId+'\'' + ')\" >' + item.deptAreaName + '</span>';
-                html += '<span class="body-item sp">' + num1 + '</span>';
-                html += '<span class="body-item sp">' + num7 + '</span>';
-                // html += '<span class="body-item" style="flex: 0.3;">' + item.createTime + '</span>';
-            }
-            html += '</div>';
-        })
-    } else {
-        if (deptAreaList != null && deptAreaList.length > 0) {
-            $.each(deptAreaList, function (index, item) {
-                html += '<div class="panel-content-body-tr">';
-                html += '<span class="body-item sp">' + item.name + '</span>';
-                html += '<span class="body-item sp">' + '褰撴棩鍒嗘瀽涓�鍒囨甯�' + '</span>';
-                html += '<span class="body-item" style="flex: 0.3;">' + formatDate('mm/dd', new Date()) + '</span>';
-                html += '</div>';
-            });
-        }
+/**
+ * 娓叉煋搴撳尯淇℃伅
+ */
+function renderDeptInfo() {
+    if (deptList == null || deptList.length <= 0) {
+        return;
     }
-    $("#panel-title").html('鐩戠鍔ㄦ�佷俊鎭�  <i class="dot"></i>');
-    $("#inventoryInfo").html(html);
-}
 
-/**
- * 璺宠浆鑷冲悗鍙伴璀﹂〉闈�
- * @param deptAreaId
- */
-function toAiHome(deptAreaId) {
-    var url = "../home?t=WarnInfo&deptAreaId="+deptAreaId;
-    window.parent.open(url, "_self");
-}
-
-/**
- * 璇锋眰鑾峰彇搴撳尯鐩稿叧淇℃伅
- */
-function ajaxDeptArea() {
-    // $.ajax({
-    //     type: "POST",
-    //     url: "../../visual/index-dept-area",
-    //     dataType: "json",
-    //     contentType: "application/json;charset=UTF-8",
-    //     data: JSON.stringify({
-    //         "companyId": companyId
-    //     }),
-    //     success: function (result) {
-    //         if (result.code == "0000") {
-    //             deptAreaAllList = result.data;
-    //             getChangeDeptArea(null);
-    //         }
-    //     },
-    //     error: function (error) {
-    //
-    //     }
-    // });
+    $("#county").html(deptList[deptNum].county);
+    $("#deptName").html(deptList[deptNum].deptName);
+    $("#inNum").html(deptList[deptNum].inNum);
+    $("#outNum").html(deptList[deptNum].outNum);
+    $("#depotNumber").html(deptList[deptNum].depotNumber);
+    $("#depotBankNumber").html(deptList[deptNum].depotBankNumber);
+    $("#storageNum").html(deptList[deptNum].storageNum);
 
     //鍔犺浇搴撳尯鍦板浘
     geoMap = updateDeptMap();
@@ -420,15 +443,15 @@
 
 function updateDeptMap() {
     var points = [];
-    $.each(deptList, function(index, item) {
+    $.each(deptList, function (index, item) {
         var val = [];
         var name = '';
-        // if(index == deptNum){
-        //     name = item.name;
-        //     val = [item.lon, item.lat, 17];
-        // }else {
+        if (index === deptNum) {
+            name = item.deptName;
+            val = [item.jd, item.wd, 17];
+        } else {
             val = [item.jd, item.wd, 8];
-        // }
+        }
         points.push({
             name: name,
             value: val
@@ -437,102 +460,21 @@
     return points;
 }
 
-/* ---------- 鑾峰彇瑕佸垏鎹㈠簱鍖虹殑鏁版嵁淇℃伅 ---------- */
-function getChangeDeptArea(id) {
-    deptAreaList = [];
-    index1 = 0;
-    clearInterval(timer1);
-
-    if (id) {
-        if (id === "511400") {
-            deptAreaList = deptAreaAllList;
-        } else {
-            if (deptAreaAllList != null && deptAreaAllList.length > 0) {
-                $.each(deptAreaAllList, function (index, item) {
-                    if (id.length > 6 && id == item.deptCompany) {
-                        deptAreaList.push(item);
-                    }
-                    if (id.length == 6 && id == item.deptCounty) {
-                        deptAreaList.push(item);
-                    }
-                })
-            }
-        }
-    } else {
-        deptAreaList = deptAreaAllList;
-    }
-
-    deptAreaSwitch();
-}
-
-/* ---------- 搴撳尯瀹氭椂鍒囨崲 ---------- */
-function deptAreaSwitch() {
-    timer1 = setInterval(function () {
-        if (index1 == deptAreaList.length) {
-            index1 = 0;
-        }
-
-        renderDeptArea();
-
-        index1 += 1;
-
-    }, 3000);
-}
-
-// 鏇存柊搴撳尯淇℃伅
-function renderDeptArea() {
-
-    if (deptAreaList == null || deptAreaList.length <= 0) {
-        return;
-    }
-
-    $("#cityAndCounty").html(deptAreaList[index1].deptCityName + "-" + deptAreaList[index1].deptCountyName);
-    $("#deptAreaName").html(deptAreaList[index1].name);
-    $("#depotNum").html(deptAreaList[index1].depotNum == null ? "0" : deptAreaList[index1].depotNum);
-    $("#depotOilNum").html(deptAreaList[index1].depotOilNum == null ? "0" : deptAreaList[index1].depotOilNum);
-
-    if (deptAreaList[index1].storageStr.length > 9
-        || deptAreaList[index1].oilStorageStr.length > 9
-        || deptAreaList[index1].areaStr.length > 9) {
-        $("#foodNum").css("font-size", "28px");
-        $("#oilNum").css("font-size", "28px");
-        $("#area").css("font-size", "28px");
-    } else if(deptAreaList[index1].storageStr.length > 5
-        || deptAreaList[index1].oilStorageStr.length > 5
-        || deptAreaList[index1].areaStr.length > 5){
-        $("#foodNum").css("font-size", "30px");
-        $("#oilNum").css("font-size", "30px");
-        $("#area").css("font-size", "30px");
-    } else {
-        $("#foodNum").css("font-size", "46px");
-        $("#oilNum").css("font-size", "46px");
-        $("#area").css("font-size", "46px");
-    }
-    $("#foodNum").html(deptAreaList[index1].storageStr);
-    $("#oilNum").html(deptAreaList[index1].oilStorageStr);
-    $("#area").html(deptAreaList[index1].areaStr);
-
-    if (deptCode) {
-        $("#" + deptCode).removeClass("kuqu-h");
-    }
-    deptCode = deptAreaList[index1].deptCounty;
-    $("#" + deptCode).addClass("kuqu-h");
-}
 
 /**
- * 璇锋眰鑾峰彇鐩稿叧鏁伴噺淇℃伅
+ * 璇锋眰鑾峰彇缁熻鏁伴噺淇℃伅
  */
 function ajaxFoodNum() {
     $.ajax({
         type: "POST",
-        url: "../../visual/index-food-number",
+        url: "/group/index-num",
         dataType: "json",
         contentType: "application/json;charset=UTF-8",
         data: JSON.stringify({
             "companyId": companyId
         }),
         success: function (result) {
-            if (result.code == "0000") {
+            if (result.code === "0000") {
                 var data = result.data;
                 renderFoodNum(data);
             }
@@ -543,7 +485,10 @@
     });
 }
 
-// 鏇存柊搴撳尯淇℃伅
+/**
+ * 娓叉煋缁熻鏁伴噺淇℃伅
+ * @param data
+ */
 function renderFoodNum(data) {
 
     if (!data) {
@@ -552,24 +497,20 @@
 
     /*----- 鐩戠搴撶偣淇℃伅 -----*/
     $("#companyNum").html(data.companyNum);
-    $("#deptAreaNum").html(data.deptAreaNum);
-    $("#depotSum").html(data.depotNum);
+    $("#deptNum").html(data.deptNum);
+    $("#depotNum").html(data.depotNum);
+    $("#depotBankNum").html(data.depotBankNum);
 
     /*----- 鐩戠鏁伴噺淇℃伅 -----*/
-    if (data.foodSum.length > 8 || data.oilSum.length > 8) {
+    // if (data.foodSum.length > 8 || data.packFoodSum.length > 8) {
+    //     $("#foodSum").css("font-size", "32px");
+    //     $("#packFoodSum").css("font-size", "32px");
+    // }
+    if (data.foodSum.length > 8) {
         $("#foodSum").css("font-size", "32px");
-        $("#oilSum").css("font-size", "32px");
     }
     $("#foodSum").html(data.foodSum);
-    $("#oilSum").html(data.oilSum);
-
-    if (data.goodsFoodSum.length > 8 || data.goodsOilSum.length > 8) {
-        $("#goodsFoodSum").css("font-size", "32px");
-        $("#goodsOilSum").css("font-size", "32px");
-    }
-    $("#goodsFoodSum").html(data.goodsFoodSum);
-    $("#goodsOilSum").html(data.goodsOilSum);
-
+    // $("#packFoodSum").html(data.packFoodSum);
 
     /*----- 鍒嗗搧绉嶆煴鐘跺浘 -----*/
     if (data.xaxis.length > 0 && data.seriesData.length > 0) {
@@ -579,125 +520,6 @@
         hisFoodVariety.chart.setOption(hisFoodVariety.option, true);
         hisVarietyChart = hisFoodVariety;
     }
-
-    // 绮鐩戠鏁伴噺鍒囨崲
-    foodNumSwitch();
-    // 绮楗煎浘鍒囨崲
-    pieChartSwitch();
-}
-
-/* ---------- 绮鏁伴噺鐩戠鍒囨崲 ---------- */
-function foodNumSwitch() {
-    $(".lb-body .right-topInfo-jg").eq(0).show().siblings().hide();
-    StartLunbo();
-
-    $(".lb-tab").hover(function () {
-        clearInterval(timer2);
-        index2 = $(this).index();
-        ShowPicTab();
-    }, function () {
-        StartLunbo();
-    });
-
-    $(".lb-btn1").click(function () {
-        clearInterval(timer2);
-        index2--;
-        if (index2 == -1) {
-            index2 = number2 - 1;
-        }
-
-        ShowPicTab();
-        StartLunbo();
-    });
-
-    $(".lb-btn2").click(function () {
-        clearInterval(timer2);
-        index2++;
-        if (index2 == number2) {
-            index2 = 0;
-        }
-        ShowPicTab();
-        StartLunbo();
-    });
-}
-
-function ShowPicTab() {
-    if (index2 === 0) {
-        $("#foodNumTitle").html("鍌ㄥ绮补");
-    } else if (index2 === 1) {
-        $("#foodNumTitle").html("鍟嗗搧绮补");
-    }
-    // else if (index2 === 2) {
-    //     $("#foodNumTitle").html("灏忓寘瑁呯伯娌�");
-    // }
-    $(".lb-body .right-topInfo-jg").eq(index2).fadeIn(300).siblings().fadeOut(300);
-    $(".lb-tab").eq(index2).addClass("bg").siblings().removeClass("bg");
-}
-
-function StartLunbo() {
-    timer2 = setInterval(function () {
-        index2++;
-        if (index2 >= number2) {
-            index2 = 0;
-        }
-        ShowPicTab();
-    }, 3000);
-}
-
-/* ---------- 绮楗煎浘鍒囨崲 ---------- */
-function pieChartSwitch() {
-    $(".tubiao-Carousel .stats-chart-box").eq(0).show().siblings().hide();
-    StartCarousel();
-
-    $(".carousel-tab").hover(function () {
-        clearInterval(timer3);
-        index3 = $(this).index();
-        ShowTubiao();
-
-    }, function () {
-        StartCarousel();
-    });
-
-    $(".carousel-btn1").click(function () {
-        clearInterval(timer3);
-        index3--;
-        if (index3 == -1) {
-            index3 = number3 - 1;
-        }
-
-        ShowTubiao();
-        StartCarousel();
-    });
-
-    $(".carousel-btn2").click(function () {
-        clearInterval(timer3);
-        index3++;
-        if (index3 == number3) {
-            index3 = 0;
-        }
-        ShowTubiao();
-        StartCarousel();
-    });
-}
-
-function ShowTubiao() {
-    if (index3 === 0) {
-        $("#pieCharTitle").html("绮鏁伴噺缁熻(鍚�)");
-    } else if (index3 === 1) {
-        $("#pieCharTitle").html("娌硅剛鏁伴噺缁熻(鍚�)");
-    }
-    $(".tubiao-Carousel .stats-chart-box").eq(index3).fadeIn(300).siblings().fadeOut(300);
-    $(".carousel-tab").eq(index3).addClass("bg").siblings().removeClass("bg");
-}
-
-function StartCarousel() {
-    timer3 = setInterval(function () {
-        index3++;
-        if (index3 >= number3) {
-            index3 = 0;
-        }
-        ShowTubiao();
-    }, 3000);
 }
 
 // 鍒锋柊鏃堕棿
@@ -740,12 +562,13 @@
     return document.getElementById('inventoryInfo').clientHeight > document.getElementById('inventoryInfoBox').clientHeight;
 }
 
-// 鍒濆鍖栧浘琛�
+/**
+ * 鍒濆鍖栧浘琛�
+ */
 function initChart() {
-
     /* 搴撳瓨鍥捐〃鍔犺浇 */
     allInventoryChartLoad(
-        ['灏忛害', '鐜夌背', '绋昏胺', '鎴愬搧绮�',  '鎴愬搧娌�', '鍏朵粬'],
+        ['灏忛害', '鐜夌背', '绋昏胺', '鎴愬搧绮�', '鎴愬搧娌�', '鍏朵粬'],
         [1000, 1200, 1500, 1300, 1100, 1600]
     );
 }

--
Gitblit v1.9.3