Browse Source

建单后事件列表不刷新BUG

seimin 1 year ago
parent
commit
af14ce95f5
1 changed files with 25 additions and 5 deletions
  1. 25 5
      assets/js/controllers/mainCtrl.js

+ 25 - 5
assets/js/controllers/mainCtrl.js

@@ -3991,7 +3991,11 @@ function ($rootScope, $scope, $state, $translate, $localStorage, $cookieStore, $
3991 3991
                         $modalInstance.dismiss("cancel");
3992 3992
                       }
3993 3993
                       $rootScope.newOrderShowOpen = false;
3994
-                      $state.go("app.incident.list");
3994
+                      if($state.current.name === 'app.incident.list'){
3995
+                        $state.reload();
3996
+                      }else{
3997
+                        $state.go("app.incident.list");
3998
+                      }
3995 3999
                     }
3996 4000
                   }
3997 4001
                 );
@@ -4070,7 +4074,11 @@ function ($rootScope, $scope, $state, $translate, $localStorage, $cookieStore, $
4070 4074
                         $modalInstance.dismiss("cancel");
4071 4075
                       }
4072 4076
                       $rootScope.newOrderShowOpen = false;
4073
-                      $state.go("app.incident.list");
4077
+                      if($state.current.name === 'app.incident.list'){
4078
+                        $state.reload();
4079
+                      }else{
4080
+                        $state.go("app.incident.list");
4081
+                      }
4074 4082
                     }
4075 4083
                   }
4076 4084
                 );
@@ -4496,7 +4504,11 @@ function ($rootScope, $scope, $state, $translate, $localStorage, $cookieStore, $
4496 4504
                                         scope.cancel();
4497 4505
                                       }
4498 4506
                                       $rootScope.newOrderShowOpen = false;
4499
-                                      $state.go("app.incident.list");
4507
+                                      if($state.current.name === 'app.incident.list'){
4508
+                                        $state.reload();
4509
+                                      }else{
4510
+                                        $state.go("app.incident.list");
4511
+                                      }
4500 4512
                                     }
4501 4513
                                   }
4502 4514
                                 );
@@ -4524,7 +4536,11 @@ function ($rootScope, $scope, $state, $translate, $localStorage, $cookieStore, $
4524 4536
                               scope.cancel();
4525 4537
                               $modalInstance.dismiss("cancel");
4526 4538
                               $rootScope.newOrderShowOpen = false;
4527
-                              $state.go("app.incident.list");
4539
+                              if($state.current.name === 'app.incident.list'){
4540
+                                $state.reload();
4541
+                              }else{
4542
+                                $state.go("app.incident.list");
4543
+                              }
4528 4544
                             }
4529 4545
                           }
4530 4546
                         );
@@ -4554,7 +4570,11 @@ function ($rootScope, $scope, $state, $translate, $localStorage, $cookieStore, $
4554 4570
                               scope.cancel();
4555 4571
                             }
4556 4572
                             $rootScope.newOrderShowOpen = false;
4557
-                            $state.go("app.incident.list");
4573
+                            if($state.current.name === 'app.incident.list'){
4574
+                              $state.reload();
4575
+                            }else{
4576
+                              $state.go("app.incident.list");
4577
+                            }
4558 4578
                           }
4559 4579
                         }
4560 4580
                       );