From fa0414b2f44aa07c282b73195f7ea2ef3ab1eb74 Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期四, 25 十二月 2025 19:19:53 +0800
Subject: [PATCH] 首页大屏数据交互2
---
fzzy-igdss-web/src/main/resources/static/group/gis.js | 81 ++++++++++++++++++++++++++++++++++++----
1 files changed, 72 insertions(+), 9 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 613f249..6e104f9 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;
@@ -25,25 +26,40 @@
//鍒濆鍖栨椂闂�
initTime();
-
+ initDicSlogan();
//鍒濆鍖栧湴鍥�
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")
@@ -63,7 +78,33 @@
kai2.addClass('menu-h')
}
});
+
+ // 鍒濆鍖朩ebSocket
+ initWS(companyId,bizType, bizTag, userId);
});
+
+// socket淇℃伅杩斿洖铏曠悊
+function socketOnMessage(pocket) {
+ //console.log(pocket);
+ if (pocket.bizId == "slogan") {
+ var data = pocket.data;
+ dicSlogan = data;
+ initDicSlogan();
+ }
+}
+
+// 鍒锋柊鏃堕棿
+function positioning(code) {
+
+ var kai = $("#prov");
+ if (kai.hasClass('menu-group')) {
+ kai.removeClass('menu-group')
+ } else{
+ kai.addClass('menu-group')
+ }
+
+ renderAreas(code);
+}
// 鍒锋柊鏃堕棿
function initTime() {
@@ -77,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,
@@ -227,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 + "')\">" +
@@ -327,6 +368,28 @@
}
}
+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");
+}
+
/**
* 鑾峰彇鍦板浘琛屾斂鍖哄煙棰滆壊
* @param adcode
--
Gitblit v1.9.3