Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
84f5f5430c
|
@ -239,6 +239,12 @@ export default {
|
|||
return [];
|
||||
},
|
||||
},
|
||||
UploadStudyList: {
|
||||
type: Array,
|
||||
default: () => {
|
||||
return [];
|
||||
},
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -246,8 +252,18 @@ export default {
|
|||
uploadList: [], // 待上传文件列表
|
||||
dicomList: [], // 上传的文件列表
|
||||
requestNum: 6,
|
||||
hasOtherStudy: false, // 是否上传文件检查与列表不一致
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
isLoad() {
|
||||
if (!this.isLoad) {
|
||||
this.$refs.file.value = null;
|
||||
if (this.dicomList.some((item) => item.isUpload === 3)) {
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 预上传
|
||||
async preArchiveDicomStudy(post, index) {
|
||||
|
@ -280,31 +296,23 @@ export default {
|
|||
let files = e.target.files;
|
||||
try {
|
||||
this.dicomList = [];
|
||||
this.hasOtherStudy = false;
|
||||
for (var i = 0; i < files.length; ++i) {
|
||||
let dicom = await parseDicom(files[i]);
|
||||
let has = this.StudyInstanceUidList.some(
|
||||
if (!dicom) continue;
|
||||
let has = this.dicomList.some(
|
||||
(item) => item.SopInstanceUid === dicom.SopInstanceUid
|
||||
);
|
||||
if (has) continue;
|
||||
has = this.StudyInstanceUidList.some(
|
||||
(item) => item.StudyInstanceUid === dicom.StudyInstanceUid
|
||||
);
|
||||
if (
|
||||
!dicom ||
|
||||
!has ||
|
||||
this.SopInstanceUidList.includes(dicom.SopInstanceUid)
|
||||
) {
|
||||
if (i === files.length - 1 && this.dicomList.length <= 0) {
|
||||
let confirm = await this.$confirm(
|
||||
this.$t("trials:uploadImage:confirmMessage:failSubject"),
|
||||
{
|
||||
type: "warning",
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: this.$t("common:button:confirm"),
|
||||
cancelButtonText: this.$t("common:button:cancel"),
|
||||
}
|
||||
);
|
||||
if (confirm !== "confirm") continue;
|
||||
this.$refs.file.click();
|
||||
}
|
||||
if (!has) {
|
||||
this.hasOtherStudy = true;
|
||||
continue;
|
||||
}
|
||||
if (this.SopInstanceUidList.includes(dicom.SopInstanceUid)) continue;
|
||||
|
||||
this.isLoad = true;
|
||||
dicom.file = files[i];
|
||||
dicom.isUpload = 0;
|
||||
|
@ -354,12 +362,6 @@ export default {
|
|||
dicom.SeriesInstanceUid
|
||||
);
|
||||
}
|
||||
if (
|
||||
item.SopInstanceUidList &&
|
||||
item.SopInstanceUidList.length > 0
|
||||
) {
|
||||
uploadData.IsDicomReUpload = true;
|
||||
}
|
||||
}
|
||||
|
||||
return uploadData.StudyInstanceUid === dicom.StudyInstanceUid;
|
||||
|
@ -393,8 +395,9 @@ export default {
|
|||
},
|
||||
};
|
||||
if (
|
||||
item.SopInstanceUidList &&
|
||||
item.SopInstanceUidList.length > 0
|
||||
this.UploadStudyList.some(
|
||||
(d) => d.StudyInstanceUid === uploadData.StudyInstanceUid
|
||||
)
|
||||
) {
|
||||
uploadData.IsDicomReUpload = true;
|
||||
}
|
||||
|
@ -405,6 +408,20 @@ export default {
|
|||
});
|
||||
this.dicomList.push(dicom);
|
||||
}
|
||||
if (this.dicomList.length <= 0 && this.hasOtherStudy) {
|
||||
let confirm = await this.$confirm(
|
||||
this.$t("trials:uploadImage:confirmMessage:failSubject"),
|
||||
{
|
||||
type: "warning",
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: this.$t("common:button:confirm"),
|
||||
cancelButtonText: this.$t("common:button:cancel"),
|
||||
}
|
||||
);
|
||||
if (confirm !== "confirm") return false;
|
||||
this.$refs.file.click();
|
||||
return false;
|
||||
}
|
||||
let funArr = [];
|
||||
for (let i = 0; i < this.uploadList.length; i++) {
|
||||
let item = this.uploadList[i];
|
||||
|
@ -423,6 +440,7 @@ export default {
|
|||
}
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
this.$refs.file.value = null;
|
||||
}
|
||||
},
|
||||
// 并发上传
|
||||
|
@ -471,6 +489,10 @@ export default {
|
|||
if (res.IsSuccess) {
|
||||
uploadDicom.status = 4;
|
||||
this.$emit("getList");
|
||||
let ind = this.uploadList.findIndex(
|
||||
(item) => item.StudyInstanceUid === uploadDicom.StudyInstanceUid
|
||||
);
|
||||
this.uploadList.splice(ind, 1);
|
||||
} else {
|
||||
uploadDicom.status = 5;
|
||||
}
|
||||
|
|
|
@ -87,6 +87,7 @@
|
|||
v-if="Criterion.ImageUploadEnum > 0 && isUpload"
|
||||
:StudyInstanceUidList="StudyInstanceUidList"
|
||||
:SopInstanceUidList="SopInstanceUidList"
|
||||
:UploadStudyList="UploadStudyList"
|
||||
@getList="getList"
|
||||
/>
|
||||
<study-view
|
||||
|
@ -132,6 +133,7 @@ export default {
|
|||
list: [],
|
||||
StudyInstanceUidList: [],
|
||||
SopInstanceUidList: [],
|
||||
UploadStudyList: [],
|
||||
|
||||
// 检查数弹框
|
||||
model_cfg: {
|
||||
|
@ -183,6 +185,7 @@ export default {
|
|||
if (res.IsSuccess) {
|
||||
this.StudyInstanceUidList = [];
|
||||
this.SopInstanceUidList = [];
|
||||
this.UploadStudyList = [];
|
||||
this.list = res.Result;
|
||||
res.Result.forEach((item) => {
|
||||
if (item.OrginalStudyList && Array.isArray(item.OrginalStudyList)) {
|
||||
|
@ -197,6 +200,7 @@ export default {
|
|||
item.UploadStudyList.forEach((data) => {
|
||||
data.SopInstanceUidList &&
|
||||
this.SopInstanceUidList.push(...data.SopInstanceUidList);
|
||||
this.UploadStudyList.push(data);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
@ -481,8 +481,8 @@
|
|||
<el-tabs v-model="activeName" type="border-card" style="flex:1;">
|
||||
<!-- DICOM影像上传 -->
|
||||
<el-tab-pane :label="$t('trials:uploadedDicoms:tab:uploadDicoms')" name="dicom">
|
||||
<upload-dicom-files2 v-if="uploadVisible2&&activeName==='dicom'" :data="rowData" :subject-id="rowData.SubjectId" :subject-visit-id="rowData.Id" @getList="getList" @close="closeUpload" :activeName.sync="activeName"/>
|
||||
<upload-dicom-files v-else :data="rowData" :subject-id="rowData.SubjectId" :subject-visit-id="rowData.Id" @getList="getList" @close="closeUpload" @setOpenWindow="setOpenWindow"/>
|
||||
<upload-dicom-files2 :data="rowData" :subject-id="rowData.SubjectId" :subject-visit-id="rowData.Id" @getList="getList" @close="closeUpload" :activeName.sync="activeName"/>
|
||||
<!-- <upload-dicom-files :data="rowData" :subject-id="rowData.SubjectId" :subject-visit-id="rowData.Id" @getList="getList" @close="closeUpload" @setOpenWindow="setOpenWindow"/> -->
|
||||
</el-tab-pane>
|
||||
<!-- 非DICOM影像上传 -->
|
||||
<el-tab-pane
|
||||
|
|
Loading…
Reference in New Issue