From 9b4f4d4419595af413a45ee44059a1017edfdb5b Mon Sep 17 00:00:00 2001
From: wangxiaoshuang <825034831@qq.com>
Date: Thu, 10 Jul 2025 15:58:57 +0800
Subject: [PATCH] =?UTF-8?q?=E5=BD=B1=E5=83=8F=E8=B4=A8=E6=8E=A7=E6=97=B6?=
=?UTF-8?q?=EF=BC=8C=E6=A3=80=E6=9F=A5=E5=88=A0=E9=99=A4=E4=BA=86=EF=BC=8C?=
=?UTF-8?q?=E4=B8=8D=E9=9C=80=E8=A6=81=E5=AF=B9=E5=BF=85=E5=A1=AB=E4=BF=A1?=
=?UTF-8?q?=E6=81=AF=E5=81=9A=E6=A0=A1=E9=AA=8C=EF=BC=9B=E5=B9=B6=E4=B8=94?=
=?UTF-8?q?=E5=9C=A8=E6=9F=A5=E7=9C=8B=E6=89=80=E6=9C=89=E5=BD=B1=E5=83=8F?=
=?UTF-8?q?=E6=97=B6=EF=BC=8C=E5=AF=B9=E4=BA=8E=E5=BD=B1=E5=83=8F=E6=95=B0?=
=?UTF-8?q?=E4=B8=BA0=E7=9A=84=E6=83=85=E5=86=B5=EF=BC=8C=E9=9C=80?=
=?UTF-8?q?=E8=A6=81=E5=A4=84=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../qc-check/components/qualityAssurance.vue | 101 +++++++++---------
.../visit/qc-check/components/questions.vue | 32 +++---
2 files changed, 66 insertions(+), 67 deletions(-)
diff --git a/src/views/trials/trials-panel/visit/qc-check/components/qualityAssurance.vue b/src/views/trials/trials-panel/visit/qc-check/components/qualityAssurance.vue
index ba31ee73..f2fa6f99 100644
--- a/src/views/trials/trials-panel/visit/qc-check/components/qualityAssurance.vue
+++ b/src/views/trials/trials-panel/visit/qc-check/components/qualityAssurance.vue
@@ -771,7 +771,7 @@
-
+
{{ $t('trials:audit:button:save') }}
@@ -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)
diff --git a/src/views/trials/trials-panel/visit/qc-check/components/questions.vue b/src/views/trials/trials-panel/visit/qc-check/components/questions.vue
index 457d913f..ebab7962 100644
--- a/src/views/trials/trials-panel/visit/qc-check/components/questions.vue
+++ b/src/views/trials/trials-panel/visit/qc-check/components/questions.vue
@@ -1,20 +1,8 @@
-
-
+
+
@@ -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)
+ })
}
}
}
-