Browse Source

留言列表bugfix

seimin 2 years ago
parent
commit
f2d1aca615

+ 19 - 4
assets/js/controllers/desk/recordCtrl.js

@@ -193,7 +193,7 @@ app.controller("recordCtrl", [
193
       gridApi.pagination.on.paginationChanged(
193
       gridApi.pagination.on.paginationChanged(
194
         $scope,
194
         $scope,
195
         function (newPage, pageSize) {
195
         function (newPage, pageSize) {
196
-          var filtersData = $scope.memoryfilterData;
196
+          var filtersData = $scope.filData;
197
           filtersData.idx = newPage - 1;
197
           filtersData.idx = newPage - 1;
198
           filtersData.sum = pageSize;
198
           filtersData.sum = pageSize;
199
           $scope.refreshData("expand-right", filtersData);
199
           $scope.refreshData("expand-right", filtersData);
@@ -715,7 +715,7 @@ app.controller("recordCtrl", [
715
           id: data.id,
715
           id: data.id,
716
           field1: "1",
716
           field1: "1",
717
           isValid: data.isValid,
717
           isValid: data.isValid,
718
-          isExcute: data.isExcute,
718
+          isExcute: (data.isExcute === 0 || data.isExcute) ? data.isExcute : undefined
719
         })
719
         })
720
         .then(function (data) {
720
         .then(function (data) {
721
           if (data.status) {
721
           if (data.status) {
@@ -825,9 +825,14 @@ app.controller("recordCtrl", [
825
       } else if (data == "bushouli") {
825
       } else if (data == "bushouli") {
826
         toData = 2;
826
         toData = 2;
827
       }
827
       }
828
-      $scope.filData.hjzxRecord.isExcute = toData;
828
+      $scope.filData.idx = 0;
829
+      $scope.filData.hjzxRecord.isExcute = (toData === 0 || toData) ? toData : undefined;
830
+      if($scope.searchstate == data){
831
+        $scope.refreshData("expand-right", $scope.filData);
832
+      }else{
833
+        $scope.gridOptions.paginationCurrentPage = 0;
834
+      }
829
       $scope.searchstate = data;
835
       $scope.searchstate = data;
830
-      $scope.refreshData("expand-right", $scope.filData);
831
     };
836
     };
832
     // 搜索
837
     // 搜索
833
     $scope.search = function () {
838
     $scope.search = function () {
@@ -857,6 +862,15 @@ app.controller("recordCtrl", [
857
       }
862
       }
858
       $scope.myData = [];
863
       $scope.myData = [];
859
       $scope.gridOptions["sum"] = filterData.sum;
864
       $scope.gridOptions["sum"] = filterData.sum;
865
+      var toData = '';
866
+      if ($scope.searchstate == "weishouli") {
867
+        toData = 0;
868
+      } else if ($scope.searchstate == "yishouli") {
869
+        toData = 1;
870
+      } else if ($scope.searchstate == "bushouli") {
871
+        toData = 2;
872
+      }
873
+      filterData.hjzxRecord.isExcute = (toData === 0 || toData) ? toData : undefined;
860
       api_bpm_data.fetchDataList("hjzxRecord", filterData).then(
874
       api_bpm_data.fetchDataList("hjzxRecord", filterData).then(
861
         function (data) {
875
         function (data) {
862
           var myData = Restangular.stripRestangular(data);
876
           var myData = Restangular.stripRestangular(data);
@@ -883,6 +897,7 @@ app.controller("recordCtrl", [
883
       }
897
       }
884
       // $scope.myData = [];
898
       // $scope.myData = [];
885
       $scope.gridOptions["sum"] = filterData.sum;
899
       $scope.gridOptions["sum"] = filterData.sum;
900
+      $scope.gridOptions.paginationCurrentPage = filterData.idx + 1;
886
       api_bpm_data.fetchDataList("hjzxRecord", filterData).then(
901
       api_bpm_data.fetchDataList("hjzxRecord", filterData).then(
887
         function (data) {
902
         function (data) {
888
           var myData = Restangular.stripRestangular(data);
903
           var myData = Restangular.stripRestangular(data);

+ 2 - 2
assets/js/controllers/incident/incidentCtrl.js

@@ -1133,7 +1133,7 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
1133
             backdrop: "static",
1133
             backdrop: "static",
1134
             templateUrl: 'assets/views/incident/tpl/audio.html',
1134
             templateUrl: 'assets/views/incident/tpl/audio.html',
1135
             controller: function ($rootScope, $scope, $modalInstance, $sce, $http, api_playservice) {
1135
             controller: function ($rootScope, $scope, $modalInstance, $sce, $http, api_playservice) {
1136
-                // $rootScope.setbusy();
1136
+                $rootScope.setbusy();
1137
                 $scope.audioUrl = "";
1137
                 $scope.audioUrl = "";
1138
                 $http({
1138
                 $http({
1139
                     url: "http://192.168.77.57:8088/recording/recording?callID=" + data.callID,
1139
                     url: "http://192.168.77.57:8088/recording/recording?callID=" + data.callID,
@@ -1181,7 +1181,7 @@ app.controller('incidentListCtrl', ["$scope", "$http", "i18nService", "$rootScop
1181
         modalInstance.result.then(function (result) {
1181
         modalInstance.result.then(function (result) {
1182
             // $rootScope.setidle();
1182
             // $rootScope.setidle();
1183
         }, function (reason) {
1183
         }, function (reason) {
1184
-            // $rootScope.setidle();
1184
+            $rootScope.setidle();
1185
         });
1185
         });
1186
     };
1186
     };
1187
     $scope.jry_paging = "";
1187
     $scope.jry_paging = "";