|
@@ -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(){
|