seimin 1 year ago
parent
commit
c32967136f
1 changed files with 1 additions and 3 deletions
  1. 1 3
      src/app/share/allocation-worker/allocation-worker.component.ts

+ 1 - 3
src/app/share/allocation-worker/allocation-worker.component.ts

@@ -14,9 +14,7 @@ export class AllocationWorkerComponent implements OnInit {
14
   ) {}
14
   ) {}
15
 
15
 
16
   ngOnInit() {
16
   ngOnInit() {
17
-    this.groupList = JSON.parse(
18
-      localStorage.getItem("user")
19
-    ).user.scope.groupIds;
17
+    this.groupList = JSON.parse(localStorage.getItem("user")).user.scope ? JSON.parse(localStorage.getItem("user")).user.scope.groupIds : [];
20
     this.getWorkerList();
18
     this.getWorkerList();
21
   }
19
   }
22
   // 配送人员数据
20
   // 配送人员数据