同步数据时只刷新病灶列表部分信息
parent
c8e7645fa5
commit
55085438aa
|
@ -161,7 +161,7 @@
|
||||||
<div class="text">{{ $t('trials:reading:button:reset') }}</div>
|
<div class="text">{{ $t('trials:reading:button:reset') }}</div>
|
||||||
</div>
|
</div>
|
||||||
</el-tooltip>
|
</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="tool-wrapper">
|
||||||
<div
|
<div
|
||||||
class="icon"
|
class="icon"
|
||||||
|
@ -2136,7 +2136,7 @@ export default {
|
||||||
async receiveMsg(event) {
|
async receiveMsg(event) {
|
||||||
if (event.data.type === 'readingPageUpdate') {
|
if (event.data.type === 'readingPageUpdate') {
|
||||||
// this.$refs['questions'].initList()
|
// this.$refs['questions'].initList()
|
||||||
this.$refs['tableQuestions'].initList()
|
this.$refs['tableQuestions'].initList(true)
|
||||||
this.isLocate = true
|
this.isLocate = true
|
||||||
// await this.getAnnotations()
|
// await this.getAnnotations()
|
||||||
this.viewportRender()
|
this.viewportRender()
|
||||||
|
|
|
@ -287,7 +287,7 @@ export default {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async initForm() {
|
async initForm(isRerender = false) {
|
||||||
const loading = this.$loading({ fullscreen: true })
|
const loading = this.$loading({ fullscreen: true })
|
||||||
this.questions.forEach(item => {
|
this.questions.forEach(item => {
|
||||||
if (item.QuestionClassify === 0) {
|
if (item.QuestionClassify === 0) {
|
||||||
|
@ -301,22 +301,27 @@ export default {
|
||||||
if (this.isBaseLineTask && item.QuestionMark === 7 && this.lesionType === 1) {
|
if (this.isBaseLineTask && item.QuestionMark === 7 && this.lesionType === 1) {
|
||||||
val = 0
|
val = 0
|
||||||
}
|
}
|
||||||
|
if (!isRerender || (isRerender && item.QuestionMark !== 20)) {
|
||||||
this.$set(this.questionForm, item.Id, val)
|
this.$set(this.questionForm, item.Id, val)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.$set(this.questionForm, 'MeasureData', this.answers.MeasureData ? JSON.parse(this.answers.MeasureData) : '')
|
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, 'RowIndex', this.answers.RowIndex ? this.answers.RowIndex : '')
|
||||||
this.$set(this.questionForm, 'RowId', this.answers.RowId ? this.answers.RowId : '')
|
this.$set(this.questionForm, 'RowId', this.answers.RowId ? this.answers.RowId : '')
|
||||||
this.$set(this.questionForm, 'OrganInfoId', this.answers.OrganInfoId ? this.answers.OrganInfoId : '')
|
this.$set(this.questionForm, 'OrganInfoId', this.answers.OrganInfoId ? this.answers.OrganInfoId : '')
|
||||||
|
|
||||||
// saveTypeEnum 0:未保存过(新建病灶);1:已保存,信息不完整(随访初始化病灶/分裂病灶,通过状态判断);2:已保存,信息完整
|
// saveTypeEnum 0:未保存过(新建病灶);1:已保存,信息不完整(随访初始化病灶/分裂病灶,通过状态判断);2:已保存,信息完整
|
||||||
var lesionState = this.getQuestionVal(7)
|
var lesionState = this.getQuestionVal(7)
|
||||||
if (this.questionForm.RowId) {
|
if (!isRerender) {
|
||||||
this.$set(this.questionForm, 'saveTypeEnum', isNaN(parseInt(lesionState)) ? 1 : 2)
|
if (this.questionForm.RowId) {
|
||||||
} else {
|
this.$set(this.questionForm, 'saveTypeEnum', isNaN(parseInt(lesionState)) ? 1 : 2)
|
||||||
this.$set(this.questionForm, 'saveTypeEnum', 0)
|
} else {
|
||||||
|
this.$set(this.questionForm, 'saveTypeEnum', 0)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.$set(this.questionForm, 'IsCanEditPosition', this.answers.IsCanEditPosition === 'True')
|
this.$set(this.questionForm, 'IsCanEditPosition', this.answers.IsCanEditPosition === 'True')
|
||||||
this.$set(this.questionForm, 'IsDicomReading', this.answers.IsDicomReading !== 'False')
|
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)))) {
|
if (this.answers.IsFristAdd === 'True' && this.answers.SplitOrMergeType === '0' && isNaN(parseInt(this.getQuestionVal(7)))) {
|
||||||
const stateId = this.getQuestionId(7)
|
const stateId = this.getQuestionId(7)
|
||||||
this.$set(this.questionForm, stateId, 0)
|
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
|
this.isRender = true
|
||||||
loading.close()
|
loading.close()
|
||||||
},
|
},
|
||||||
|
|
|
@ -170,7 +170,7 @@ export default {
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initList() {
|
initList(isRerender = false) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
this.activeName = ''
|
this.activeName = ''
|
||||||
this.activeItem.activeRowIndex = null
|
this.activeItem.activeRowIndex = null
|
||||||
|
@ -180,13 +180,13 @@ export default {
|
||||||
visitTaskId: this.visitTaskId
|
visitTaskId: this.visitTaskId
|
||||||
}
|
}
|
||||||
getReadingQuestionAndAnswer(params).then(res => {
|
getReadingQuestionAndAnswer(params).then(res => {
|
||||||
this.questions = this.getQuestions(res.Result.SinglePage)
|
this.questions = this.getQuestions(res.Result.SinglePage, isRerender)
|
||||||
this.getTableQuestions()
|
this.getTableQuestions()
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.tableQuestions.forEach(item => {
|
this.tableQuestions.forEach(item => {
|
||||||
item.TableQuestions.Answers.forEach(i => {
|
item.TableQuestions.Answers.forEach(i => {
|
||||||
var refName = `${item.Id}_${i.RowIndex}`
|
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 => {
|
questions.forEach(item => {
|
||||||
if (item.Type === 'table' && item.TableQuestions && item.TableQuestions.Answers.length > 0) {
|
if (item.Type === 'table' && item.TableQuestions && item.TableQuestions.Answers.length > 0) {
|
||||||
item.TableQuestions.Answers.forEach(answerObj => {
|
item.TableQuestions.Answers.forEach(answerObj => {
|
||||||
|
@ -230,10 +230,12 @@ export default {
|
||||||
var lesionState = this.getQuestionAnswer(item.TableQuestions.Questions, 7, answerObj)
|
var lesionState = this.getQuestionAnswer(item.TableQuestions.Questions, 7, answerObj)
|
||||||
lesionState = !isNaN(parseInt(lesionState)) ? parseInt(lesionState) : ''
|
lesionState = !isNaN(parseInt(lesionState)) ? parseInt(lesionState) : ''
|
||||||
this.$set(answerObj, 'lesionState', lesionState)
|
this.$set(answerObj, 'lesionState', lesionState)
|
||||||
if (answerObj.RowId) {
|
if (!isRerender) {
|
||||||
this.$set(answerObj, 'saveTypeEnum', 2)
|
if (answerObj.RowId) {
|
||||||
} else {
|
this.$set(answerObj, 'saveTypeEnum', 2)
|
||||||
this.$set(answerObj, 'saveTypeEnum', 0)
|
} else {
|
||||||
|
this.$set(answerObj, 'saveTypeEnum', 0)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue