|
@@ -1093,48 +1093,26 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
1093
|
1093
|
}
|
1094
|
1094
|
//录音
|
1095
|
1095
|
$scope.play = function (data) {
|
1096
|
|
- // console.log($scope.item.callID)
|
1097
|
1096
|
var modalInstance = $modal.open({
|
1098
|
1097
|
backdrop: "static",
|
1099
|
1098
|
templateUrl: 'assets/views/incident/tpl/audio.html',
|
1100
|
|
- controller: function ($rootScope, $scope, $modalInstance, $sce, $http, api_playservice) {
|
1101
|
|
- $rootScope.setbusy();
|
1102
|
|
- $scope.datasurl = "";
|
1103
|
|
- $http({
|
1104
|
|
- url: callIp + "/recording/recording?callID=" + data.callID,
|
1105
|
|
- method: 'GET',
|
1106
|
|
- headers: {},
|
1107
|
|
- }).success(function (data, status, headers, config) {
|
1108
|
|
- $scope.data = {
|
1109
|
|
- "name": "视频",
|
1110
|
|
- "url": $sce.trustAsResourceUrl("http://" + data.rrpath)
|
1111
|
|
- };
|
1112
|
|
- $scope.datasurl = data.rrpath;
|
1113
|
|
- }).error(function (data, status, headers, config) { });
|
1114
|
|
- $scope.download = function (contentId, filename) {
|
1115
|
|
- $http({
|
1116
|
|
- url: "http://" + $scope.datasurl,
|
1117
|
|
- method: 'GET',
|
1118
|
|
- headers: {
|
1119
|
|
- 'Content-type': 'application/octet-stream',
|
1120
|
|
- },
|
1121
|
|
- responseType: 'arraybuffer'
|
1122
|
|
- }).success(function (data, status, headers, config) {
|
1123
|
|
- var file = new Blob([data], {
|
1124
|
|
- type: 'application/octet-stream'
|
1125
|
|
- });
|
1126
|
|
- //trick to download store a file having its URL
|
1127
|
|
- var fileURL = URL.createObjectURL(file);
|
1128
|
|
- var a = document.createElement('a');
|
1129
|
|
- a.href = fileURL;
|
1130
|
|
- a.target = '_blank';
|
1131
|
|
- a.download = filename;
|
1132
|
|
- document.body.appendChild(a);
|
1133
|
|
- a.click();
|
1134
|
|
- }).error(function (data, status, headers, config) {
|
1135
|
|
- // console.log(data);
|
1136
|
|
- });
|
|
1099
|
+ controller: function ($rootScope, $scope, $modalInstance, $sce, $http, api_playservice, api_user_data) {
|
|
1100
|
+ var postData = {
|
|
1101
|
+ idx:0,
|
|
1102
|
+ sum:1,
|
|
1103
|
+ callRecord: {
|
|
1104
|
+ callId: data.callID
|
|
1105
|
+ }
|
1137
|
1106
|
}
|
|
1107
|
+ api_user_data.fetchDataList('callrecord', postData).then(function (response) {
|
|
1108
|
+ if (response) {
|
|
1109
|
+ if (response.status = 200) {
|
|
1110
|
+ if(response.list[0]){
|
|
1111
|
+ $scope.audioUrl=$sce.trustAsResourceUrl(callIp+response.list[0].recordingFileName);
|
|
1112
|
+ }
|
|
1113
|
+ }
|
|
1114
|
+ }
|
|
1115
|
+ })
|
1138
|
1116
|
$scope.cancel = function () {
|
1139
|
1117
|
$modalInstance.dismiss('cancel');
|
1140
|
1118
|
};
|
|
@@ -1144,11 +1122,68 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
1144
|
1122
|
}
|
1145
|
1123
|
});
|
1146
|
1124
|
modalInstance.result.then(function (result) {
|
1147
|
|
- // $rootScope.setidle();
|
1148
|
1125
|
}, function (reason) {
|
1149
|
1126
|
$rootScope.setidle();
|
1150
|
1127
|
});
|
1151
|
1128
|
};
|
|
1129
|
+ //录音
|
|
1130
|
+ // $scope.play = function (data) {
|
|
1131
|
+ // // console.log($scope.item.callID)
|
|
1132
|
+ // var modalInstance = $modal.open({
|
|
1133
|
+ // backdrop: "static",
|
|
1134
|
+ // templateUrl: 'assets/views/incident/tpl/audio.html',
|
|
1135
|
+ // controller: function ($rootScope, $scope, $modalInstance, $sce, $http, api_playservice) {
|
|
1136
|
+ // $rootScope.setbusy();
|
|
1137
|
+ // $scope.datasurl = "";
|
|
1138
|
+ // $http({
|
|
1139
|
+ // url: callIp + "/recording/recording?callID=" + data.callID,
|
|
1140
|
+ // method: 'GET',
|
|
1141
|
+ // headers: {},
|
|
1142
|
+ // }).success(function (data, status, headers, config) {
|
|
1143
|
+ // $scope.data = {
|
|
1144
|
+ // "name": "视频",
|
|
1145
|
+ // "url": $sce.trustAsResourceUrl("http://" + data.rrpath)
|
|
1146
|
+ // };
|
|
1147
|
+ // $scope.datasurl = data.rrpath;
|
|
1148
|
+ // }).error(function (data, status, headers, config) { });
|
|
1149
|
+ // $scope.download = function (contentId, filename) {
|
|
1150
|
+ // $http({
|
|
1151
|
+ // url: "http://" + $scope.datasurl,
|
|
1152
|
+ // method: 'GET',
|
|
1153
|
+ // headers: {
|
|
1154
|
+ // 'Content-type': 'application/octet-stream',
|
|
1155
|
+ // },
|
|
1156
|
+ // responseType: 'arraybuffer'
|
|
1157
|
+ // }).success(function (data, status, headers, config) {
|
|
1158
|
+ // var file = new Blob([data], {
|
|
1159
|
+ // type: 'application/octet-stream'
|
|
1160
|
+ // });
|
|
1161
|
+ // //trick to download store a file having its URL
|
|
1162
|
+ // var fileURL = URL.createObjectURL(file);
|
|
1163
|
+ // var a = document.createElement('a');
|
|
1164
|
+ // a.href = fileURL;
|
|
1165
|
+ // a.target = '_blank';
|
|
1166
|
+ // a.download = filename;
|
|
1167
|
+ // document.body.appendChild(a);
|
|
1168
|
+ // a.click();
|
|
1169
|
+ // }).error(function (data, status, headers, config) {
|
|
1170
|
+ // // console.log(data);
|
|
1171
|
+ // });
|
|
1172
|
+ // }
|
|
1173
|
+ // $scope.cancel = function () {
|
|
1174
|
+ // $modalInstance.dismiss('cancel');
|
|
1175
|
+ // };
|
|
1176
|
+ // $modalInstance.close();
|
|
1177
|
+
|
|
1178
|
+
|
|
1179
|
+ // }
|
|
1180
|
+ // });
|
|
1181
|
+ // modalInstance.result.then(function (result) {
|
|
1182
|
+ // // $rootScope.setidle();
|
|
1183
|
+ // }, function (reason) {
|
|
1184
|
+ // $rootScope.setidle();
|
|
1185
|
+ // });
|
|
1186
|
+ // };
|
1152
|
1187
|
$scope.jry_paging = "";
|
1153
|
1188
|
//列表排序
|
1154
|
1189
|
// sessionStorage.idx = 0;
|
|
@@ -2336,6 +2371,7 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
2336
|
2371
|
}
|
2337
|
2372
|
});
|
2338
|
2373
|
}
|
|
2374
|
+
|
2339
|
2375
|
// 新增沟通记录弹窗
|
2340
|
2376
|
$scope.toHandlerLog = function (model) {
|
2341
|
2377
|
console.log(model)
|
|
@@ -2352,6 +2388,17 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
2352
|
2388
|
$scope.hdPhone = phone;
|
2353
|
2389
|
}
|
2354
|
2390
|
|
|
2391
|
+ // 测试 start
|
|
2392
|
+ // api_bpm_data.getCallRecordId({ano: '1501', bno: '13297968972', agentId: 46}).then(function(response){
|
|
2393
|
+ // console.log(response)
|
|
2394
|
+ // if (response.status == 200) {
|
|
2395
|
+ // $scope.callId = response.data || undefined;
|
|
2396
|
+ // } else {
|
|
2397
|
+ // $scope.callId = undefined;
|
|
2398
|
+ // }
|
|
2399
|
+ // });
|
|
2400
|
+ // 测试 end
|
|
2401
|
+
|
2355
|
2402
|
$scope.dialout = function (teleno) {
|
2356
|
2403
|
$rootScope.callout = 2;
|
2357
|
2404
|
if (localStorage.getItem('fenjiNumber')) {
|
|
@@ -2367,10 +2414,10 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
2367
|
2414
|
$rootScope.isMask = false;
|
2368
|
2415
|
if (data.errno == 0) {
|
2369
|
2416
|
$rootScope.status = 6;
|
2370
|
|
- api_bpm_data.getCallRecordId('getCallRecordId',{ano: data.ano, bno: data.bno, agentId: data.agentID}).then(function(response){
|
|
2417
|
+ api_bpm_data.getCallRecordId({ano: data.ano, bno: data.bno, agentId: data.agentID}).then(function(response){
|
2371
|
2418
|
console.log(response)
|
2372
|
2419
|
if (response.status == 200) {
|
2373
|
|
- $scope.callId = response.data || undefined;//暂时写死
|
|
2420
|
+ $scope.callId = response.data || undefined;
|
2374
|
2421
|
} else {
|
2375
|
2422
|
$scope.callId = undefined;
|
2376
|
2423
|
}
|
|
@@ -3186,7 +3233,7 @@ app.directive('incidentoperator', function () {
|
3186
|
3233
|
'<a ng-click="delSj()" ng-show="{{delFlag&&item.state.value!== \'deleted\'}}" class="assign" >删除</a>' +
|
3187
|
3234
|
'<a ng-click="print()" ng-show="dayin" class="bianjifont" >打印</a>' +
|
3188
|
3235
|
// '<a ng-click="jry_evaluate()" ng-show="jry_evaluateShow()" class="luyinfont" >评价</a>' +
|
3189
|
|
- // '<a ng-click="record()" ng-show="{{item.listen}}" class="luyinfont" >录音</a>' +
|
|
3236
|
+ '<a ng-click="record()" ng-show="{{item.callID}}" class="luyinfont" >录音</a>' +
|
3190
|
3237
|
// '<a ng-click="rotate()" ng-show="{{item.state.id==4}}" class="rotate" >转派</a>' +
|
3191
|
3238
|
// '<a ng-click="upgrade()" ng-show="{{up&&item.state.id==4&&item.currentRole!=' + "'incident manager'" + '}}" class="upgrade" >升级</a>' +
|
3192
|
3239
|
// '<a ng-click="problem()" ng-show="{{item.state.id==5&&item.currentRole!=' + "'incident manager'" + '}}" class="upgrade" >问题升级</a>' +
|