Browse Source

地图统计数量加载书讯

seimin 1 year ago
parent
commit
8006e18e34
1 changed files with 57 additions and 56 deletions
  1. 57 56
      assets/js/controllers/charts3.js

+ 57 - 56
assets/js/controllers/charts3.js

@@ -124,8 +124,8 @@ app.controller('charts3Ctrl', ["$scope", "$rootScope", "$state", "$timeout", "$i
124 124
                     // margin: 15,
125 125
                     align: 'center'
126 126
                 },
127
-                // margin:10,  
128
-                // rotate:40  
127
+                // margin:10,
128
+                // rotate:40
129 129
             },
130 130
             axisTick: {
131 131
                 show: false,
@@ -1065,7 +1065,7 @@ app.controller('charts3Ctrl', ["$scope", "$rootScope", "$state", "$timeout", "$i
1065 1065
                 $scope.slideBoxLeft3 = 0;
1066 1066
             }
1067 1067
             console.log($scope.slideBoxLeft3, '$scope.slideBoxLeft3')
1068
-            
1068
+
1069 1069
             // 聚合点信息获取
1070 1070
             $scope.incident_allData = '';
1071 1071
             $scope.incident_responseData = '';
@@ -1108,7 +1108,7 @@ app.controller('charts3Ctrl', ["$scope", "$rootScope", "$state", "$timeout", "$i
1108 1108
     // 列表滚动
1109 1109
     // a:table body 的class名;b:滚动父盒子的id名;c:滚动盒子的id名;d:滚动项的class名;e:每页展示的条数;f:interval定时器开启1/关闭0
1110 1110
     $scope.slides = function (a, b, c, d, e, f) {
1111
-        var speed = 45; //设置向上轮动的速度 
1111
+        var speed = 45; //设置向上轮动的速度
1112 1112
         var list = $('.' + d).clone();
1113 1113
         if (list.length >= e) {
1114 1114
             var body1 = $('.' + a)[0];
@@ -1278,6 +1278,52 @@ app.controller('charts3Ctrl', ["$scope", "$rootScope", "$state", "$timeout", "$i
1278 1278
 
1279 1279
     // // 开始
1280 1280
     function map_time_area(time, slideBoxLeft3) {
1281
+        // 右侧数据
1282
+        // 实时信息
1283
+        if(slideBoxLeft3 == 0 || slideBoxLeft3 == 3){
1284
+            getIncident_allData({});
1285
+            getIncident_responseData({})
1286
+            getIncident_solveNowData({})
1287
+            getIncident_solvedData({})
1288
+        }
1289
+        // 30天信息
1290
+        if(slideBoxLeft3 == 1 || slideBoxLeft3 == 4){
1291
+            getYear_incident_total_month({
1292
+                "start": lastMonth + " 00:00:00",
1293
+                "end": yesterDay + " 23:59:59"
1294
+            })
1295
+            getIncident_solve_time_month({
1296
+                "start": lastMonth + " 00:00:00",
1297
+                "end": yesterDay + " 23:59:59"
1298
+            })
1299
+            getIncident_solve_total_month({
1300
+                "start": lastMonth + " 00:00:00",
1301
+                "end": yesterDay + " 23:59:59"
1302
+            })
1303
+            getIncident_degree_month({
1304
+                "start": lastMonth + " 00:00:00",
1305
+                "end": yesterDay + " 23:59:59"
1306
+            })
1307
+        }
1308
+        // 一年信息
1309
+        if(slideBoxLeft3 == 2 || slideBoxLeft3 == 5){
1310
+            getYear_incident_total({
1311
+                "start": lastYear + " 00:00:00",
1312
+                "end": yesterDay + " 23:59:59"
1313
+            })
1314
+            getIncident_solve_time({
1315
+                "start": lastYear + " 00:00:00",
1316
+                "end": yesterDay + " 23:59:59"
1317
+            })
1318
+            getIncident_solve_total({
1319
+                "start": lastYear + " 00:00:00",
1320
+                "end": yesterDay + " 23:59:59"
1321
+            })
1322
+            getIncident_degree({
1323
+                "start": lastYear + " 00:00:00",
1324
+                "end": yesterDay + " 23:59:59"
1325
+            })
1326
+        }
1281 1327
         api_newreport.fetchDataList('oneMapData', time).then(function (res) {
1282 1328
             console.log(res)
1283 1329
             if(res.status == 200){
@@ -1290,7 +1336,7 @@ app.controller('charts3Ctrl', ["$scope", "$rootScope", "$state", "$timeout", "$i
1290 1336
                     })
1291 1337
                     $scope.addClusterLayer(GLIDList, dataList, name);
1292 1338
                 }
1293
-                
1339
+
1294 1340
                 // 地址切换
1295 1341
                 if(slideBoxLeft3 === 0 || slideBoxLeft3 === 1 || slideBoxLeft3 === 2){
1296 1342
                     $scope.cloudMap.goTo(114.41276, 30.51515, 1, 16);//主校区
@@ -1312,52 +1358,7 @@ app.controller('charts3Ctrl', ["$scope", "$rootScope", "$state", "$timeout", "$i
1312 1358
                         move2()
1313 1359
                     }, 15000); //15秒
1314 1360
                 }
1315
-                // 右侧数据
1316
-                // 实时信息
1317
-                if(slideBoxLeft3 == 0 || slideBoxLeft3 == 3){
1318
-                    getIncident_allData({});
1319
-                    getIncident_responseData({})
1320
-                    getIncident_solveNowData({})
1321
-                    getIncident_solvedData({})
1322
-                }
1323
-                // 30天信息
1324
-                if(slideBoxLeft3 == 1 || slideBoxLeft3 == 4){
1325
-                    getYear_incident_total_month({
1326
-                        "start": lastMonth + " 00:00:00",
1327
-                        "end": yesterDay + " 23:59:59"
1328
-                    })
1329
-                    getIncident_solve_time_month({
1330
-                        "start": lastMonth + " 00:00:00",
1331
-                        "end": yesterDay + " 23:59:59"
1332
-                    })
1333
-                    getIncident_solve_total_month({
1334
-                        "start": lastMonth + " 00:00:00",
1335
-                        "end": yesterDay + " 23:59:59"
1336
-                    })
1337
-                    getIncident_degree_month({
1338
-                        "start": lastMonth + " 00:00:00",
1339
-                        "end": yesterDay + " 23:59:59"
1340
-                    })
1341
-                }
1342
-                // 一年信息
1343
-                if(slideBoxLeft3 == 2 || slideBoxLeft3 == 5){
1344
-                    getYear_incident_total({
1345
-                        "start": lastYear + " 00:00:00",
1346
-                        "end": yesterDay + " 23:59:59"
1347
-                    })
1348
-                    getIncident_solve_time({
1349
-                        "start": lastYear + " 00:00:00",
1350
-                        "end": yesterDay + " 23:59:59"
1351
-                    })
1352
-                    getIncident_solve_total({
1353
-                        "start": lastYear + " 00:00:00",
1354
-                        "end": yesterDay + " 23:59:59"
1355
-                    })
1356
-                    getIncident_degree({
1357
-                        "start": lastYear + " 00:00:00",
1358
-                        "end": yesterDay + " 23:59:59"
1359
-                    })
1360
-                }
1361
+
1361 1362
             }
1362 1363
         })
1363 1364
     }
@@ -1369,7 +1370,7 @@ app.controller('charts3Ctrl', ["$scope", "$rootScope", "$state", "$timeout", "$i
1369 1370
     //     "startTime": lastYear + " 00:00:00",
1370 1371
     //     "endTime": yesterDay + " 23:59:59"
1371 1372
     // })
1372
-    
1373
+
1373 1374
     // 结束
1374 1375
     // 地图聚合点信息----------------------------------------end
1375 1376
 
@@ -1402,12 +1403,12 @@ app.controller('charts3Ctrl', ["$scope", "$rootScope", "$state", "$timeout", "$i
1402 1403
             floorMap: "dark",
1403 1404
         };
1404 1405
         // 清除聚合图层
1405
-        $scope.delClusterLayer = function(name) { 
1406
+        $scope.delClusterLayer = function(name) {
1406 1407
             $scope.cloudMap.removeClusterLayer(name);
1407 1408
         }
1408 1409
         //聚合图层
1409
-        $scope.addClusterLayer = function(GLIDList, dataList, name) { 
1410
-            console.log(GLIDList, dataList, name);	
1410
+        $scope.addClusterLayer = function(GLIDList, dataList, name) {
1411
+            console.log(GLIDList, dataList, name);
1411 1412
             // name = '风险点';
1412 1413
 		    //建筑物GLID
1413 1414
             // GLIDList =["10192","10195","10157","10114","10314","10101","10288","10394","10427"];
@@ -1506,7 +1507,7 @@ app.controller('charts3Ctrl', ["$scope", "$rootScope", "$state", "$timeout", "$i
1506 1507
             // );
1507 1508
         });
1508 1509
 
1509
-        
1510
+
1510 1511
 
1511 1512
         function mapReady() {
1512 1513
             $scope.cloudMap.changeLayerVisible('2.5D底图', false);