同步数据时只刷新病灶列表部分信息
parent
c8e7645fa5
commit
55085438aa
|
@ -161,7 +161,7 @@
|
|||
<div class="text">{{ $t('trials:reading:button:reset') }}</div>
|
||||
</div>
|
||||
</el-tooltip>
|
||||
<el-tooltip v-if="!isBaseLineTask" class="item" effect="dark" :content="$t('trials:lugano:button:record')" placement="bottom" >
|
||||
<el-tooltip v-if="!isBaseLineTask" class="item" effect="dark" :content="$t('trials:lugano:button:record')" placement="bottom">
|
||||
<div class="tool-wrapper">
|
||||
<div
|
||||
class="icon"
|
||||
|
@ -2136,7 +2136,7 @@ export default {
|
|||
async receiveMsg(event) {
|
||||
if (event.data.type === 'readingPageUpdate') {
|
||||
// this.$refs['questions'].initList()
|
||||
this.$refs['tableQuestions'].initList()
|
||||
this.$refs['tableQuestions'].initList(true)
|
||||
this.isLocate = true
|
||||
// await this.getAnnotations()
|
||||
this.viewportRender()
|
||||
|
|
|
@ -287,7 +287,7 @@ export default {
|
|||
|
||||
},
|
||||
methods: {
|
||||
async initForm() {
|
||||
async initForm(isRerender = false) {
|
||||
const loading = this.$loading({ fullscreen: true })
|
||||
this.questions.forEach(item => {
|
||||
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()
|
||||
},
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue