diff --git a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/Questions.vue b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/Questions.vue index 7f64b4c6..2a46a734 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/Questions.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/Questions.vue @@ -64,7 +64,9 @@ export default { lungIsInsideVolume: true, liverIsInsideVolume: true, uptakeFromBaselineId: '', - baseLinePET5PS: null + baseLinePET5PS: null, + liverRender: true, + lungRender: true } }, computed: { @@ -98,7 +100,7 @@ export default { this.isBaseLineTask = this.$route.query.isBaseLineTask === 'true' this.initPage() FusionEvent.$on('refreshQuestions', () => { - this.initList() + this.initList(false) }) FusionEvent.$on('resetSuvQuestions', () => { console.log('resetSuvQuestions') @@ -159,9 +161,9 @@ export default { this.baseLinePET5PS = res.Result.BaseLinePET5PS this.loading = false } - this.initList() + this.initList(true) }, - initList() { + initList(isInit) { this.loading = true var params = { trialId: this.trialId, @@ -188,6 +190,11 @@ export default { res.OtherInfo.QuestionMarkInfoList.forEach(i => { if (i.OtherMeasureData) { i.OtherMeasureData = JSON.parse(i.OtherMeasureData) + if (i.QuestionType === 51 && isInit) { + this.liverRender = false + } else if (i.QuestionType === 52 && isInit) { + this.lungRender = false + } } this.measurements.push(i) }) @@ -297,7 +304,6 @@ export default { this.loading = false this.questionFormChangeState = false this.$message({ message: this.$t('common:message:savedSuccessfully'), type: 'success', duration: 2000 }) - }).catch(() => { this.loading = false }) @@ -357,7 +363,7 @@ export default { FusionEvent.$emit('imageLocation', { otherMeasureData: otherMeasureData }) }, saveAnnotation(question) { - if((question.QuestionType === 51 && !this.liverIsInsideVolume) || (question.QuestionType === 52 && !this.lungIsInsideVolume)){ + if ((question.QuestionType === 51 && !this.liverIsInsideVolume) || (question.QuestionType === 52 && !this.lungIsInsideVolume)) { // 当前标记在图像外 this.$alert(this.$t('trials:reading:lugano:warnning:outsideVolume'), this.$t('trials:lugano:fusionDialog:warning'), { callback: action => { @@ -406,7 +412,6 @@ export default { window.opener.postMessage({ type: 'petctLesionUpdate' }, window.location) loading.close() this.$message({ message: this.$t('common:message:savedSuccessfully'), type: 'success', duration: 2000 }) - }).catch(() => { loading.close() }) @@ -456,7 +461,20 @@ export default { } FusionEvent.$emit('addOrUpdateAnnotations', { data }) this.questionFormChangeState = true - this.setQuestionStatus(this.questions, this.measurements[idx].QuestionType) + if (obj.QuestionType === 51) { + if (!this.liverRender) { + this.liverRender = true + } else { + this.setQuestionStatus(this.questions, this.measurements[idx].QuestionType) + } + } + if (obj.QuestionType === 52) { + if (!this.lungRender) { + this.lungRender = true + } else { + this.setQuestionStatus(this.questions, this.measurements[idx].QuestionType) + } + } } }, setQuestionStatus(obj, questionType) { diff --git a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/TableQuestionItem.vue b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/TableQuestionItem.vue index 13a86d68..1527ea88 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/TableQuestionItem.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/TableQuestionItem.vue @@ -607,7 +607,23 @@ export default { if (!isInit) { // saveTypeEnum 0:未保存过(新建病灶);1:已保存,信息不完整(随访初始化病灶/分裂病灶,通过状态判断) if (this.questionForm.RowId) { - this.$set(this.questionForm, 'saveTypeEnum', 1) + if (this.questionForm.OtherMeasureData && this.firstRenderAnnotation) { + var annotation = Object.assign({}, this.questionForm.OtherMeasureData) + + if (annotation && this.firstRenderAnnotation) { + for (const k in annotation.data.cachedStats) { + if (annotation.data.cachedStats[k].pointsInShape.length !== 0) { + this.firstRenderAnnotation = false + break + } + } + } + } + if (this.firstRenderAnnotation) { + this.$set(this.questionForm, 'saveTypeEnum', 2) + } else { + this.$set(this.questionForm, 'saveTypeEnum', 1) + } } else { this.$set(this.questionForm, 'saveTypeEnum', 0) }