diff --git a/src/views/spectrumAnalysis/components/Modals/LoadFromFileModal.vue b/src/views/spectrumAnalysis/components/Modals/LoadFromFileModal.vue index 43da5ea..7754454 100644 --- a/src/views/spectrumAnalysis/components/Modals/LoadFromFileModal.vue +++ b/src/views/spectrumAnalysis/components/Modals/LoadFromFileModal.vue @@ -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