miaofuhao лет назад: 6
Родитель
Сommit
f8a749da61

+ 4 - 4
WebUI/CallCenterWeb.UI/Business/spotDist.html

@@ -217,7 +217,7 @@
217 217
 					<a href="" title="刷新"><i class="fa fa-refresh"></i></a>
218 218
 				</div>
219 219
 			</div>
220
-
220
+			
221 221
 			<div class="Content_box">
222 222
 				<div class="complain Shows">
223 223
 					<div class="tab-content">
@@ -241,7 +241,7 @@
241 241
 					                        </td>
242 242
 					                        <th>时间:</th>
243 243
 			                                <td >
244
-			                                    <input type="text" id="starttime" class="" placeholder="请选择时间" style="height: 32px;" />
244
+			                                    <input type="text" id="starttime" placeholder="请选择7天内的时间" style="height: 32px; width: 200px;" />
245 245
 			                                </td>
246 246
 			                                <th>主办单位:</th>
247 247
 			                                <td style="position: relative; width: 220px;">
@@ -265,8 +265,8 @@
265 265
 		                           	</table>
266 266
 								</div>
267 267
 							</div>
268
-							<div style="width:1000px">
269
-				                <div id="allmap" style="width:100%;height:400px;"></div>
268
+							<div style="width:90%">
269
+				                <div id="allmap" style="width:100%;height:600px;"></div>
270 270
 				                <input type="hidden" class="store_Lng" value="115.659773"/>
271 271
         						<input type="hidden" class="store_Lat" value="34.395449" />
272 272
 				            	<input type="hidden" id="PID" />

+ 21 - 2
WebUI/CallCenterWeb.UI/js/spotDist.js

@@ -20,7 +20,25 @@ $(document).ready(function () {
20 20
 	throungh();
21 21
 	tree();
22 22
 	$(".Seach").click(function() {
23
-		throungh();
23
+		var time1=$('#starttime').val() && $('#starttime').val().split(' ~ ')[1];
24
+		var time2=$('#starttime').val() && $('#starttime').val().split(' ~ ')[0];
25
+		var aDate, oDate1, oDate2, iDays
26
+		DateDiff(time1, time2)
27
+		function DateDiff(sDate1, sDate2) { //sDate1和sDate2是2002-12-18格式
28
+			aDate = sDate1.split("-")
29
+			oDate1 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0]) //转换为12-18-2002格式
30
+			aDate = sDate2.split("-")
31
+			oDate2 = new Date(aDate[1] + '-' + aDate[2] + '-' + aDate[0])
32
+			iDays = parseInt(Math.abs(oDate1 - oDate2) / 1000 / 60 / 60 / 24) //把相差的毫秒数转换为天数
33
+			console.log(iDays);
34
+		}
35
+		if (iDays>=7) {
36
+			layer.msg("您选择时间大于7天,数据无法加载");
37
+			throungh();
38
+		}else {
39
+			throungh();
40
+		}
41
+		
24 42
 	})
25 43
 });
26 44
 
@@ -147,10 +165,11 @@ function depart() {
147 165
 
148 166
 
149 167
 function throungh() {
168
+	debugger
150 169
 	$.ajax({
151 170
 		type: "get",
152 171
 		url: huayi.config.callcenter_url + "WorkOrderReport/GetHotspotMap",
153
-		async: false,
172
+		async: true,
154 173
 		dataType: 'json',
155 174
 		data: {
156 175
 			token: $.cookie("token"),