diff --git a/src/views/modules/shequ/cpts/people-more.vue b/src/views/modules/shequ/cpts/people-more.vue index fc85b2c0d..b230cb661 100644 --- a/src/views/modules/shequ/cpts/people-more.vue +++ b/src/views/modules/shequ/cpts/people-more.vue @@ -594,16 +594,23 @@ export default { } }); }); - console.log("1111111111111111111111111", this.groupList); - this.groupList.forEach((subList, index) => { - subList.itemList.forEach(async (item, subIndex) => { - if (item.optionSourceType == "remote" && item.optionSourceValue) { - this.groupList[index].itemList[subIndex].options = - await this.getOptions(item.optionSourceValue); - } - }); - }); + await Promise.all( + this.groupList.map((subList, index) => { + return Promise.all( + subList.itemList.map(async (item, subIndex) => { + if ( + item.optionSourceType == "remote" && + item.optionSourceValue + ) { + this.groupList[index].itemList[subIndex].options = + await this.getOptions(item.optionSourceValue); + } + }) + ); + }) + ); + console.log("44444444", this.groupList); let arr = [ { groupId: "hs123", diff --git a/src/views/modules/visual/basicinfo/cpts/people-more.vue b/src/views/modules/visual/basicinfo/cpts/people-more.vue index 5d72f52e6..3084ebbe4 100644 --- a/src/views/modules/visual/basicinfo/cpts/people-more.vue +++ b/src/views/modules/visual/basicinfo/cpts/people-more.vue @@ -536,16 +536,23 @@ export default { } }); }); - console.log("1111111111111111111111111", this.groupList); - - this.groupList.forEach((subList, index) => { - subList.itemList.forEach(async (item, subIndex) => { - if (item.optionSourceType == "remote" && item.optionSourceValue) { - this.groupList[index].itemList[subIndex].options = - await this.getOptions(item.optionSourceValue); - } - }); - }); + + await Promise.all( + this.groupList.map((subList, index) => { + return Promise.all( + subList.itemList.map(async (item, subIndex) => { + if ( + item.optionSourceType == "remote" && + item.optionSourceValue + ) { + this.groupList[index].itemList[subIndex].options = + await this.getOptions(item.optionSourceValue); + } + }) + ); + }) + ); + console.log("44444444", this.groupList); let arr = [ {