|
|
@@ -586,7 +586,9 @@
|
|
|
async loadTeamOptions() {
|
|
|
try {
|
|
|
const factoryId = this.$store.state.user.info.factoryId;
|
|
|
- const workCenterIds = this.planRoutingPayload.detailList[0].workCenterIds.join(',');
|
|
|
+ const detailIds = this.planRoutingPayload?.detailList?.[0]?.workCenterIds?.join(',');
|
|
|
+ const taskIds = this.taskList[0]?.workCenterIds?.join(',');
|
|
|
+ const workCenterIds = detailIds || taskIds;
|
|
|
const res = await teamPage({ pageNum: 1, size: -1, factoryId, workCenterIds });
|
|
|
this.teamOptions = (res?.list || []).map(
|
|
|
({ id, name, leaderUserName, leaderUserId }) => ({
|