async ExportReport (row) {
let self = this
self.loading = true
this.$http({
method: 'get',
url: 'api/test/inspection/records/id',
params: {
loginAccount: this.userData.account,
clientType: Config.clientType,
inspectionRecordId: row.inspectionRecordId
}
}).then(async (res) => {
this.loading = false
if (res.data.code === '200' && res.data.type === 'success') {
this.testData = res.data.data
let testData1 = this.testData
if (this.testData.inspectionRecordId === row.inspectionRecordId) {
for (const item of this.testData.samples) {
console.log('进入调用检测')
let data = await this.ExportTestData(item.inspectionRecordSampleId, this.testData)
this.sampleTestData.push(data)
}
self.wordUpload(testData1)
} else {
this.ExportReport(row)
}
}
})
},
ExportTestData (inspectionRecordSampleId, row) {
return new Promise((resolve, reject) => {
this.loading = true
this.$http({
method: 'get',
url: 'api/test/inspection/test/records',
params: {
loginAccount: this.userData.account,
clientType: Config.clientType,
inspectionRecordSampleId: inspectionRecordSampleId,
tenantId: row.tenantId
}
}).then((res) => {
this.loading = false
if (res.data.code === '200' && res.data.type === 'success') {
resolve(res)
return res.data.datas
}
})
})
},
09-18
900
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
05-08
2479
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)