From e69f1b7c0683b8341213d403647990d130ced82b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=BB=E7=8F=AE=E5=AE=87?= Date: Thu, 19 Oct 2023 19:32:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86getFileSpectrumChart=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Modals/LoadFromFileModal.vue | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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