From 8e4be3c0e5577fddae3ae30b0ca00f8b7a6c490e Mon Sep 17 00:00:00 2001
From: sgj <1442489573@qq.com>
Date: 星期四, 05 三月 2026 17:41:18 +0800
Subject: [PATCH] 建模gis监管页面修改
---
fzzy-igdss-web/src/main/resources/static/group/gis_modeling.js | 393 ++++++++++++++------------------------------------------
1 files changed, 99 insertions(+), 294 deletions(-)
diff --git a/fzzy-igdss-web/src/main/resources/static/group/gis_modeling.js b/fzzy-igdss-web/src/main/resources/static/group/gis_modeling.js
index d7fec1d..80ed304 100644
--- a/fzzy-igdss-web/src/main/resources/static/group/gis_modeling.js
+++ b/fzzy-igdss-web/src/main/resources/static/group/gis_modeling.js
@@ -1,9 +1,5 @@
var colors = {};
var map;
-var disProvince;//琛屾斂鍖洪鑹叉覆鏌�
-var deptListMap = {};
-var allAreaMap = {};
-var markers = [];//鐐规爣璁�
var type = "0";
var county = "all";
var breedChart = null;
@@ -19,24 +15,12 @@
const data = event.data;
if (data && data.type === "CLICK_BUILDING") {
- alert(`鐐瑰嚮浜嗕粨搴� ${data.data.uid}`);
+ // alert(`鐐瑰嚮浜嗕粨搴� ${data.data.uid}`);
+ renderDepotMess(data.data.uid);
}
});
$(function () {
- //鎵�鏈夊簱鍖�
- if (deptList) {
- for (var i = 0; i < deptList.length; i++) {
- deptListMap[deptList[i].deptId] = deptList[i];
- }
- }
- //鎵�鏈夌渷甯�
- if (allArea) {
- for (var i = 0; i < allArea.length; i++) {
- allAreaMap[allArea[i].code] = allArea[i];
- }
- }
-
//鍒濆鍖栨椂闂�
initTime();
initDicSlogan();
@@ -91,10 +75,91 @@
});
// 鍒濆鍖朩ebSocket
- initWS(companyId, bizType, bizTag, userId);
+ // initWS(companyId, bizType, bizTag, userId);
+
+ renderDeptMess(defaultDeptId);
});
-// socket淇℃伅杩斿洖铏曠悊
+function renderDeptMess(deptId) {
+ //浠巇eptList涓壘鍒癲eptid
+ console.log("鍒囨崲搴撳尯deptid")
+ console.log(deptId)
+ console.log(deptList)
+ for (let i = 0; i < deptList.length; i++) {
+ if( deptId == deptList[i].deptId){
+ let htmlMess=`
+ <div class="panel-title">搴撶偣淇℃伅</div>
+ <div class="right-topInfo-address">
+ <i class="i-icon32"><img th:src="@{/img/web/group/icon-address.png}" alt=""></i>
+ <span >${deptList[i].county}</span>
+ </div>
+ <div class="panel-content">
+ <h2 class="right-topInfo-kd-h" >${deptList[i].deptName}</h2>
+ <div class="right-topInfo-kd">
+ <div class="right-topInfo-kd-item">
+ <h3>褰撴棩鍏ュ簱鍗曟暟锛堜釜锛�</h3>
+ <p >${deptList[i].inNum}</p>
+ </div>
+ <div class="right-topInfo-kd-item">
+ <h3>褰撴棩鍑哄簱鍗曟暟锛堜釜锛�</h3>
+ <p >${deptList[i].outNum}</p>
+ </div>
+ </div>
+ <ul class="right-topInfo-kd-list right-topInfo-jg">
+ <li>
+ <p >${deptList[i].depotNumber}</p>
+ <h3>浠撳簱鏁帮紙涓級</h3>
+ </li>
+ <li>
+ <p >${deptList[i].depotBankNumber}</p>
+ <h3>璐ㄦ娂浠撴暟锛堜釜锛�</h3>
+ </li>
+ <li>
+ <p >${deptList[i].storageNum}</p>
+ <h3>搴撳瓨鏁帮紙鍚級</h3>
+ </li>
+ </ul>
+ </div>`;
+ $("#areaInformation").html(htmlMess);
+ }
+ }
+}
+
+
+function renderDepotMess(depotId) {
+ console.log("鍒囨崲浠撳簱depotId")
+ console.log(depotId)
+ console.log(depotList)
+ for (let i = 0; i < depotList.length; i++) {
+ if( depotId == depotList[i].depotId){
+
+ let htmlMess=`
+ <div class="panel-title">搴撶偣淇℃伅</div>
+ <div class="right-topInfo-address">
+ <i class="i-icon32"><img th:src="@{/img/web/group/icon-address.png}" alt=""></i>
+ <span>${depotList[i].county}</span>
+ </div>
+ <div class="panel-content">
+ <h2 class="right-topInfo-kd-h">${depotList[i].deptName}</h2>
+ <div class="modeling-left-topInfo-kd">
+ <div class="modeling-left-topInfo-ck">
+ <h1>${depotList[i].depotName}</h1>
+ </div>
+ </div>
+ <ul class="modeling-left-topInfo-kd-list right-topInfo-jg">
+ <li>
+ <p>${depotList[i].storageNum}</p>
+ <h3>搴撳瓨鏁帮紙鍚級</h3>
+ </li>
+ </ul>
+ </div>
+ `;
+ $("#areaInformation").html(htmlMess);
+ }
+ }
+
+}
+
function socketOnMessage(pocket) {
//console.log(pocket);
if (pocket.bizId == "slogan") {
@@ -141,98 +206,8 @@
}
// 鏂规浜岋細鐩存帴淇敼src锛堜細閲嶆柊鍔犺浇椤甸潰锛�
// iframe.src = `http://172.67.157.132:5000?uid=${uid}`;
-}
-
-/**
- * 鑾峰彇甯傚窞涓嬪簱鍖轰俊鎭�
- */
-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++) {
- if (deptList[i].code.startsWith(str1)) {
- list.push(deptList[i]);
- }
- }
- }
- //甯傚窞
- if (city && city.length > 0) {
- var str2 = city.substring(0, 4);
- for (var i = 0; i < deptList.length; i++) {
- if (deptList[i].code.startsWith(str2)) {
- list.push(deptList[i]);
- }
- }
- }
- //鍖哄幙
- if (county && county.length > 0) {
- for (var i = 0; i < deptList.length; i++) {
- if (deptList[i].code === county) {
- list.push(deptList[i]);
- }
- }
- }
- }
-
- return list;
-}
-
-/**
- * 鐢ㄦ埛鐐瑰嚮鍩庡競鎴栬�呭幙绾у尯绾ф覆鏌撳簱鍖虹偣浣�
- */
-function renderAreas(code) {
- var d = allAreaMap[code];
- if (d) {
- closeInfoWindow();
- removeColor();
- delMarker();
- renderColor(code);
- var a = [];
- //鐪�
- if ("1" == d.type) {
- a = getDeptArea(code, "", "");
- }
- //甯傚窞
- if ("2" == d.type) {
- a = getDeptArea("", code, "")
- }
- //鍖哄幙
- if ("3" == d.type) {
- a = getDeptArea("", "", code)
- }
- if (a && a.length > 0) {
- for (var i = 0; i < a.length; i++) {
- addMarker(a[i], false);
- }
- }
- //鍒锋柊鏁版嵁
- county = code;
- // ajaxFoodNum();
- } else {
- console.log("娌℃湁鑾峰彇鍒拌琛屾斂鍖哄垝:" + code);
- }
-}
-
-/**
- * 娓叉煋搴撳尯淇℃伅寮圭獥
- * @param deptAreaId
- */
-function showAreaInfo(deptAreaId) {
- var d = deptListMap[deptAreaId];
- if (d) {
- closeInfoWindow();
- removeColor();
- delMarker();
- //map.setCity(d.deptCounty);
- // map.setZoom(10);
- renderColor(d.deptCounty);
- addMarker(d, true);
- } else {
- console.log("娌℃湁鑾峰彇鍒拌搴撳尯:" + deptAreaId);
- }
+ //鍒囨崲搴撳尯鐨勫簱鐐逛俊鎭�
+ renderDeptMess(deptid);
}
/**
@@ -254,7 +229,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\">" +
@@ -266,24 +241,21 @@
(childs[j].name ? childs[j].name : "") +
"</a>" +
"</div>";
- if (childs[j].children && childs[j].children.length > 0) { //甯傚窞
+ 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=\"clickDept('" + childsItem[j].code + "')\">" +
- "<span class=\"i-icon32 fl\"><img src=\"/img/web/group/c-i2.png\"/></span>" +
- (childsItem[j].name ? childsItem[j].name : "") +
- "</a>" +
+ for (var k = 0; k < childsItem.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=\"clickDept('" + childsItem[k].code + "')\">" + childsItem[k].name + "</a>" +
+ "</p>" +
"</div>";
- html += "</li></ul>";
}
}
+ html += "</li>" +
+ "</ul>";
}
}
-
html += "</div>" +
"</div>";
}
@@ -291,6 +263,7 @@
$("#menuDiv").html(html);
}
}
+
function renderNum() {
$("#foodSum").html(gisData.deptNum);
@@ -317,7 +290,7 @@
varietyChart.chart.setOption(varietyChart.option, true);
breedChart = varietyChart;
}
- barChartLoad("ss");
+ modelingBarChartLoad("ss");
}
@@ -342,164 +315,6 @@
-/**
- *
- *澧炲姞搴撳尯鐐逛綅
- * tag 鏄惁鐩存帴鏄剧ず淇℃伅寮圭獥
- */
-function addMarker(deptArea, tag) {
- if (deptArea) {
- var markerContent = " <div class=\"right-map-item right-map-item2\"style=' left: 0px !important; top: 0px !important;'>" +
- // " <p>澶╁簻鏂板尯</p>" +
- " <span class=\"map-round\"></span>" +
- " </div>";
- var position = [deptArea.jd, deptArea.wd];
- var marker = new AMap.Marker({
- position: position,
- // 灏� html 浼犵粰 content
- content: markerContent,
- // 浠� icon 鐨� [center bottom] 涓哄師鐐�
- // achor:'center',
- offset: new AMap.Pixel(-25, -25)
-
- });
- markers.push(marker);
- // 灏� markers 娣诲姞鍒板湴鍥�
- map.add(marker);
-
- var infoWinodw = new AMap.InfoWindow({
- isCustom: true, //浣跨敤鑷畾涔夌獥浣�
- content: createInfoWindow(deptArea),
- achor: 'bottom-center',
- offset: new AMap.Pixel(0, 0)
- });
- //榧犳爣鐐瑰嚮marker寮瑰嚭鑷畾涔夌殑淇℃伅绐椾綋
- marker.on('click', function () {
- infoWinodw.open(map, marker.getPosition());
- });
- if (tag) {
- infoWinodw.open(map, marker.getPosition());
- }
- } else {
- console.log("搴撳尯涓虹┖");
- }
-}
-
-/**
- *
- *鍒犻櫎搴撳尯鐐逛綅
- */
-function delMarker() {
- if (map) {
- map.remove(markers);
- }
-}
-
-//鍏抽棴淇℃伅绐椾綋
-function closeInfoWindow() {
- if (map) {
- map.clearInfoWindow();
- }
-}
-
-/**
- * 鍒涘缓淇℃伅绐楀彛
- */
-function createInfoWindow(deptArea) {
- 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;\">" +
- "</div>" +
- "<div class=\"BMap_bubble_buttons\" style=\"float:right;position:absolute;top:-2px;right:0px;height:30px;\">" +
- "<div style=\"cursor: pointer; display: none;\">" +
- "<div style=\"position:absolute;top:9px;width:10px;height:10px;-moz-user-select:none;cursor:pointer;z-index:10000;display:none\">脳</div>" +
- "</div>" +
- "<div style=\"cursor:pointer;width:32px;height:30px;color:#ccc\">" +
- "<div style=\"position:absolute;top:2px;right:12px;text-align:center;line-height:30px;-moz-user-select:none;cursor:pointer;z-index:10000;font-size:20px\">脳</div>" +
- "</div>" +
- "</div>" +
- "</div>" +
- "<div class=\"BMap_bubble_center\" style=\"z-index: 3; position: relative; height: 324px; width: 376px;\">" +
- "<div class=\"BMap_bubble_content\" style=\"font-size: 14px; line-height: 24px; position: absolute; top: 2px; color: rgb(85, 85, 85); width: 364px; height: 324px; overflow: auto;\">" +
- '<div style=\"height:100%;box-sizing:border-box;\">' +
- '<div style="height: 34px;">' +
- '<div style="width: 320px;float: left;">';
- 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.deptName ? deptArea.deptName : "娌℃湁鑾峰彇鍒板簱鍖轰俊鎭�") + '</h3>';
- }
- content += '</div>' +
- '<div style="width: 40px;float: left;">' +
- '<img style="height: 20px;" src="/img/web/group/icon_close.png" onclick="closeInfoWindow()"></img>' +
- '</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.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.inNum) + '</p>' +
- '</div>' +
- '<div class="right-topInfo-kd-item">' +
- '<h3>褰撴棩鍑哄簱鍗曟暟(涓�)</h3>' +
- '<p>' + (deptArea.outNum) + '</p>' +
- '</div>' +
- '</div>' +
- '<ul class="right-topInfo-kd-list right-topInfo-jg sup-topInfo-list">' +
- '<li>';
- if (deptArea.depotNumber && (deptArea.depotNumber + "").length > 4) {
- content += '<p style="font-size: 22px">' + (deptArea.depotNumber) + '</p>';
- } else {
- content += '<p style="font-size: 22px">' + (deptArea.depotNumber) + '</p>';
-
- }
- content += '<h3>浠撳簱鏁�(涓�)</h3>' +
- '</li>' +
- '<li>';
- if (deptArea.depotBankNumber && (deptArea.depotBankNumber + "").length > 4) {
- content += '<p style="font-size: 22px">' + (deptArea.depotBankNumber) + '</p>';
- } else {
- content += '<p style="font-size: 22px">' + (deptArea.depotBankNumber) + '</p>';
- }
- content += '<h3>璐ㄦ娂浠撴暟(涓�)</h3>' +
- '</li>' +
- '<li>' +
- '<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>' +
- '</div>' +
- "</div></div><div class=\"BMap_bubble_bottom\" style=\"display: block; z-index: 2; position: absolute; width: 376px;\">" +
- "</div><img style=\"z-index: 1; position: absolute; width: 58px; height: 31px; left: 159px; bottom: -30px; top: 356px;\" src=\"http://webmap0.bdimg.com/image/api/iw_tail.png\"></div>";
-
- return content;
-}
-
-/**
- * 璋冪敤鐖惰妭鐐规柟娉曟墽琛岋紝榛樿閫�鍑哄叏灞忓苟杩涘叆鍚庡彴
- * @param id
- */
-function toHomeDetail(id) {
- var url = "/index?deptId=" + id;
- window.parent.open(url, "_self");
-};
-
-/**
- * 鏍规嵁琛屾斂缂栫爜娓叉煋棰滆壊锛屽競绾т細灏嗕笅闈㈡墍鏈夊尯娓叉煋锛屽尯绾у彧娓叉煋褰撳墠鍖�
- * @param adcode
- */
-function renderColor(adcode) {
- switch2AreaNode(adcode);
-}
-
-function removeColor() {
- // if (disProvince) {
- // disProvince.setMap(null);
- // }
-}
/**
* 鏍煎紡鍖栨棩鏈�
@@ -527,16 +342,6 @@
return fmt;
}
-/**
- *鑾峰彇褰撳墠鏄熸湡鍑�
- */
-function getWeekDate() {
- var now = new Date();
- var day = now.getDay();
- var weeks = new Array("鏄熸湡鏃�", "鏄熸湡涓�", "鏄熸湡浜�", "鏄熸湡涓�", "鏄熸湡鍥�", "鏄熸湡浜�", "鏄熸湡鍏�");
- var week = weeks[day];
- return week;
-}
/**
* 鏍煎紡鍖栨棩鏈�
--
Gitblit v1.9.3