|
|
|
@ -587,14 +587,14 @@ export default { |
|
|
|
}); |
|
|
|
}); |
|
|
|
let list = res.data.data.records; |
|
|
|
let list = res.data.data.records; |
|
|
|
// 批量获取 bcName —— 正确用法! |
|
|
|
// 批量获取 bcName —— 正确用法! |
|
|
|
await Promise.all( |
|
|
|
//await Promise.all( |
|
|
|
list.map(async item => { |
|
|
|
// list.map(async item => { |
|
|
|
item.bcId = item.bcId + ''; |
|
|
|
// item.bcId = item.bcId + ''; |
|
|
|
item.subClass = item.subClass + ''; |
|
|
|
// item.subClass = item.subClass + ''; |
|
|
|
item.bcName = await this.getBcName(item.bcId); // ✅ 等待返回 |
|
|
|
// item.bcName = await this.getBcName(item.bcId); // ✅ 等待返回 |
|
|
|
console.log('item.bcName =', item.bcName); // 现在一定有值 |
|
|
|
// console.log('item.bcName =', item.bcName); // 现在一定有值 |
|
|
|
}) |
|
|
|
// }) |
|
|
|
); |
|
|
|
//); |
|
|
|
this.data = list; |
|
|
|
this.data = list; |
|
|
|
this.page.total = res.data.data.total; |
|
|
|
this.page.total = res.data.data.total; |
|
|
|
} catch (e) {} |
|
|
|
} catch (e) {} |
|
|
|
|