diff --git a/src/views/trials/trials-panel/reading/dicoms/components/Lugano/QuestionList.vue b/src/views/trials/trials-panel/reading/dicoms/components/Lugano/QuestionList.vue index f3dc50cd..75ccf7d2 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/Lugano/QuestionList.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/Lugano/QuestionList.vue @@ -19,7 +19,7 @@ ref="ecrf" :question-form-change-state="true" :question-form-change-num="0" - :isQulityIssues="false" + :is-qulity-issues="false" :group-classify="1" /> @@ -86,7 +86,7 @@
@@ -134,7 +134,7 @@ :question-form-change-state="true" :question-form-change-num="0" :group-classify="2" - :isQulityIssues="false" + :is-qulity-issues="false" style="margin-top:20px" @setNonTargetMeasurementStatus="setNonTargetMeasurementStatus" /> @@ -144,7 +144,7 @@ :question-form-change-state="true" :question-form-change-num="0" :group-classify="3" - :isQulityIssues="false" + :is-qulity-issues="false" @setNonTargetMeasurementStatus="setNonTargetMeasurementStatus" /> @@ -252,12 +252,14 @@ export default { DicomEvent.$on('split', measureData => { this.handleSplit(measureData.RowId, measureData.QuestionId) }) - DicomEvent.$on('refreshQuestions', async() => { + DicomEvent.$on('refreshQuestions', async(obj) => { var triald = this.$router.currentRoute.query.trialId await store.dispatch('reading/refreshDicomReadingQuestionAnswer', { trialId: triald, visitTaskId: this.visitTaskId }) - this.$refs['ecrf'].getQuestions(this.visitTaskId) - this.$refs['ecrf2'].getQuestions(this.visitTaskId) - this.$refs['ecrf3'].getQuestions(this.visitTaskId) + this.$nextTick(() => { + this.$refs['ecrf'].getQuestions(this.visitTaskId) + this.$refs['ecrf2'].getQuestions(this.visitTaskId) + this.$refs['ecrf3'].getQuestions(this.visitTaskId) + }) }) window.addEventListener('resize', this.setHeight) @@ -1020,9 +1022,11 @@ export default { this.activeName = '' }, getECRFQuestions(obj) { - this.$refs['ecrf'].getQuestions(obj.visitTaskId) - this.$refs['ecrf2'].getQuestions(obj.visitTaskId) - this.$refs['ecrf3'].getQuestions(obj.visitTaskId) + this.$nextTick(() => { + this.$refs['ecrf'].getQuestions(obj.visitTaskId) + this.$refs['ecrf2'].getQuestions(obj.visitTaskId) + this.$refs['ecrf3'].getQuestions(obj.visitTaskId) + }) }, receiveMsg(event) { if (event.data.type === 'isCanActiveNoneDicomTool') { @@ -1099,9 +1103,11 @@ export default { await this.getReadingQuestionAndAnswer() var triald = this.$router.currentRoute.query.trialId await store.dispatch('reading/refreshDicomReadingQuestionAnswer', { trialId: triald, visitTaskId: this.visitTaskId }) - this.$refs['ecrf'].getQuestions(this.visitTaskId) - this.$refs['ecrf2'].getQuestions(this.visitTaskId) - this.$refs['ecrf3'].getQuestions(this.visitTaskId) + this.$nextTick(() => { + this.$refs['ecrf'].getQuestions(this.visitTaskId) + this.$refs['ecrf2'].getQuestions(this.visitTaskId) + this.$refs['ecrf3'].getQuestions(this.visitTaskId) + }) DicomEvent.$emit('getReportInfo', true) loading.close() } diff --git a/src/views/trials/trials-panel/reading/dicoms/components/Questions.vue b/src/views/trials/trials-panel/reading/dicoms/components/Questions.vue index 976fcb1d..f64da557 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/Questions.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/Questions.vue @@ -119,6 +119,7 @@ export default { }, methods: { async getQuestions(visitTaskId) { + var isChangeVisitTask = this.visitTaskId !== visitTaskId this.visitTaskId = visitTaskId // const loading = this.$loading({ fullscreen: true }) var idx = this.visitTaskList.findIndex(i => i.VisitTaskId === visitTaskId) @@ -130,12 +131,12 @@ export default { if (this.groupClassify === 3) { this.measurements = [] this.visitTaskList[idx].QuestionMarkInfoList.forEach(i => { - if (i.MeasureData) { + if (this.isJSONString(i.MeasureData)) { i.MeasureData = JSON.parse(i.MeasureData) } this.measurements.push(i) }) - if (this.readingTaskState < 2 && !this.isBaseLineTask && !this.spleenInfo) { + if (this.readingTaskState < 2 && !this.isBaseLineTask && isChangeVisitTask) { const { Result } = await getSplenicVerify(visitTaskId) this.spleenInfo = Result } @@ -550,6 +551,14 @@ export default { if (obj.key === this.spleenStatusId) { this.setSpleenCommentDisplay() } + }, + isJSONString(str) { + try { + JSON.stringify(JSON.parse(str)) + return true + } catch (e) { + return false + } } } } diff --git a/src/views/trials/trials-panel/reading/dicoms/components/ReadPage.vue b/src/views/trials/trials-panel/reading/dicoms/components/ReadPage.vue index a76f82b6..4fc6c6b7 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/ReadPage.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/ReadPage.vue @@ -332,14 +332,16 @@ export default { if (!this.visitTaskList[index].studyListInit) { await store.dispatch('reading/getStudyInfo', { trialId: this.trialId, subjectVisitId: this.visitTaskList[index].VisitId, visitTaskId: this.visitTaskList[index].VisitTaskId, taskBlindName: this.visitTaskList[index].TaskBlindName }) } - if (!this.visitTaskList[index].readingQuestionsInit) { - await store.dispatch('reading/getReadingQuestionAndAnswer', { trialId: this.trialId, visitTaskId: this.visitTaskList[index].VisitTaskId }) - } + + await store.dispatch('reading/getReadingQuestionAndAnswer', { trialId: this.trialId, visitTaskId: this.visitTaskList[index].VisitTaskId }) + if (!this.visitTaskList[index].questionsInit) { await store.dispatch('reading/getDicomReadingQuestionAnswer', { trialId: this.trialId, visitTaskId: this.visitTaskList[index].VisitTaskId }) } await store.dispatch('reading/setStatus', { visitTaskId: this.visitTaskList[index].VisitTaskId }) + } else if (this.visitTaskList[index].IsCurrentTask && this.visitTaskList[index].ReadingTaskState === 2) { + await store.dispatch('reading/refreshMeasuredData', this.visitTaskList[index].VisitTaskId) } this.activeTaskVisitId = visitTaskId this.activeTaskIndex = index