影像质控时,检查删除了,不需要对必填信息做校验;并且在查看所有影像时,对于影像数为0的情况,需要处理
continuous-integration/drone/push Build is passing Details

main
wangxiaoshuang 2025-07-10 15:58:57 +08:00
parent 187947177a
commit 9b4f4d4419
2 changed files with 66 additions and 67 deletions

View File

@ -771,7 +771,7 @@
</div>
<div class="function-wrapper">
<!-- 保存 -->
<el-button :disabled="isAudit" size="small" type="primary" round @click="handleSave">
<el-button :disabled="isAudit" size="small" type="primary" round @click="handleSave(false)">
{{ $t('trials:audit:button:save') }}
</el-button>
<!-- 发质疑 -->
@ -871,7 +871,7 @@ export default {
},
data() {
return {
activeName: this.data.DicomStudyCount > 0 ? 'dicom' : 'none-dicom',
activeName: this.data.DicomStudyCount > 0 ? 'dicom' : this.data.NoneDicomStudyCount > 0 ? 'none-dicom' : 'dicom',
questionForm: {},
qCQuestionAnswerList: [],
studyList: [],
@ -1185,52 +1185,55 @@ export default {
},
//
handleSave(isMessage) {
return new Promise((resolve) => {
this.$refs['questions']
.submit()
.then((res) => {
var answerList = []
res.forEach((item) => {
var index = this.qCQuestionAnswerList.findIndex(
(v) => v.TrialQCQuestionConfigureId === item.Id
)
if (index > -1) {
answerList.push({
id: this.qCQuestionAnswerList[index].Id,
answer: item.answer,
trialQCQuestionConfigureId: item.Id,
})
return new Promise(async (resolve) => {
try {
let res = null
if (isMessage) {
res = await this.$refs['questions'].submit()
} else {
res = await this.$refs['questions'].save()
}
var answerList = []
res.forEach((item) => {
var index = this.qCQuestionAnswerList.findIndex(
(v) => v.TrialQCQuestionConfigureId === item.Id
)
if (index > -1) {
answerList.push({
id: this.qCQuestionAnswerList[index].Id,
answer: item.answer,
trialQCQuestionConfigureId: item.Id,
})
}
})
this.loading = true
addOrUpdateQCQuestionAnswerList(
this.trialId,
this.data.Id,
this.data.QCProcessEnum,
this.currentQCType,
answerList
)
.then((res) => {
this.loading = false
if (res.IsSuccess) {
if (isMessage !== true) {
this.$message.success(
this.$t('common:message:savedSuccessfully')
)
}
this.getCheckList()
resolve(true)
}
})
this.loading = true
addOrUpdateQCQuestionAnswerList(
this.trialId,
this.data.Id,
this.data.QCProcessEnum,
this.currentQCType,
answerList
)
.then((res) => {
this.loading = false
if (res.IsSuccess) {
if (isMessage !== true) {
this.$message.success(
this.$t('common:message:savedSuccessfully')
)
}
this.getCheckList()
resolve(true)
}
})
.catch(() => {
this.loading = false
resolve(false)
})
})
.catch(() => {
this.loading = false
resolve(false)
})
.catch(() => {
this.loading = false
resolve(false)
})
} catch (err) {
console.log(err)
resolve(false)
}
})
},
//
@ -1658,11 +1661,11 @@ export default {
hasStudyNameList = []
var isgoList = []
this.studyList.forEach((v) => {
if (!v.BodyPartForEdit) {
if (!v.BodyPartForEdit && !v.IsDeleted) {
isgo = false
isgoList.push(v.StudyCode)
}
if (this.relationInfo.IsShowStudyName && !v.StudyName) {
if (this.relationInfo.IsShowStudyName && !v.StudyName && !v.IsDeleted) {
hasStudyName = false
hasStudyNameList.push(v.StudyCode)
}
@ -1699,7 +1702,7 @@ export default {
this.loading = true
var isVerify = await this.handleSave(true)
if (!isVerify) {
return
return this.loading = false
}
//
verifyCanQCPassedOrFailed(this.trialId, this.data.Id)

View File

@ -1,20 +1,8 @@
<template>
<div v-loading="loading">
<el-form
v-if="isRender"
ref="questionForm"
size="small"
:model="questionForm"
style="width:100%;"
>
<qSFormItem
v-for="question of questions"
:key="question.Id"
:question="question"
:question-form="questionForm"
:is-audit="isAudit"
@resetFormItemData="resetFormItemData"
/>
<el-form v-if="isRender" ref="questionForm" size="small" :model="questionForm" style="width:100%;">
<qSFormItem v-for="question of questions" :key="question.Id" :question="question" :question-form="questionForm"
:is-audit="isAudit" @resetFormItemData="resetFormItemData" />
</el-form>
</div>
@ -102,7 +90,7 @@ export default {
this.$confirm(this.$t('trials:audit:message:specifyQuestions'), {
type: 'warning',
showCancelButton: false,
callback: action => {}
callback: action => { }
})
reject()
} else {
@ -111,7 +99,7 @@ export default {
answers.push({ Id: k, answer: this.questionForm[k] })
}
resolve(answers)
// Answer
// Answer
// this.answers.forEach((item, index) => {
// if (item.IsShow) {
// this.$set(this.answers[index], 'Answer', this.questionForm[item.TrialQCQuestionConfigureId])
@ -121,8 +109,16 @@ export default {
}
})
})
},
save() {
return new Promise((resolve, reject) => {
var answers = []
for (const k in this.questionForm) {
answers.push({ Id: k, answer: this.questionForm[k] })
}
resolve(answers)
})
}
}
}
</script>