From fd6cc95849a1ba9bcea316ed9d6c6aaad97979d2 Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期三, 21 六月 2023 10:33:57 +0800
Subject: [PATCH] 地图修改

---
 management/guns-admin/src/main/webapp/WEB-INF/view/blackboardBlank.html |   57 +++++++++++++++++++++++++++++++++++++--------------------
 1 files changed, 37 insertions(+), 20 deletions(-)

diff --git a/management/guns-admin/src/main/webapp/WEB-INF/view/blackboardBlank.html b/management/guns-admin/src/main/webapp/WEB-INF/view/blackboardBlank.html
index ae15266..29c98ac 100644
--- a/management/guns-admin/src/main/webapp/WEB-INF/view/blackboardBlank.html
+++ b/management/guns-admin/src/main/webapp/WEB-INF/view/blackboardBlank.html
@@ -421,11 +421,16 @@
 			selectMonth(value)// change 每点一次都会监听一遍
 		}
 	});
+	laydate.render({
+		elem: '#createTime',
+		type: 'date',
+		range: true
+	});
 
 	// 进度条加载
 	function loading(){
 		var options = $.extend({
-			percentage : $('#agentTotal').text(),
+			percentage : $('#agentTotal').text()<100?$('#agentTotal').text():($('#agentTotal').text()>1000?$('#agentTotal').text()/100:$('#agentTotal').text()/10),
 			ShowProgressCount: false,
 			duration: 10,
 
@@ -438,7 +443,7 @@
 		});
 		$('#pro1').LineProgressbar(options);
 		var options = $.extend({
-			percentage : $('#agentMonthTotal').text(),
+			percentage : $('#agentMonthTotal').text()<100?$('#agentMonthTotal').text():($('#agentMonthTotal').text()>1000?$('#agentMonthTotal').text()/100:$('#agentMonthTotal').text()/10),
 			ShowProgressCount: false,
 			duration: 10,
 
@@ -451,7 +456,7 @@
 		});
 		$('#pro2').LineProgressbar(options);
 		var options = $.extend({
-			percentage : $('#driverTotal').text(),
+			percentage : $('#driverTotal').text()<100?$('#driverTotal').text():($('#driverTotal').text()>1000?$('#driverTotal').text()/100:$('#driverTotal').text()/10),
 			ShowProgressCount: false,
 			duration: 10,
 
@@ -464,7 +469,7 @@
 		});
 		$('#pro3').LineProgressbar(options);
 		var options = $.extend({
-			percentage : $('#driverMonthTotal').text(),
+			percentage : $('#driverMonthTotal').text()<100?$('#driverMonthTotal').text():($('#driverMonthTotal').text()>1000?$('#driverMonthTotal').text()/100:$('#driverMonthTotal').text()/10),
 			ShowProgressCount: false,
 			duration: 10,
 
@@ -719,9 +724,9 @@
 			document.getElementById("serverCount").innerText=data.serverCount
 			document.getElementById("finishCount").innerText=data.finishCount
 			document.getElementById("cancelCount").innerText=data.cancelCount
-			$('#allList').val(data.allList);
-			console.log(data.allList)
-			map(data.allList,data.addressLon,data.addressLat)
+			$('#onLineDriver').val(data.onLineDriver);
+			console.log(data.onLineDriver)
+			map(data.onLineDriver,data.addressLon,data.addressLat)
 			getOrderData()
 
 		}, function (data) {
@@ -739,8 +744,8 @@
 			document.getElementById("serverCount").innerText=data.serverCount
 			document.getElementById("finishCount").innerText=data.finishCount
 			document.getElementById("cancelCount").innerText=data.cancelCount
-			$('#allList').val(data.allList);
-			map(data.allList,data.addressLon,data.addressLat)
+			$('#onLineDriver').val(data.onLineDriver);
+			map(data.onLineDriver,data.addressLon,data.addressLat)
 			getOrderData()
 		}, function (data) {
 		});
@@ -791,11 +796,6 @@
 		window._AMapSecurityConfig = {
 			securityJsCode:'b62d9146929db08c4c2f4537d045320d',
 		};
-		laydate.render({
-			elem: '#createTime',
-			type: 'date',
-			range: true
-		});
 
 		AMapLoader.reset() // 需要把这个reset一下
 		AMapLoader.load({
@@ -818,13 +818,30 @@
 			});
 			// map.clearMap();  // 清除地图覆盖物
 			// 经纬度坐标数组
-			const  onLineDriver = $('#onLineDriver').val();
-			var list1 = JSON.stringify(onLineDriver)
-			const jsonArr = JSON.parse(list1)
-			const jsonArr1 = JSON.parse(jsonArr);
-			console.log(jsonArr1)
-			M = jsonArr1;
+
+			var  onLineDriver;
+			if(e==""){
+				onLineDriver = $('#onLineDriver').val();
+				console.log("onLineDriver========================")
+				console.log(onLineDriver)
+				var list1 = JSON.stringify(onLineDriver)
+				console.log("list1========================")
+				console.log(list1)
+				const jsonArr = JSON.parse(list1)
+				console.log("jsonArr========================")
+				console.log(jsonArr)
+				const jsonArr1 = JSON.parse(jsonArr);
+				console.log("jsonArr1========================")
+				console.log(jsonArr1)
+				M = jsonArr1;
+			}else{
+				M=e;
+			}
+			console.log("M =========================")
+			console.log(M)
 			M.forEach(function(marker) {
+				console.log("========================")
+				console.log(marker)
 				new AMap.Marker({
 					map: map,
 					icon: marker[2]==1?'https://csxdj.obs.cn-south-1.myhuaweicloud.com/c1d2f38187de40daa353fcc70993288e.png':'https://csxdj.obs.cn-south-1.myhuaweicloud.com/c1d2f38187de40daa353fcc70993288e.png',

--
Gitblit v1.7.1