From 56de22fe4166f68601b68b9c57df32cc44425993 Mon Sep 17 00:00:00 2001
From: zmk <496160012@qq.com>
Date: 星期六, 18 五月 2024 14:44:35 +0800
Subject: [PATCH] 提交代码
---
javaweb-plus/javaweb-admin/src/main/resources/templates/main.html | 256 +++++---------------------------------------------
1 files changed, 29 insertions(+), 227 deletions(-)
diff --git a/javaweb-plus/javaweb-admin/src/main/resources/templates/main.html b/javaweb-plus/javaweb-admin/src/main/resources/templates/main.html
index ba0d2d9..ce0adc3 100644
--- a/javaweb-plus/javaweb-admin/src/main/resources/templates/main.html
+++ b/javaweb-plus/javaweb-admin/src/main/resources/templates/main.html
@@ -71,15 +71,14 @@
<th:block th:include="include :: sparkline-js" />
<th:block th:include="include :: footer" />
-<script type="text/javascript">
+ <script th:inline="javascript">
$(function() {
loadMap();
getReallyData();
totalProcess();
stationProcess();
- //getRegulatoryUnitChartData("","");
- //bindEvent();
+
})
// 鍔犺浇鍦板浘
let map=null;
@@ -169,17 +168,23 @@
}
function infoWindowProject(e){
+
+ let ids = e.ids + "";
var sContent =
"<div style='margin:0px;'>" +
"<div>" +
- "<div style='margin:5px 0px 5px 5px;'>" +
+ "<div style='margin:1px 0px 1px 2px;width: 200px;'>" +
"<font style='font-weight: bolder;'>鍦哄湴缂栧彿 :</font>" + e.code + "<br>" +
"<font style='font-weight: bolder;'>鍦哄湴鍚嶅瓧 :</font>" + e.fullName + "<br>" +
"<font style='font-weight: bolder;'>璐熻矗浜� :</font>" + e.leader + "<br>" +
+ "<a class='btn' onclick=viewdata(" +"'" + ids+ "'" + ")>鍦哄湴鏁版嵁</a>" +
"</div>" +
"</div>" +
"</div>";
return sContent;
+ }
+ function viewdata (id) {
+ $.modal.openTab("鍦哄湴瀵艰埅",ctx+ "/geo/project/navigate?ids="+id);
}
function addClickHandler(content, marker) {
@@ -194,41 +199,17 @@
map.openInfoWindow(markerInfoWin, point); //寮�鍚俊鎭獥鍙�
}
-
- // 椤甸潰鏁版嵁璧嬪��
- function pageAssignment(reallyData) {
- for ( let key in reallyData) {
- let className = "." + key;
- $(className).text(reallyData[key]);
- }
- }
-
- //鏌ヨ鐩戠鍗曚綅椤圭洰缁熻鍥捐〃鏁版嵁
- function getRegulatoryUnitChartData(startTime,endTime){
- let url = window.location.protocol + "//" + window.location.host + "/bjfw/geotdp/index/indexProjectNumsCollect";
- $.get(url,{
- startTime: startTime,
- endTime: endTime
- },function(res){
- if(res.status && res.message === "鎿嶄綔鎴愬姛"){
- let chartData = {};
- chartData.yData = res.result.map((item)=>{
- return item.fullName;
- })
- chartData.xData = res.result.map((item)=>{
- return item.projectNums;
- })
- loadRegulatoryUnitChart(chartData);
- }else{
- $.modal.alertError("璇锋眰鍑洪敊");
- }
-
- })
- }
-
+ //鎬昏繘搴︿华琛ㄧ洏
function totalProcess() {
var Chart1 = echarts.init(document.getElementById('Chart1'));
- var pointerData = 36; // 浠〃鎸囬拡鏁版嵁
+ var pointerData = 0; // 浠〃鎸囬拡鏁版嵁
+ let url = ctx + "/system/totalProcess";
+ $.ajaxSettings.async = false;
+ $.get(url,{},function(res){
+ pointerData = res.pointerData;
+ pointerData = (pointerData*100).toFixed(0);
+ })
+ $.ajaxSettings.async = false;
var option = {
backgroundColor: "#fff",
series: [
@@ -410,12 +391,10 @@
{ ranking: 32, station: '鍦哄湴032', value: 18.48 },
{ ranking: 33, station: '鍦哄湴033', value: 13.03 },
{ ranking: 34, station: '鍦哄湴034', value: 18.48 },
-
-
];
- var seriesName = ['',''];
+ var seriesName = ['宸插畬鎴愯繘搴�','鎬昏繘搴�'];
var attackSourcesColor1 = ['#FF557F','#FFAA00','#5470C6','#1E9FFF'];
var attackSourcesColor = [
@@ -438,9 +417,17 @@
];
function stationProcess() {
+
+ let url = ctx + "/system/projectProcess";
+ $.ajaxSettings.async = false;
+ $.get(url,{},function(res){
+ console.log(res.projectData);
+ datas = res.projectData;
+ })
+ $.ajaxSettings.async = false;
+
+
var Chart2 = echarts.init(document.getElementById('Chart2'));
-
-
var rankings = [];
var stationData = [];
var values = [];
@@ -450,7 +437,6 @@
stationData.push(it.station);
values.push(it.value);
});
-
option = {
// backgroundColor: '#000',
@@ -657,192 +643,8 @@
return false;
}
- //鍔犺浇鐩戠鍗曚綅椤圭洰缁熻鍥捐〃
- function loadRegulatoryUnitChart(chartData){
- var myChart = echarts.init(document.getElementById('rank_chart'));
- let beginColor = "rgb(255,140,0,0.1)",
- endColor = "rgb(255,140,0,1)",
- endPix = "";
- //let endZom = 50;
- let option = {
- title: {
- show: false,
- },
- dataZoom: [
- {
- type: "inside",
- start: 0,
- // end: endZom,
- orient: "vertical",
- zoomOnMouseWheel: false, ////婊氳疆鏄惁瑙﹀彂缂╂斁
- },
- ],
- tooltip: {
- trigger: "axis",
- axisPointer: {
- type: "shadow",
- },
- },
- legend: {
- bottom: 20,
- right: 0,
- textStyle: {
- color: "#666",
- fontSize: 18,
- },
- orient: "vertical",
- },
- grid: {
- borderWidth: 0,
- top: "8%",
- left: "1%",
- right: "8%",
- bottom: "2%",
- },
- color: "#fff",
- yAxis: [
- {
- type: "category",
- inverse: true,
- axisLine: {
- show: false,
- },
- splitLine: {
- show: false,
- },
- axisTick: {
- show: false,
- },
- axisLabel: {
- show: false,
- },
- data: chartData.yData,
- },
- ],
- xAxis: {
- type: "value",
- axisTick: {
- show: false,
- },
- axisLine: {
- show: false,
- },
- splitLine: {
- show: false,
- },
- axisLabel: {
- show: false,
- },
- },
- series: [
- {
- name: "绱",
- type: "bar",
- barWidth: "10px",
- itemStyle: {
- normal: {
- show: true,
- color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [
- {
- offset: 0,
- color: beginColor,
- },
- {
- offset: 1,
- color: endColor,
- },
- ]),
- barBorderRadius: [0, 5, 5, 0],
- },
- emphasis: {
- shadowBlur: 15,
- shadowColor: "rgba(0, 0, 0, 0.1)",
- },
- },
- data: chartData.xData,
- animationDuration: 1500,
- label: {
- normal: {
- color: "black",
- show: true,
- position: "right",
- fontSize: 18,
- fontStyle: "italic",
- formatter: function (para) {
- return para.data + endPix;
- },
- },
- },
- },
- {
- type: "bar",
- barGap: "0",
- barWidth: 10,
- animation: false,
- itemStyle: {
- color: "transparent",
- },
- tooltip: {
- show: false,
- },
- label: {
- show: true,
- position: ["0", "-35"],
- fontSize: 13,
- color: "rgb(0,0,0,0.7)",
- formatter: function (param) {
- return param.dataIndex + 1 + " " + param.name;
- },
- },
- data: chartData.xData,
- },
-
- ],
- animationEasing: "cubicOut",
- };
-
- myChart.setOption(option);
- }
-
- //缁戝畾浜嬩欢
- function bindEvent(){
- $(".statistic-btn .btn").on("click",function(){
- if(this.innerText === "鎬昏"){
- getRegulatoryUnitChartData("","");
- }else if(this.innerText === "鏈勾搴�"){
- let d = new Date();
- let n = d.getFullYear();
- let startTime = n + "-01-01 00:00:00";
- let endTime = n + "-12-31 23:59:59";
- getRegulatoryUnitChartData(startTime,endTime);
- }else{
- let startTime = getFirstDay() + " 00:00:00";
- let endTime = getLastDay() + " 23:59:59";
- getRegulatoryUnitChartData(startTime,endTime);
- }
- })
- }
-
- //鑾峰彇鏈湀绗竴澶�
- function getFirstDay(){
- var y = new Date().getFullYear(); //鑾峰彇骞翠唤
- var m = new Date().getMonth() + 1; //鑾峰彇鏈堜唤
- var d = '01'
- m = m < 10 ? '0' + m : m; //鏈堜唤琛� 0
-
- return [y,m,d].join("-")
- }
- //鑾峰彇鏈湀鏈�鍚庝竴澶�
- function getLastDay(){
- var y = new Date().getFullYear(); //鑾峰彇骞翠唤
- var m = new Date().getMonth() + 1; //鑾峰彇鏈堜唤
- var d = new Date(y, m, 0).getDate(); //鑾峰彇褰撴湀鏈�鍚庝竴鏃�
- m = m < 10 ? '0' + m : m; //鏈堜唤琛� 0
- d = d < 10 ? '0' + d : d; //鏃ユ暟琛� 0
- return [y,m,d].join("-");
- }
</script>
--
Gitblit v1.9.1