|
@@ -1092,84 +1092,27 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
1092
|
1092
|
// }
|
1093
|
1093
|
}
|
1094
|
1094
|
//录音
|
1095
|
|
- $scope.play = function (data) {
|
1096
|
|
- var modalInstance = $modal.open({
|
1097
|
|
- backdrop: "static",
|
1098
|
|
- templateUrl: 'assets/views/incident/tpl/audio.html',
|
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
|
|
- }
|
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
|
|
- })
|
1116
|
|
- $scope.cancel = function () {
|
1117
|
|
- $modalInstance.dismiss('cancel');
|
1118
|
|
- };
|
1119
|
|
- $modalInstance.close();
|
1120
|
|
-
|
1121
|
|
-
|
1122
|
|
- }
|
1123
|
|
- });
|
1124
|
|
- modalInstance.result.then(function (result) {
|
1125
|
|
- }, function (reason) {
|
1126
|
|
- $rootScope.setidle();
|
1127
|
|
- });
|
1128
|
|
- };
|
1129
|
|
- //录音
|
1130
|
1095
|
// $scope.play = function (data) {
|
1131
|
|
- // // console.log($scope.item.callID)
|
1132
|
1096
|
// var modalInstance = $modal.open({
|
1133
|
1097
|
// backdrop: "static",
|
1134
|
1098
|
// 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
|
|
- // });
|
|
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
|
+ // }
|
1172
|
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
|
+ // })
|
1173
|
1116
|
// $scope.cancel = function () {
|
1174
|
1117
|
// $modalInstance.dismiss('cancel');
|
1175
|
1118
|
// };
|
|
@@ -1179,11 +1122,68 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
|
1179
|
1122
|
// }
|
1180
|
1123
|
// });
|
1181
|
1124
|
// modalInstance.result.then(function (result) {
|
1182
|
|
- // // $rootScope.setidle();
|
1183
|
1125
|
// }, function (reason) {
|
1184
|
1126
|
// $rootScope.setidle();
|
1185
|
1127
|
// });
|
1186
|
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.audioUrl = "";
|
|
1138
|
+ $http({
|
|
1139
|
+ url: "http://192.168.77.57:8088/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.audioUrl = $sce.trustAsResourceUrl("http://" + data.rrpath);
|
|
1148
|
+ }).error(function (data, status, headers, config) { });
|
|
1149
|
+ $scope.download = function (contentId, filename) {
|
|
1150
|
+ $http({
|
|
1151
|
+ url: $scope.audioUrl,
|
|
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
|
+ };
|
1187
|
1187
|
$scope.jry_paging = "";
|
1188
|
1188
|
//列表排序
|
1189
|
1189
|
// sessionStorage.idx = 0;
|