From b1e6bf7d3ed1a1d64182127f83fdc3fad2233a7e Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期五, 12 十二月 2025 15:36:01 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 fzzy-igdss-web/src/main/resources/static/group/gis.js |  100 +++++++++++++++++++++++++++++++++++++------------
 1 files changed, 75 insertions(+), 25 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 b850fd2..613f249 100644
--- a/fzzy-igdss-web/src/main/resources/static/group/gis.js
+++ b/fzzy-igdss-web/src/main/resources/static/group/gis.js
@@ -127,9 +127,10 @@
 /**
  * 鑾峰彇甯傚窞涓嬪簱鍖轰俊鎭�
  */
-function getDeptArea(province, county) {
+function getDeptArea(province, city, county) {
     var list = [];
     if (deptList) {
+        //鐪�
         if (province && province.length > 0) {
             var str1 = province.substring(0, 2);
             for (var i = 0; i < deptList.length; i++){
@@ -137,12 +138,20 @@
                     list.push(deptList[i]);
                 }
             }
-
         }
-        if (county && county.length > 0) {
-            var str2 = county.substring(0, 4);
+        //甯傚窞
+        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)){
+                    list.push(deptList[i]);
+                }
+            }
+        }
+        //鍖哄幙
+        if (county && county.length > 0) {
+            for (var i = 0; i < deptList.length; i++) {
+                if(deptList[i].xzqhdm === county){
                     list.push(deptList[i]);
                 }
             }
@@ -155,20 +164,25 @@
 /**
  * 鐢ㄦ埛鐐瑰嚮鍩庡競鎴栬�呭幙绾у尯绾ф覆鏌撳簱鍖虹偣浣�
  */
-function renderAreas(deptId) {
-    var d = allAreaMap[deptId];
+function renderAreas(code) {
+    var d = allAreaMap[code];
     if (d) {
         closeInfoWindow();
         removeColor();
         delMarker();
-        //map.setCity(deptId);
-        renderColor(deptId);
+        renderColor(code);
         var a = [];
+        //鐪�
         if ("1" == d.type) {
-            a = getDeptArea(deptId, "")
+            a = getDeptArea(code, "", "");
         }
+        //甯傚窞
         if ("2" == d.type) {
-            a = getDeptArea("", deptId)
+            a = getDeptArea("", code, "")
+        }
+        //鍖哄幙
+        if ("3" == d.type) {
+            a = getDeptArea("", "", code)
         }
         if (a && a.length > 0) {
             for (var i = 0; i < a.length; i++) {
@@ -176,10 +190,10 @@
             }
         }
         //鍒锋柊鏁版嵁
-        county = deptId;
+        county = code;
         // ajaxFoodNum();
     } else {
-        console.log("娌℃湁鑾峰彇鍒拌琛屾斂鍖哄垝:" + deptId);
+        console.log("娌℃湁鑾峰彇鍒拌琛屾斂鍖哄垝:" + code);
     }
 }
 
@@ -209,6 +223,7 @@
     if (areaList) {
         var html = "";
         var childs = [];
+        var childsItem = [];
         var areas = [];
         for (var i = 0; i < areaList.length; i++) {
             html += "<div style=\"width: 305px; overflow: hidden\">" +
@@ -220,7 +235,7 @@
                 (areaList[i].name ? areaList[i].name : "") +
                 "</a>" +
                 "</div>";
-            if (areaList[i].children && areaList[i].children.length > 0) {
+            if (areaList[i].children && areaList[i].children.length > 0) {   //甯傚窞
                 childs = areaList[i].children;
                 for (var j = 0; j < childs.length; j++) {
                     html += "<ul class=\"sup-menu-ul  menu-h\">" +
@@ -232,23 +247,58 @@
                         (childs[j].name ? childs[j].name : "") +
                         "</a>" +
                         "</div>";
-                    areas = getDeptArea("", childs[j].code);
-                    if (areas && areas.length > 0) {
-                        for (var k = 0; k < areas.length; k++) {
-                            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>" +
-                                "</p>" +
+                    if (childs[j].children && childs[j].children.length > 0) {   //甯傚窞
+                        childsItem = childs[j].children;
+                        for (var j = 0; j < childsItem.length; j++) {
+                            html += "<ul class=\"sup-menu-ul  menu-h\">" +
+                                "<li>" +
+                                "<div class=\"sup-menu-h\">" +
+                                "<i class=\"i-icon fl\"><img src=\"/img/web/group/icon-sj.png\"/></i>" +
+                                "<a href=\"###\" onclick=\"renderAreas('" + childsItem[j].code + "')\">" +
+                                "<span class=\"i-icon32 fl\"><img src=\"/img/web/group/c-i2.png\"/></span>" +
+                                (childsItem[j].name ? childsItem[j].name : "") +
+                                "</a>" +
                                 "</div>";
+                            areas = getDeptArea("","", childsItem[j].code);
+                            if (areas && areas.length > 0) {
+                                for (var k = 0; k < areas.length; k++) {
+                                    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>" +
+                                        "</p>" +
+                                        "</div>";
+                                }
+                            }
+                            html += "</li>" +
+                                "</ul>";
+                        }
+                    } else {
+                        //娌℃湁瀛愯妭鐐癸紝鐩存帴灏辨槸搴撳尯
+                        areas = getDeptArea("", "", areaList[i].code);
+                        if (areas && areas.length > 0) {
+                            for (var k = 0; k < areas.length; k++) {
+                                html += "<ul class=\"sup-menu-ul\">" +
+                                    "<li>" +
+                                    "<div class=\"sup-menu-h\">" +
+                                    "<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 : "") +
+                                    "</a>" +
+                                    "</div>";
+                                html += "<div class=\"sup-menu-box\">" +
+                                    "</div>";
+                                html += "</li>" +
+                                    "</ul>";
+
+                            }
                         }
                     }
-                    html += "</li>" +
-                        "</ul>";
                 }
             } else {
-                //娌℃湁瀛愯妭鐐癸紝鐩存帴灏辨槸鍖虹骇鍒�
-                areas = getDeptArea("", areaList[i].code);
+                //娌℃湁瀛愯妭鐐癸紝鐩存帴灏辨槸搴撳尯
+                areas = getDeptArea("", "",areaList[i].code);
                 if (areas && areas.length > 0) {
                     for (var k = 0; k < areas.length; k++) {
                         html += "<ul class=\"sup-menu-ul\">" +

--
Gitblit v1.9.3