Browse Source

事件列表数量

seimin 1 year ago
parent
commit
11fdf0a8a4
1 changed files with 12 additions and 7 deletions
  1. 12 7
      assets/js/controllers/incident/incidentCtrl.js

+ 12 - 7
assets/js/controllers/incident/incidentCtrl.js

@@ -2209,19 +2209,23 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
2209
         }, function () {
2209
         }, function () {
2210
             $scope.ldloading[style.replace('-', '_')] = false;
2210
             $scope.ldloading[style.replace('-', '_')] = false;
2211
         });
2211
         });
2212
+    }, 500);
2212
 
2213
 
2213
-        // 调用接口-查数量
2214
+    // 调用接口-查数量
2215
+    $scope.count = function (){
2214
         let numPostData = {
2216
         let numPostData = {
2215
-            tabs: $scope.tabs.map(v => v.key).toString(),
2216
-            assignee: loginUser.id,
2217
-            candidateGroups: loginuserGroup,
2217
+            incident: {
2218
+                queryTask: $scope.tabs.map(v => v.key).toString(),
2219
+                assignee: loginUser.id,
2220
+                candidateGroups: loginuserGroup,
2221
+            }
2218
         }
2222
         }
2219
         if($rootScope.user.duty){
2223
         if($rootScope.user.duty){
2220
             // 当前的所属责任科室
2224
             // 当前的所属责任科室
2221
-            numPostData.dutyId = $rootScope.user.duty.id;
2225
+            numPostData.incident.dutyId = $rootScope.user.duty.id;
2222
         }else if($rootScope.user.branch){
2226
         }else if($rootScope.user.branch){
2223
             // 当前的所属院区
2227
             // 当前的所属院区
2224
-            numPostData.branchId = $rootScope.user.branch.id;
2228
+            numPostData.incident.branchId = $rootScope.user.branch.id;
2225
         }
2229
         }
2226
         api_flow.count(numPostData).then(function (data) {
2230
         api_flow.count(numPostData).then(function (data) {
2227
             if (data.state == 200) {
2231
             if (data.state == 200) {
@@ -2241,9 +2245,10 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
2241
         }, function () {
2245
         }, function () {
2242
             $scope.ldloading[style.replace('-', '_')] = false;
2246
             $scope.ldloading[style.replace('-', '_')] = false;
2243
         });
2247
         });
2244
-    }, 500);
2248
+    }
2245
     // 进入页面时
2249
     // 进入页面时
2246
     $scope.getIncidentStatus();
2250
     $scope.getIncidentStatus();
2251
+    $scope.count();
2247
 
2252
 
2248
     $scope.timer = $interval(function () {
2253
     $scope.timer = $interval(function () {
2249
         $scope.jry_refresh()
2254
         $scope.jry_refresh()