From e3ab23f20cf3124b93208dfde4339c078c0032dc Mon Sep 17 00:00:00 2001 From: wangxiaoshuang <825034831@qq.com> Date: Fri, 14 Jun 2024 15:14:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E3=80=81=E4=B8=8B=E8=BD=BD?= =?UTF-8?q?=E5=BD=B1=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../uploadImage/components/upload-list.vue | 12 +++++++++++- src/utils/parseDicom.js | 11 +++++++---- .../trial-config/components/logicalConfig.vue | 1 - 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/components/uploadImage/components/upload-list.vue b/src/components/uploadImage/components/upload-list.vue index 40c2efc3..b79aa1eb 100644 --- a/src/components/uploadImage/components/upload-list.vue +++ b/src/components/uploadImage/components/upload-list.vue @@ -245,6 +245,10 @@ export default { return []; }, }, + visible: { + type: Boolean, + default: false, + }, }, data() { return { @@ -253,6 +257,7 @@ export default { dicomList: [], // 上传的文件列表 requestNum: 6, hasOtherStudy: false, // 是否上传文件检查与列表不一致 + isClose: false, }; }, watch: { @@ -332,6 +337,7 @@ export default { this.dicomList = []; this.hasOtherStudy = false; for (var i = 0; i < files.length; ++i) { + if (files[i].name.indexOf("DICOMDIR") >= 0) continue; let dicom = await parseDicom(files[i]); if (!dicom) continue; let has = this.dicomList.some( @@ -478,6 +484,7 @@ export default { }, // 并发上传 async handleUploadTask(arr, index) { + if (this.isClose) return false; arr[index].isUpload = 1; let path = `/${arr[index].params.TrialId}/TaskImage/${ arr[index].params.SubjectId @@ -494,7 +501,7 @@ export default { (item) => item.StudyInstanceUid === arr[index].StudyInstanceUid )[0]; let res = await dicomToOSS(arr[index].file, path); - if (res && index < 20) { + if (res) { arr[index].path = res; uploadDicom.successCount++; arr[index].isUpload = 2; @@ -738,6 +745,9 @@ export default { return studyTime; }, }, + beforeDestroy() { + this.isClose = true; + }, };