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

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

@@ -1427,4 +1427,4 @@
1427
 <app-select-dept [createLoading]="createLoading" [deptFlag]="deptFlag" (submitFormHand)="submitFormHand($event)"
1427
 <app-select-dept [createLoading]="createLoading" [deptFlag]="deptFlag" (submitFormHand)="submitFormHand($event)"
1428
   (deptFlagHand)="deptFlagHand($event)" [hosId]="checkedHos" *ngIf="deptFlag"></app-select-dept>
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
     this.batchType1 = false;
825
     this.batchType1 = false;
826
   }
826
   }
827
   // 刷新工单列表
827
   // 刷新工单列表
828
-  refreshList() {
828
+  refreshList(e) {
829
+    if (!e.promptContent) {
830
+      return;
831
+    }
829
     this.getUnassignedBuilding2();
832
     this.getUnassignedBuilding2();
830
     this.resetList();
833
     this.resetList();
831
     this.getOrderList(1);
834
     this.getOrderList(1);
@@ -905,13 +908,10 @@ export class FuwutaiComponent implements OnInit {
905
         postData.workOrder["deptIds"] = this.unassignedBuilding.toString();
908
         postData.workOrder["deptIds"] = this.unassignedBuilding.toString();
906
       }
909
       }
907
       that.loading1 = true;
910
       that.loading1 = true;
908
-      that.loading2 = that.loading3 = false;
909
     } else if (stateId == 2) {
911
     } else if (stateId == 2) {
910
       that.loading2 = true;
912
       that.loading2 = true;
911
-      that.loading1 = that.loading3 = false;
912
     } else if (stateId == 3) {
913
     } else if (stateId == 3) {
913
       that.loading3 = true;
914
       that.loading3 = true;
914
-      that.loading1 = that.loading2 = false;
915
     }
915
     }
916
     console.log(postData);
916
     console.log(postData);
917
     that.mainService
917
     that.mainService