From cbd860a35e4aa33a68c435374fe292d0caf9750c Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Fri, 31 Jul 2026 15:01:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=88=E4=B8=8B=E8=BD=BD=E5=86=8D=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E7=9A=84=E9=80=BB=E8=BE=91=E6=8C=87=E5=AE=9AIVUS?= =?UTF-8?q?=E5=92=8COCT=E6=A0=87=E5=87=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/uploadDicomAndNonedicom/dicomFile.vue | 5 ++++- .../uploadDicomAndNonedicom/nonedicomFile.vue | 5 ++++- src/utils/stream.js | 12 +++++++++--- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/components/uploadDicomAndNonedicom/dicomFile.vue b/src/components/uploadDicomAndNonedicom/dicomFile.vue index 8187cc0f..569281fa 100644 --- a/src/components/uploadDicomAndNonedicom/dicomFile.vue +++ b/src/components/uploadDicomAndNonedicom/dicomFile.vue @@ -477,7 +477,10 @@ export default { let res = await getSubjectImageUploadList(params) this.loading = false if (res.IsSuccess) { - this.isDownloaded = res.OtherInfo.IsIRImageDownloaded + this.isDownloaded = this.Criterion && this.Criterion.CriterionType && ( + this.Criterion.CriterionType == 19 || + this.Criterion.CriterionType == 20 + ) ? res.OtherInfo.IsIRImageDownloaded : true this.TrialModality = res.OtherInfo.TrialModality.split('|') this.IsReadingTaskViewInOrder = res.OtherInfo.IsReadingTaskViewInOrder || res.OtherInfo.IsReadingTaskViewInOrder === 0 ? res.OtherInfo.IsReadingTaskViewInOrder : 2 this.StudyInstanceUidList = [] diff --git a/src/components/uploadDicomAndNonedicom/nonedicomFile.vue b/src/components/uploadDicomAndNonedicom/nonedicomFile.vue index f062f9e7..9c02e78f 100644 --- a/src/components/uploadDicomAndNonedicom/nonedicomFile.vue +++ b/src/components/uploadDicomAndNonedicom/nonedicomFile.vue @@ -353,7 +353,10 @@ export default { if (res.IsSuccess) { this.list = res.Result this.relationInfo = res.OtherInfo - this.isDownloaded = res.OtherInfo.IsIRImageDownloaded + this.isDownloaded = this.Criterion && this.Criterion.CriterionType && ( + this.Criterion.CriterionType == 19 || + this.Criterion.CriterionType == 20 + ) ? res.OtherInfo.IsIRImageDownloaded : true this.faccept = [] this.relationInfo.ImageFormatList.forEach((item) => { this.faccept.push(`.${item}`) diff --git a/src/utils/stream.js b/src/utils/stream.js index dac09607..c92edb01 100644 --- a/src/utils/stream.js +++ b/src/utils/stream.js @@ -11,10 +11,10 @@ function zipFiles(zipName, files) { store.dispatch('trials/setUnLock', true) files = formatFiles(files) // 创建压缩文件输出流 - const zipFileOutputStream = streamSaver.createWriteStream(zipName); + let zipFileOutputStream = streamSaver.createWriteStream(zipName); // 创建下载文件流 const fileIterator = files.values(); - const readableZipStream = new ZIP({ + let readableZipStream = new ZIP({ async pull(ctrl) { const fileInfo = fileIterator.next(); if (fileInfo.done) {//迭代终止 @@ -41,9 +41,13 @@ function zipFiles(zipName, files) { .then(() => { console.log("同步下载打包结束时间:" + new Date()); store.dispatch('trials/setUnLock', false) + readableZipStream = null; + zipFileOutputStream = null; resolve(true) }).catch(err => { console.log(err); + readableZipStream = null; + zipFileOutputStream = null; resolve(false) }); } else { @@ -61,14 +65,16 @@ async function updateFile(file, name) { return new Promise(async resolve => { try { store.dispatch('trials/setUnLock', true) - const fileOutputStream = streamSaver.createWriteStream(name); + let fileOutputStream = streamSaver.createWriteStream(name); // file = decodeUtf8(file); let res = await fetch(file); res.body.pipeTo(fileOutputStream).then(() => { store.dispatch('trials/setUnLock', true) + fileOutputStream = null; resolve(true) }).catch(err => { console.log(err) + fileOutputStream = null; resolve(false) }); } catch (err) {