From 55085438aa88e3be116610c79a9c446cf7d309c4 Mon Sep 17 00:00:00 2001 From: caiyiling <1321909229@qq.com> Date: Mon, 8 Apr 2024 14:50:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E6=95=B0=E6=8D=AE=E6=97=B6?= =?UTF-8?q?=E5=8F=AA=E5=88=B7=E6=96=B0=E7=97=85=E7=81=B6=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E9=83=A8=E5=88=86=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dicoms/components/Fusion/PetCt.vue | 4 +-- .../components/Fusion/TableQuestionItem.vue | 33 +++++++++++-------- .../components/Fusion/TableQuestions.vue | 18 +++++----- 3 files changed, 31 insertions(+), 24 deletions(-) diff --git a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/PetCt.vue b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/PetCt.vue index cfcb3a07..e1e5d6f2 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/PetCt.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/PetCt.vue @@ -161,7 +161,7 @@
{{ $t('trials:reading:button:reset') }}
- +
{ if (item.QuestionClassify === 0) { @@ -301,22 +301,27 @@ export default { if (this.isBaseLineTask && item.QuestionMark === 7 && this.lesionType === 1) { val = 0 } - - this.$set(this.questionForm, item.Id, val) + if (!isRerender || (isRerender && item.QuestionMark !== 20)) { + this.$set(this.questionForm, item.Id, val) + } } }) this.$set(this.questionForm, 'MeasureData', this.answers.MeasureData ? JSON.parse(this.answers.MeasureData) : '') - this.$set(this.questionForm, 'OtherMeasureData', this.answers.OtherMeasureData ? JSON.parse(this.answers.OtherMeasureData) : '') + if (!isRerender) { + this.$set(this.questionForm, 'OtherMeasureData', this.answers.OtherMeasureData ? JSON.parse(this.answers.OtherMeasureData) : '') + } this.$set(this.questionForm, 'RowIndex', this.answers.RowIndex ? this.answers.RowIndex : '') this.$set(this.questionForm, 'RowId', this.answers.RowId ? this.answers.RowId : '') this.$set(this.questionForm, 'OrganInfoId', this.answers.OrganInfoId ? this.answers.OrganInfoId : '') // saveTypeEnum 0:未保存过(新建病灶);1:已保存,信息不完整(随访初始化病灶/分裂病灶,通过状态判断);2:已保存,信息完整 var lesionState = this.getQuestionVal(7) - if (this.questionForm.RowId) { - this.$set(this.questionForm, 'saveTypeEnum', isNaN(parseInt(lesionState)) ? 1 : 2) - } else { - this.$set(this.questionForm, 'saveTypeEnum', 0) + if (!isRerender) { + if (this.questionForm.RowId) { + this.$set(this.questionForm, 'saveTypeEnum', isNaN(parseInt(lesionState)) ? 1 : 2) + } else { + this.$set(this.questionForm, 'saveTypeEnum', 0) + } } this.$set(this.questionForm, 'IsCanEditPosition', this.answers.IsCanEditPosition === 'True') this.$set(this.questionForm, 'IsDicomReading', this.answers.IsDicomReading !== 'False') @@ -359,13 +364,13 @@ export default { if (this.answers.IsFristAdd === 'True' && this.answers.SplitOrMergeType === '0' && isNaN(parseInt(this.getQuestionVal(7)))) { const stateId = this.getQuestionId(7) this.$set(this.questionForm, stateId, 0) - var isLymphLesion = this.getQuestionVal(2) - isLymphLesion = !isNaN(parseInt(isLymphLesion)) ? parseInt(isLymphLesion) : null - const lesionPart = this.getQuestionVal(8) - const lesionOrgan = this.getQuestionVal(6) - const suvMax = this.getQuestionVal(20) - this.$emit('resetQuestions', { isLymphLesion, lesionPart, lesionOrgan, suvMax, saveTypeEnum: this.questionForm.saveTypeEnum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm }) } + var isLymphLesion = this.getQuestionVal(2) + isLymphLesion = !isNaN(parseInt(isLymphLesion)) ? parseInt(isLymphLesion) : null + const lesionPart = this.getQuestionVal(8) + const lesionOrgan = this.getQuestionVal(6) + const suvMax = this.getQuestionVal(20) + this.$emit('resetQuestions', { isLymphLesion, lesionPart, lesionOrgan, suvMax, saveTypeEnum: this.questionForm.saveTypeEnum, rowIndex: this.rowIndex, questionId: this.parentQsId, anwsers: this.questionForm }) this.isRender = true loading.close() }, diff --git a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/TableQuestions.vue b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/TableQuestions.vue index 0d8c28c6..2bcc5ff6 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/Fusion/TableQuestions.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/Fusion/TableQuestions.vue @@ -170,7 +170,7 @@ export default { beforeDestroy() { }, methods: { - initList() { + initList(isRerender = false) { this.loading = true this.activeName = '' this.activeItem.activeRowIndex = null @@ -180,13 +180,13 @@ export default { visitTaskId: this.visitTaskId } getReadingQuestionAndAnswer(params).then(res => { - this.questions = this.getQuestions(res.Result.SinglePage) + this.questions = this.getQuestions(res.Result.SinglePage, isRerender) this.getTableQuestions() this.$nextTick(() => { this.tableQuestions.forEach(item => { item.TableQuestions.Answers.forEach(i => { var refName = `${item.Id}_${i.RowIndex}` - this.$refs[refName] && this.$refs[refName][0].initForm() + this.$refs[refName] && this.$refs[refName][0].initForm(isRerender) }) }) }) @@ -217,7 +217,7 @@ export default { } }, - getQuestions(questions) { + getQuestions(questions, isRerender) { questions.forEach(item => { if (item.Type === 'table' && item.TableQuestions && item.TableQuestions.Answers.length > 0) { item.TableQuestions.Answers.forEach(answerObj => { @@ -230,10 +230,12 @@ export default { var lesionState = this.getQuestionAnswer(item.TableQuestions.Questions, 7, answerObj) lesionState = !isNaN(parseInt(lesionState)) ? parseInt(lesionState) : '' this.$set(answerObj, 'lesionState', lesionState) - if (answerObj.RowId) { - this.$set(answerObj, 'saveTypeEnum', 2) - } else { - this.$set(answerObj, 'saveTypeEnum', 0) + if (!isRerender) { + if (answerObj.RowId) { + this.$set(answerObj, 'saveTypeEnum', 2) + } else { + this.$set(answerObj, 'saveTypeEnum', 0) + } } }) }