seimin 3 years ago
parent
commit
258fe6b177

+ 2 - 8
src/app/share/allocation-worker/allocation-worker.component.ts

@@ -1,6 +1,5 @@
1
-import { Component, OnInit, Output, EventEmitter } from "@angular/core";
2
-import { ActivatedRoute, Router } from "@angular/router";
3
-import { Location } from "@angular/common";
1
+import { Component, OnInit } from "@angular/core";
2
+import { ActivatedRoute } from "@angular/router";
4 3
 import { MainService } from "../../services/main.service";
5 4
 
6 5
 @Component({
@@ -11,8 +10,6 @@ import { MainService } from "../../services/main.service";
11 10
 export class AllocationWorkerComponent implements OnInit {
12 11
   constructor(
13 12
     private route: ActivatedRoute,
14
-    private router: Router,
15
-    private location: Location,
16 13
     private mainService: MainService
17 14
   ) {}
18 15
 
@@ -144,8 +141,6 @@ export class AllocationWorkerComponent implements OnInit {
144 141
       };
145 142
     }
146 143
     that.mainService.assignWorker(postData, flags).subscribe((data) => {
147
-      console.log(data);
148
-      // that.close();
149 144
       that.btnLoading = false;
150 145
       if (data.status == 200) {
151 146
         that.showPromptModal("分配", true, "");
@@ -157,7 +152,6 @@ export class AllocationWorkerComponent implements OnInit {
157 152
 
158 153
   // 关闭弹框
159 154
   close() {
160
-    // this.router.navigateByUrl('dispatchingDesk');
161 155
     history.go(-1);
162 156
   }
163 157
 

+ 1 - 1
src/app/views/fuwutai/fuwutai.component.html

@@ -1427,4 +1427,4 @@
1427 1427
 <app-select-dept [createLoading]="createLoading" [deptFlag]="deptFlag" (submitFormHand)="submitFormHand($event)"
1428 1428
   (deptFlagHand)="deptFlagHand($event)" [hosId]="checkedHos" *ngIf="deptFlag"></app-select-dept>
1429 1429
 
1430
-<router-outlet (deactivate)="refreshList()"></router-outlet>
1430
+<router-outlet (deactivate)="refreshList($event)"></router-outlet>

+ 4 - 4
src/app/views/fuwutai/fuwutai.component.ts

@@ -825,7 +825,10 @@ export class FuwutaiComponent implements OnInit {
825 825
     this.batchType1 = false;
826 826
   }
827 827
   // 刷新工单列表
828
-  refreshList() {
828
+  refreshList(e) {
829
+    if (!e.promptContent) {
830
+      return;
831
+    }
829 832
     this.getUnassignedBuilding2();
830 833
     this.resetList();
831 834
     this.getOrderList(1);
@@ -905,13 +908,10 @@ export class FuwutaiComponent implements OnInit {
905 908
         postData.workOrder["deptIds"] = this.unassignedBuilding.toString();
906 909
       }
907 910
       that.loading1 = true;
908
-      that.loading2 = that.loading3 = false;
909 911
     } else if (stateId == 2) {
910 912
       that.loading2 = true;
911
-      that.loading1 = that.loading3 = false;
912 913
     } else if (stateId == 3) {
913 914
       that.loading3 = true;
914
-      that.loading1 = that.loading2 = false;
915 915
     }
916 916
     console.log(postData);
917 917
     that.mainService