Browse Source

4.pc端事件列表的查看详情页面的关闭按钮不能点

seimin 11 months ago
parent
commit
0e4354bdec
1 changed files with 32 additions and 27 deletions
  1. 32 27
      assets/js/controllers/incident/incidentDetailCtrl.js

+ 32 - 27
assets/js/controllers/incident/incidentDetailCtrl.js

@@ -73,36 +73,41 @@ app.controller('incidentDetailCtrl', ["$scope", "$http", "i18nService", "$rootSc
73 73
 
74 74
     // 拨打电话
75 75
     $scope.dialout = function (teleno) {
76
+      $rootScope.callout = 2;
77
+      if (localStorage.getItem('fenjiNumber')) {
78
+        $rootScope.toggle('off-sidebar');
79
+      }else if(localStorage.getItem('hk_phone')){
80
+        var gid = "@0"
81
+        var telephone = '9' + teleno
76 82
         $rootScope.callout = 2;
77
-        if (localStorage.getItem('fenjiNumber')) {
78
-          $rootScope.toggle('off-sidebar');
79
-        }else if(localStorage.getItem('hk_phone')){
80
-          var gid = "@0"
81
-          var telephone = '9' + teleno
82
-          $rootScope.callout = 2;
83
-          if ($rootScope.takes) {
84
-              api_text.dialout($rootScope.takes, gid, telephone).then(function (data) {
85
-                  if (data.errno == 0) {
86
-                      $rootScope.status = 6;
87
-                  }
88
-              })
89
-          } else {
90
-              SweetAlert.swal({
91
-                  title: "呼叫失败",
92
-                  text: "请先签入呼叫中心!",
93
-                  type: "error",
94
-                  confirmButtonColor: "#DD6B55"
95
-              });
96
-          }
83
+        if ($rootScope.takes) {
84
+            api_text.dialout($rootScope.takes, gid, telephone).then(function (data) {
85
+                if (data.errno == 0) {
86
+                    $rootScope.status = 6;
87
+                }
88
+            })
97 89
         } else {
98
-          SweetAlert.swal({
99
-            title: "呼叫失败",
100
-            text: "请先签入呼叫中心!",
101
-            type: "error",
102
-            confirmButtonColor: "#DD6B55",
103
-          });
90
+            SweetAlert.swal({
91
+                title: "呼叫失败",
92
+                text: "请先签入呼叫中心!",
93
+                type: "error",
94
+                confirmButtonColor: "#DD6B55"
95
+            });
104 96
         }
105
-      };
97
+      } else {
98
+        SweetAlert.swal({
99
+          title: "呼叫失败",
100
+          text: "请先签入呼叫中心!",
101
+          type: "error",
102
+          confirmButtonColor: "#DD6B55",
103
+        });
104
+      }
105
+    };
106
+
107
+    // 关闭
108
+    $scope.closeModel = function () {
109
+      $state.go('app.incident.list', {});
110
+    };
106 111
 
107 112
     // init
108 113
     $scope.init = function(){