首次渲染不更新保存标识

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, lungIsInsideVolume: true,
liverIsInsideVolume: true, liverIsInsideVolume: true,
uptakeFromBaselineId: '', uptakeFromBaselineId: '',
baseLinePET5PS: null baseLinePET5PS: null,
liverRender: true,
lungRender: true
} }
}, },
computed: { computed: {
@ -98,7 +100,7 @@ export default {
this.isBaseLineTask = this.$route.query.isBaseLineTask === 'true' this.isBaseLineTask = this.$route.query.isBaseLineTask === 'true'
this.initPage() this.initPage()
FusionEvent.$on('refreshQuestions', () => { FusionEvent.$on('refreshQuestions', () => {
this.initList() this.initList(false)
}) })
FusionEvent.$on('resetSuvQuestions', () => { FusionEvent.$on('resetSuvQuestions', () => {
console.log('resetSuvQuestions') console.log('resetSuvQuestions')
@ -159,9 +161,9 @@ export default {
this.baseLinePET5PS = res.Result.BaseLinePET5PS this.baseLinePET5PS = res.Result.BaseLinePET5PS
this.loading = false this.loading = false
} }
this.initList() this.initList(true)
}, },
initList() { initList(isInit) {
this.loading = true this.loading = true
var params = { var params = {
trialId: this.trialId, trialId: this.trialId,
@ -188,6 +190,11 @@ export default {
res.OtherInfo.QuestionMarkInfoList.forEach(i => { res.OtherInfo.QuestionMarkInfoList.forEach(i => {
if (i.OtherMeasureData) { if (i.OtherMeasureData) {
i.OtherMeasureData = JSON.parse(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) this.measurements.push(i)
}) })
@ -297,7 +304,6 @@ export default {
this.loading = false this.loading = false
this.questionFormChangeState = false this.questionFormChangeState = false
this.$message({ message: this.$t('common:message:savedSuccessfully'), type: 'success', duration: 2000 }) this.$message({ message: this.$t('common:message:savedSuccessfully'), type: 'success', duration: 2000 })
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false
}) })
@ -357,7 +363,7 @@ export default {
FusionEvent.$emit('imageLocation', { otherMeasureData: otherMeasureData }) FusionEvent.$emit('imageLocation', { otherMeasureData: otherMeasureData })
}, },
saveAnnotation(question) { 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'), { this.$alert(this.$t('trials:reading:lugano:warnning:outsideVolume'), this.$t('trials:lugano:fusionDialog:warning'), {
callback: action => { callback: action => {
@ -406,7 +412,6 @@ export default {
window.opener.postMessage({ type: 'petctLesionUpdate' }, window.location) window.opener.postMessage({ type: 'petctLesionUpdate' }, window.location)
loading.close() loading.close()
this.$message({ message: this.$t('common:message:savedSuccessfully'), type: 'success', duration: 2000 }) this.$message({ message: this.$t('common:message:savedSuccessfully'), type: 'success', duration: 2000 })
}).catch(() => { }).catch(() => {
loading.close() loading.close()
}) })
@ -456,8 +461,21 @@ export default {
} }
FusionEvent.$emit('addOrUpdateAnnotations', { data }) FusionEvent.$emit('addOrUpdateAnnotations', { data })
this.questionFormChangeState = true this.questionFormChangeState = true
if (obj.QuestionType === 51) {
if (!this.liverRender) {
this.liverRender = true
} else {
this.setQuestionStatus(this.questions, this.measurements[idx].QuestionType) 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) { setQuestionStatus(obj, questionType) {
for (let i = 0; i < obj.length; i++) { for (let i = 0; i < obj.length; i++) {

View File

@ -607,7 +607,23 @@ export default {
if (!isInit) { if (!isInit) {
// saveTypeEnum 01访/ // saveTypeEnum 01访/
if (this.questionForm.RowId) { if (this.questionForm.RowId) {
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) this.$set(this.questionForm, 'saveTypeEnum', 1)
}
} else { } else {
this.$set(this.questionForm, 'saveTypeEnum', 0) this.$set(this.questionForm, 'saveTypeEnum', 0)
} }