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