crc上传pacs判断
continuous-integration/drone/push Build is passing Details

uat_us
DESKTOP-6C3NK6N\WXS 2024-08-21 14:47:28 +08:00
parent f5c4b49e6f
commit b6433ea4a8
2 changed files with 118 additions and 4 deletions

View File

@ -3811,6 +3811,14 @@ export function getVisitPatientStudyFilterList(data) {
data
})
}
// CRCpacs上传检查校验
export function verifyPacsImage(data) {
return request({
url: `/Patient/verifyPacsImage`,
method: 'post',
data
})
}
// CRCpacs上传检查
export function submitVisitStudyBinding(data) {
return request({

View File

@ -222,6 +222,43 @@
@pagination="getList"
/>
</template>
<!-- 校验警告信息模态框 -->
<el-dialog
v-if="warnVisible"
:visible.sync="warnVisible"
width="500px"
:close-on-click-modal="false"
append-to-body
title="Warning"
custom-class="warning-dialog"
>
<div style="border: 1px solid #e0e0e0; padding: 10px">
<!-- Information from DICOM headers not consistent with that of this subject -->
<div style="color: red; font-size: 14px; margin-bottom: 10px">
{{ $t("trials:uploadDicomPacs:message:informationConsistent") }}:
</div>
<div v-for="(item, i) in warningArr" :key="item.index">
<div>
{{
`(${i + 1}). ${$t(
"trials:visit:crcUpload:uploadDicomPacs:table:accNumber"
)}: ${item.AccessionNumber}`
}}
</div>
<ul>
<li>{{ item.ErrorMesseage }}</li>
</ul>
</div>
</div>
<div slot="footer" class="base-modal-footer">
<el-button size="small" type="primary" @click="handleCancelWarnVisible">
{{ $t("common:button:cancel") }}
</el-button>
<el-button size="small" type="primary" @click="handleContinueUpload">
{{ $t("trials:uploadDicomList:button:upload") }}
</el-button>
</div>
</el-dialog>
</BaseContainer>
</template>
<script>
@ -229,6 +266,7 @@ import {
getVisitPatientStudyFilterList,
submitVisitStudyBinding,
getDicomModalityList,
verifyPacsImage,
} from "@/api/trials";
import BaseContainer from "@/components/BaseContainer";
import Pagination from "@/components/Pagination";
@ -267,6 +305,10 @@ export default {
datetimerange: [],
tableSelectData: [],
DicomModalityList: [],
SCPStudyIdList: [],
ReUploadSCPStudyIdList: [],
warningArr: [],
warnVisible: false,
};
},
created() {
@ -274,6 +316,69 @@ export default {
this.getDicomModalityList();
},
methods: {
// warning
handleCancelWarnVisible() {
this.warnVisible = false;
this.warningArr = [];
},
// warning
handleContinueUpload() {
this.handleCancelWarnVisible();
this.submitVisitStudyBinding(
this.SCPStudyIdList,
this.ReUploadSCPStudyIdList
);
},
//
async verifyPacsImage(arr) {
try {
this.warningArr = [];
this.ReUploadSCPStudyIdList = [];
this.SCPStudyIdList = [];
let data = {
TrialId: this.$route.query.trialId,
SubjectVisitId: this.subjectVisitId,
SubjectId: this.subjectId,
ScpStudyIdList: arr,
};
this.loading = true;
let res = await verifyPacsImage(data);
if (res.IsSuccess) {
for (let i = 0; i < res.Result.length; i++) {
let item = res.Result[i];
if (item.AllowReUpload) {
this.ReUploadSCPStudyIdList.push(item.SCPStudyId);
continue;
}
if (item.AllowUpload) {
this.SCPStudyIdList.push(item.SCPStudyId);
continue;
}
if (!item.AllowUpload && !item.AllowReUpload) {
let data = this.tableSelectData.find(
(d) => d.SCPStudyId === item.SCPStudyId
);
this.warningArr.push(Object.assign({}, data, item));
continue;
}
}
if (this.warningArr.length <= 0) {
this.submitVisitStudyBinding(
this.SCPStudyIdList,
this.ReUploadSCPStudyIdList
);
} else {
this.warnVisible = true;
this.loading = false;
}
} else {
this.loading = false;
}
} catch (err) {
this.loading = false;
console.log(err);
}
},
//
async getDicomModalityList() {
try {
@ -294,20 +399,21 @@ export default {
this.$t("trials:visit:crcUpload:uploadDicomPacs:message:notCheck")
);
let arr = this.tableSelectData.map((item) => item.SCPStudyId);
this.submitVisitStudyBinding(arr);
this.verifyPacsImage(arr);
},
handleAdd(row) {
let arr = [row.SCPStudyId];
this.submitVisitStudyBinding(arr);
this.verifyPacsImage(arr);
},
//
async submitVisitStudyBinding(arr) {
async submitVisitStudyBinding(ScpStudyIdList, ReUploadSCPStudyIdList) {
try {
let data = {
TrialId: this.$route.query.trialId,
SubjectVisitId: this.subjectVisitId,
SubjectId: this.subjectId,
ScpStudyIdList: arr,
ScpStudyIdList,
ReUploadSCPStudyIdList,
};
this.loading = true;
let res = await submitVisitStudyBinding(data);