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)
+ })
}
}
}
-