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; + }, };