Explorar el Código

沟通记录字段修改

seimin hace 2 años
padre
commit
1bd03f991b

+ 2 - 2
assets/js/controllers/customform/customformCtrl.js

@@ -13507,8 +13507,8 @@ appFormly.config(function config(formlyConfigProvider) {
13507 13507
               backdrop: "static",
13508 13508
               templateUrl: 'assets/views/incident/tpl/audio.html',
13509 13509
               controller: function($rootScope, $scope, $modalInstance, $sce, $http, api_playservice) {
13510
-                  // $scope.audioUrl=$sce.trustAsResourceUrl(callIp+data.recordingFileName);
13511
-                  $scope.audioUrl=$sce.trustAsResourceUrl('https://www.runoob.com/try/demo_source/horse.ogg');//暂时写死
13510
+                  $scope.audioUrl=$sce.trustAsResourceUrl(callIp+data.recordingFileName);
13511
+                  // $scope.audioUrl=$sce.trustAsResourceUrl('https://www.runoob.com/try/demo_source/horse.ogg');//暂时写死
13512 13512
                   $scope.cancel = function() {
13513 13513
                       $modalInstance.dismiss('cancel');
13514 13514
                   };

+ 89 - 42
assets/js/controllers/incident/incidentCtrl.js

@@ -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>' +

+ 4 - 2
assets/js/controllers/loginCtrl.js

@@ -5,9 +5,11 @@ app.controller('LoginCtrl', ['$rootScope', '$scope', '$state', '$translate', '$l
5 5
         //判断项目归属 start
6 6
         //因项目众多,前端为了加以区分,所以用域名加以判断,后期有更好的方式可以自行修改
7 7
         // 中南财大
8
-        $rootScope.isZncd = document.domain === 'itsm.zuel.edu.cn';
8
+        // $rootScope.isZncd = document.domain === 'itsm.zuel.edu.cn';
9
+        $rootScope.isZncd = false;
9 10
         // 华科
10
-        $rootScope.isHk = document.domain === '192.168.3.110' || document.domain === '192.168.3.69' || document.domain === '172.16.7.91' || document.domain === '192.168.3.105' || document.domain === 'localhost' || document.domain === '192.168.77.59';
11
+        // $rootScope.isHk = document.domain === '192.168.3.110' || document.domain === '192.168.3.69' || document.domain === '172.16.7.91' || document.domain === '192.168.3.105' || document.domain === 'localhost' || document.domain === '192.168.77.59';
12
+        $rootScope.isHk = true;
11 13
         if($rootScope.isZncd){
12 14
             localStorage.setItem('version_qd','isZncd');
13 15
         }

+ 6 - 0
assets/js/controllers/system/processdesign/incidentplan/incidentSetUpCtrl.js

@@ -655,6 +655,9 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
655 655
         var filedata = { "incidentcategory": formdata }
656 656
         filedata.incidentcategory.branchType = Number(filedata.incidentcategory.branchType);
657 657
         console.log(filedata,$scope.userGroupChecked);
658
+        if(filedata.incidentcategory.branchUserGroups && Array.isArray(filedata.incidentcategory.branchUserGroups)){
659
+            filedata.incidentcategory.branchUserGroups = filedata.incidentcategory.branchUserGroups.filter(v => v.branchUserOrGroupType); 
660
+        }
658 661
         // return;
659 662
         api_bpm_data.updData('incidentcategory', filedata).then(function(response) {
660 663
             if (response) {
@@ -808,6 +811,9 @@ app.controller('incidentSetUp', ["$rootScope", "$scope", "$state", "$timeout", "
808 811
         
809 812
         
810 813
         var filedata = { "incidentcategory": formdata }
814
+        if(filedata.incidentcategory.branchUserGroups && Array.isArray(filedata.incidentcategory.branchUserGroups)){
815
+            filedata.incidentcategory.branchUserGroups = filedata.incidentcategory.branchUserGroups.filter(v => v.branchUserOrGroupType); 
816
+        }
811 817
         console.log(filedata);
812 818
         // return;
813 819
         api_bpm_data.addData('incidentcategory', filedata).then(function(response) {

+ 2 - 2
assets/views/customform/tpl/ui-handlerLog.html

@@ -19,9 +19,9 @@
19 19
                             <td class="center">{{$index + 1}}</td>
20 20
                             <td class="center">{{item.opTime|date:'yyyy-MM-dd HH:mm:ss'}}</td>
21 21
                             <td class="center">{{item.userName}}</td>
22
-                            <td class="center">暂时写死</td>
22
+                            <td class="center">{{item.callRecord?item.callRecord.destinationNumber:''}}</td>
23 23
                             <td class="center" style="white-space: normal;word-break:break-all">{{item.opValue}}</td>
24
-                            <td class="center"><a ng-click="recordcall(item)" ng-if="true" class="bianjifont">通话录音</a></td>
24
+                            <td class="center"><a ng-click="recordcall(item.callRecord)" ng-if="item.callRecord" class="bianjifont">通话录音</a></td>
25 25
                         </tr>
26 26
                     </tbody>
27 27
                 </table>