From a1282a38396443dff9b8406d1b7145cebdb5259d Mon Sep 17 00:00:00 2001
From: sgj <1442489573@qq.com>
Date: 星期三, 25 三月 2026 14:26:44 +0800
Subject: [PATCH] 监管gis,两侧背景图颜色调整

---
 fzzy-igdss-web/src/main/resources/static/group/gis.js |  122 ++++++++++++++++++++++++++++------------
 1 files changed, 85 insertions(+), 37 deletions(-)

diff --git a/fzzy-igdss-web/src/main/resources/static/group/gis.js b/fzzy-igdss-web/src/main/resources/static/group/gis.js
index 01bad7f..5c84d60 100644
--- a/fzzy-igdss-web/src/main/resources/static/group/gis.js
+++ b/fzzy-igdss-web/src/main/resources/static/group/gis.js
@@ -6,6 +6,7 @@
 var markers = [];//鐐规爣璁�
 var type = "0";
 var county = "all";
+var breedChart = null;
 
 //var switch2AreaNode2;
 
@@ -13,7 +14,7 @@
     //鎵�鏈夊簱鍖�
     if (deptList) {
         for (var i = 0; i < deptList.length; i++) {
-            deptListMap[deptList[i].id] = deptList[i];
+            deptListMap[deptList[i].deptId] = deptList[i];
         }
     }
     //鎵�鏈夌渷甯�
@@ -29,21 +30,36 @@
     //鍒濆鍖栧湴鍥�
     initMap();
 
-    //宸︿晶鍥捐〃
+    //鍒濆鍖栧乏渚у浘琛�
     pieChartLoad(
         [
-            {value: "0.000", name: '绋昏胺'},
-            {value: "0.000", name: '鐜夌背'},
-            {value: "0.000", name: '灏忛害'}
+            {value: "0", name: '浼婂畞甯�'},
+            {value: "0", name: '濂庡悲甯�'},
+            {value: "0", name: '闇嶅皵鏋滄柉甯�'},
+            {value: "0", name: '浼婂畞鍘�'},
+            {value: "0", name: '瀵熷竷鏌ュ皵閿′集鑷不鍘�'},
+            {value: "0", name: '闇嶅煄鍘�'},
+            {value: "0", name: '宸╃暀鍘�'},
+            {value: "0", name: '鏂版簮鍘�'},
+            {value: "0", name: '鏄嫃鍘�'},
+            {value: "0", name: '鐗瑰厠鏂幙'},
+            {value: "0", name: '灏煎嫆鍏嬪幙'}
         ],
         'breedChart'
     );
+    window.onresize = function (e) {
+        if (breedChart) {
+            breedChart.resize();
+        }
+    }
 
     //娓叉煋閮ㄩ棬
     renderList();
 
+    renderNum();
+    //瀹氫綅鍒版柊鐤嗙渷
     setTimeout(function () {
-        renderAreas(650000);
+        positioning("650000");
     }, 2000);
 
     $('.sup-menu-title').click(function(){
@@ -53,7 +69,6 @@
         } else{
             kai.addClass('menu-group')
         }
-
     });
     $('.sup-menu-h').click(function(){
         var kai2 = $(this).parents(".sup-menu-ul")
@@ -79,6 +94,19 @@
 }
 
 // 鍒锋柊鏃堕棿
+function positioning(code) {
+
+    var kai = $("#prov");
+    if (kai.hasClass('menu-group')) {
+        kai.removeClass('menu-group')
+    } else{
+        kai.addClass('menu-group')
+    }
+
+    renderAreas(code);
+}
+
+// 鍒锋柊鏃堕棿
 function initTime() {
     setInterval(function () {
         $("#navBarDate").html(formatDate('mm鏈坉d鏃�', new Date()));
@@ -90,7 +118,7 @@
 function initMap() {
     map = new AMap.Map('map_container', {
         center: [83.721646, 40.627714],
-        zoom: 5.6,
+        zoom: 9,
         mapStyle: 'amap://styles/41f8248740d3659ddc65dc363078592c',
         // rotateEnable:true,
         // pitchEnable:true,
@@ -147,7 +175,7 @@
         if (province && province.length > 0) {
             var str1 = province.substring(0, 2);
             for (var i = 0; i < deptList.length; i++){
-                if(deptList[i].xzqhdm.startsWith(str1)){
+                if(deptList[i].code.startsWith(str1)){
                     list.push(deptList[i]);
                 }
             }
@@ -156,7 +184,7 @@
         if (city && city.length > 0) {
             var str2 = city.substring(0, 4);
             for (var i = 0; i < deptList.length; i++) {
-                if(deptList[i].xzqhdm.startsWith(str2)){
+                if(deptList[i].code.startsWith(str2)){
                     list.push(deptList[i]);
                 }
             }
@@ -164,7 +192,7 @@
         //鍖哄幙
         if (county && county.length > 0) {
             for (var i = 0; i < deptList.length; i++) {
-                if(deptList[i].xzqhdm === county){
+                if(deptList[i].code === county){
                     list.push(deptList[i]);
                 }
             }
@@ -240,7 +268,7 @@
         var areas = [];
         for (var i = 0; i < areaList.length; i++) {
             html += "<div style=\"width: 305px; overflow: hidden\">" +
-                "<div class=\"sup-menu-group menu-group\">" +
+                "<div id='prov' class=\"sup-menu-group menu-group\">" +
                 "<div class=\"sup-menu-title\">" +
                 "<i class=\"i-icon fl\"><img src=\"/img/web/group/icon-sj.png\"/></i>" +
                 "<a href=\"###\" onclick=\"renderAreas('" + areaList[i].code + "')\">" +
@@ -278,13 +306,12 @@
                                     html += "<div class=\"sup-menu-box\">" +
                                         "<p>" +
                                         "<span class=\"i-icon32 fl\"><img src=\"/img/web/group/icon-kuqu.png\"/></span>" +
-                                        "<a href=\"#\" onclick=\"showAreaInfo('" + areas[k].id + "')\">" + areas[k].kqmc + "</a>" +
+                                        "<a href=\"#\" onclick=\"showAreaInfo('" + areas[k].deptId + "')\">" + areas[k].deptName + "</a>" +
                                         "</p>" +
                                         "</div>";
                                 }
                             }
-                            html += "</li>" +
-                                "</ul>";
+                            html += "</li></ul>";
                         }
                     } else {
                         //娌℃湁瀛愯妭鐐癸紝鐩存帴灏辨槸搴撳尯
@@ -297,13 +324,12 @@
                                     "<i class=\"i-icon fl\"><img src=\"/img/web/group/icon-sj.png\"/></i>" +
                                     "<a href=\"###\" onclick=\"renderAreas('" + areas[k].code + "')\">" +
                                     "<span class=\"i-icon32 fl\"><img src=\"/img/web/group/icon-kuqu.png\"/></span>" +
-                                    (areas[k].name ? areas[k].name : "") +
+                                    (areas[k].deptName ? areas[k].deptName : "") +
                                     "</a>" +
                                     "</div>";
                                 html += "<div class=\"sup-menu-box\">" +
                                     "</div>";
-                                html += "</li>" +
-                                    "</ul>";
+                                html += "</li></ul>";
 
                             }
                         }
@@ -338,6 +364,28 @@
 
         $("#menuDiv").html(html);
     }
+}
+
+function renderNum() {
+    $("#foodSum").html(gisData.deptNum);
+
+    var foodNumPerHtml = '';
+    var color = ["0, 228, 250", "22, 226, 173", "255, 181, 23", "238, 60, 72", "135, 103, 255", "41, 122, 255", "238, 60, 144", "0, 228, 250", "22, 226, 173", "255, 181, 23", "238, 60, 72", "135, 103, 255", "41, 122, 255", "238, 60, 144"];
+    for (var i = 0; i < gisData.deptList.length; i++) {
+        foodNumPerHtml += '<li><div class="con" style="background-color: rgba('+color[i]+',.05);">';
+        foodNumPerHtml += '<div class="dot" style="background-color: rgb('+color[i]+');"></div>';
+        foodNumPerHtml += '<div class="num" style="color: rgb('+color[i]+');">'+gisData.deptList[i].percent+'%</div>';
+        foodNumPerHtml += '<div class="type">'+gisData.deptList[i].name+'</div>';
+        foodNumPerHtml += '</div></li>';
+    }
+    $("#foodNumPer").html(foodNumPerHtml);
+    if (gisData.deptList.length > 0) {
+        var varietyChart = breedChart;
+        varietyChart.option.series[0].data = gisData.deptList;
+        varietyChart.chart.setOption(varietyChart.option, true);
+        breedChart = varietyChart;
+    }
+    barChartLoad("ss");
 }
 
 /**
@@ -417,7 +465,7 @@
  * 鍒涘缓淇℃伅绐楀彛
  */
 function createInfoWindow(deptArea) {
-    var deptAreaId = deptArea.id;
+    var deptAreaId = deptArea.deptId;
     var content = "<div class=\"BMap_bubble_pop\" style=\"padding: 0px 8px; position: relative; top:0px !important;left:0px !important;cursor: default; border: 1px solid rgb(221, 221, 221); background-color: rgb(255, 255, 255); border-radius: 10px; left: 837px; top: -46px; width: 376px;\">" +
         "<div class=\"BMap_bubble_top\" style=\"height:31px\">" +
         "<div class=\"BMap_bubble_title\" style=\"line-height: 30px; overflow: hidden; height: 30px; white-space: nowrap; color: rgb(51, 51, 51); width: 376px;\">" +
@@ -436,10 +484,10 @@
         '<div style=\"height:100%;box-sizing:border-box;\">' +
         '<div style="height: 34px;">' +
         '<div style="width: 320px;float: left;">';
-    if (deptArea.kqmc.length > 17) {
-        content += '<h3 style="margin:0 0 10px 0;line-height:24px;font-size:14px;color:#fff;">' + (deptArea.kqmc ? deptArea.kqmc : "娌℃湁鑾峰彇鍒板簱鍖轰俊鎭�") + '</h3>';
+    if (deptArea.deptName.length > 17) {
+        content += '<h3 style="margin:0 0 10px 0;line-height:24px;font-size:14px;color:#fff;">' + (deptArea.deptName ? deptArea.deptName : "娌℃湁鑾峰彇鍒板簱鍖轰俊鎭�") + '</h3>';
     } else {
-        content += '<h3 style="margin:0 0 10px 0;line-height:24px;font-size:18px;color:#fff;">' + (deptArea.kqmc ? deptArea.kqmc : "娌℃湁鑾峰彇鍒板簱鍖轰俊鎭�") + '</h3>';
+        content += '<h3 style="margin:0 0 10px 0;line-height:24px;font-size:18px;color:#fff;">' + (deptArea.deptName ? deptArea.deptName : "娌℃湁鑾峰彇鍒板簱鍖轰俊鎭�") + '</h3>';
     }
     content += '</div>' +
         '<div style="width: 40px;float: left;">' +
@@ -447,38 +495,38 @@
         '</div>' +
         '</div>' +
 
-        '<p style="line-height:24px;font-size:12px;color:#fff;margin-right: 15px;"><img src="/img/web/group/icon-address.png" alt="" style="float:left;width: 16px;height: 16px;margin-right:3px;margin-top: 5px;"/>' + (deptArea.kqdz ? deptArea.kqdz + "(" + deptArea.jd + "," + deptArea.wd + ")" : "娌℃湁鑾峰彇鍒板簱鍖轰俊鎭�") + '</P>' +
+        '<p style="line-height:24px;font-size:12px;color:#fff;margin-right: 15px;"><img src="/img/web/group/icon-address.png" alt="" style="float:left;width: 16px;height: 16px;margin-right:3px;margin-top: 5px;"/>' + (deptArea.county ? deptArea.county : "娌℃湁鑾峰彇鍒板簱鍖轰俊鎭�") + '</P>' +
         '<div class="right-topInfo-kd " style="height: 80px;width: 270px;margin: 5px auto 10px auto;">' +
         '<div class="right-topInfo-kd-item">' +
-        '<h3>绮粨涓暟(涓�)</h3>' +
-        '<p>' + (deptArea.cfs ? deptArea.cfs : 0) + '</p>' +
+        '<h3>褰撴棩鍏ュ簱鍗曟暟(涓�)</h3>' +
+        '<p>' + (deptArea.inNum) + '</p>' +
         '</div>' +
         '<div class="right-topInfo-kd-item">' +
-        '<h3>娌圭綈涓暟(涓�)</h3>' +
-        '<p>' + (deptArea.cfs ? deptArea.cfs : 0) + '</p>' +
+        '<h3>褰撴棩鍑哄簱鍗曟暟(涓�)</h3>' +
+        '<p>' + (deptArea.outNum) + '</p>' +
         '</div>' +
         '</div>' +
         '<ul class="right-topInfo-kd-list right-topInfo-jg sup-topInfo-list">' +
         '<li>';
-    if (deptArea.cfs && (deptArea.cfs + "").length > 4) {
-        content += '<p style="font-size: 22px">' + (deptArea.cfs ? deptArea.cfs.toFixed(3) : 0) + '</p>';
+    if (deptArea.depotNumber && (deptArea.depotNumber + "").length > 4) {
+        content += '<p style="font-size: 22px">' + (deptArea.depotNumber) + '</p>';
     } else {
-        content += '<p style="font-size: 22px">' + (deptArea.cfs ? deptArea.cfs.toFixed(3) : 0) + '</p>';
+        content += '<p style="font-size: 22px">' + (deptArea.depotNumber) + '</p>';
 
     }
-    content += '<h3>绮鍌ㄩ噺(鍚�)</h3>' +
+    content += '<h3>浠撳簱鏁�(涓�)</h3>' +
         '</li>' +
         '<li>';
-    if (deptArea.cfs && (deptArea.cfs + "").length > 4) {
-        content += '<p style="font-size: 22px">' + (deptArea.cfs ? deptArea.cfs.toFixed(3) : 0) + '</p>';
+    if (deptArea.depotBankNumber && (deptArea.depotBankNumber + "").length > 4) {
+        content += '<p style="font-size: 22px">' + (deptArea.depotBankNumber) + '</p>';
     } else {
-        content += '<p style="font-size: 22px">' + (deptArea.cfs ? deptArea.cfs.toFixed(3) : 0) + '</p>';
+        content += '<p style="font-size: 22px">' + (deptArea.depotBankNumber) + '</p>';
     }
-    content += '<h3>妞嶇墿娌瑰偍閲�(鍚�)</h3>' +
+    content += '<h3>璐ㄦ娂浠撴暟(涓�)</h3>' +
         '</li>' +
         '<li>' +
-        '<p style="font-size: 22px" >' + (deptArea.zdmj ? deptArea.zdmj : 0) + '</p>' +
-        '<h3>鍗犲湴闈㈢Н锛堛帯锛�</h3>' +
+        '<p style="font-size: 22px" >' + (deptArea.storageNum) + '</p>' +
+        '<h3>搴撳瓨鏁帮紙鍚級</h3>' +
         '</li>' +
         '</ul>' +
         '<a href="javaScript:;" onclick="toHomeDetail(\'' + deptAreaId + '\')"  class="sup-deatil-link"><img src="/img/web/group/spu-detail-btn.png" alt="" style="width:100%;height:100%;"/></a>' +

--
Gitblit v1.9.3