处理getFileSpectrumChart接口参数

This commit is contained in:
任珮宇 2023-10-19 19:32:40 +08:00
parent e89afcba1b
commit e69f1b7c06

View File

@ -663,30 +663,31 @@ export default {
const { success, message } = await this.uploadZipFile(zipedFiles)
if (success) {
let result = []
console.log('allFiles', allFiles)
allFiles.forEach((el) => {
let obj = {}
if (el.fileType == 'B') {
obj.sampleSystemType = el.fileType
el.files.forEach((item) => {
if (item.search('_S_')) {
if (item.includes('_S_')) {
obj.sampleFileName = item
}
if (item.search('_G_')) {
if (item.includes('_G_')) {
obj.gasFileName = item
obj.gasFileStatus = el.gasFileStatus
}
if (item.search('_D_')) {
if (item.includes('_D_')) {
obj.detFileName = item
obj.detFileStatus = el.detFileStatus
}
if (item.search('_Q_')) {
if (item.includes('_Q_')) {
obj.qcFileName = item
obj.qcFileStatus = el.qcFileStatus
}
})
} else {
el.files.forEach((item) => {
if (item.search('_S_')) {
if (item.includes('_S_')) {
obj.sampleSystemType = el.fileType
obj.sampleFileName = item
obj.gasFileName = ''
@ -697,6 +698,7 @@ export default {
}
result.push(obj)
})
console.log(result)
this.$emit('loadFormFile', result)
this.visible = false
this.isUploadingZip = false