首次渲染不更新保存标识

uat_us
caiyiling 2024-03-29 10:17:29 +08:00
parent 3083ee1e8b
commit 82e5142bac
2 changed files with 43 additions and 9 deletions

View File

@ -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) {

View File

@ -607,7 +607,23 @@ export default {
if (!isInit) {
// saveTypeEnum 01访/
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)
}