浏览代码

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

seimin 11 月之前
父节点
当前提交
0e4354bdec
共有 1 个文件被更改,包括 32 次插入27 次删除
  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
     $scope.dialout = function (teleno) {
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
         $rootScope.callout = 2;
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
         } else {
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
     // init
112
     // init
108
     $scope.init = function(){
113
     $scope.init = function(){