seimin vor 1 Jahr
Ursprung
Commit
901288d35f
1 geänderte Dateien mit 41 neuen und 1 gelöschten Zeilen
  1. 41 1
      assets/js/controllers/mainCtrl.js

+ 41 - 1
assets/js/controllers/mainCtrl.js

@@ -3401,7 +3401,45 @@ function ($rootScope, $scope, $state, $translate, $localStorage, $cookieStore, $
3401 3401
           for (var i = 0; i < $rootScope.user.group.length; i++) {
3402 3402
             groupArr.push($rootScope.user.group[i].id)
3403 3403
           }
3404
-          api_bpm_data.getCount({ "assignee": $rootScope.user.id, "candidateGroups": groupArr.join(), "idx": 0, "sum": 1000 }).then(function (response) {
3404
+
3405
+          var postData = {
3406
+            "assignee": $rootScope.user.id,
3407
+            "candidateGroups": groupArr.join(),
3408
+            "idx": 0,
3409
+            "sum": 1000
3410
+          }
3411
+
3412
+          $scope.tabs = [
3413
+            // {key: 'all', value: '全部事件', num: ''},
3414
+            {key: 'todo', value: '待我接单', num: ''},
3415
+            {key: 'doing', value: '待我处理', num: ''},
3416
+            // {key: 'reassign', value: '重新指派', num: ''},
3417
+            // {key: 'callback', value: '待我回访', num: ''},
3418
+            {key: 'resolve', value: '由我解决', num: ''},
3419
+            {key: 'owns', value: '与我关联', num: ''},
3420
+            {key: 'storage', value: '暂存', num: ''},
3421
+          ]
3422
+
3423
+          for (var i = 0; i < loginUser.menu.length; i++) {
3424
+              if (loginUser.menu[i].link == "shijianliebiao_all") {
3425
+                  $scope.tabs.splice(0, 0 , {key: 'all', value: '全部事件', num: ''});
3426
+              }
3427
+              if (loginUser.menu[i].link == "shijianliebiao_huifang") {
3428
+                  let index = $scope.tabs.findIndex(v => v.key == 'resolve');
3429
+                  $scope.tabs.splice(index, 0 , {key: 'callback', value: '待我回访', num: ''});
3430
+              }
3431
+              if (loginUser.menu[i].link == "shijianliebiao_reassign") {
3432
+                  let index = $scope.tabs.findIndex(v => v.key == 'doing');
3433
+                  $scope.tabs.splice(index + 1, 0 , {key: 'reassign', value: '重新指派', num: ''});
3434
+              }
3435
+              if (loginUser.menu[i].link == "shijianliebiao_daochu") {
3436
+                  $scope.daochu = true
3437
+              }
3438
+          }
3439
+
3440
+          postData.queryTask = $scope.tabs.map(v => v.key).toString()
3441
+
3442
+          api_bpm_data.getCount(postData).then(function (response) {
3405 3443
             angular.forEach($rootScope.userMenus, function (item, i) {
3406 3444
               item.tipshow = false;
3407 3445
               if (response) {
@@ -3799,7 +3837,9 @@ function ($rootScope, $scope, $state, $translate, $localStorage, $cookieStore, $
3799 3837
             //暂存生成事件,数据回显
3800 3838
             // 报修图片
3801 3839
             if (modelData.incident) {
3840
+              $rootScope.isMask = true;
3802 3841
               api_wechatfile.listAttachment("wechatRequesterIncident", modelData.incident.id).then( (res) => {
3842
+                  $rootScope.isMask = false;
3803 3843
                   $scope.requestImgs = res.data || [];
3804 3844
               });
3805 3845
             }