diff --git a/src/views/trials/trials-panel/reading/dicoms/components/OCT/QuestionList.vue b/src/views/trials/trials-panel/reading/dicoms/components/OCT/QuestionList.vue index 1dbb04dc..ec70327c 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/OCT/QuestionList.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/OCT/QuestionList.vue @@ -157,8 +157,8 @@ - diff --git a/src/views/trials/trials-panel/reading/dicoms/components/OCT/QuestionTableFormItem.vue b/src/views/trials/trials-panel/reading/dicoms/components/OCT/QuestionTableFormItem.vue index b349a9ff..e8bd5be1 100644 --- a/src/views/trials/trials-panel/reading/dicoms/components/OCT/QuestionTableFormItem.vue +++ b/src/views/trials/trials-panel/reading/dicoms/components/OCT/QuestionTableFormItem.vue @@ -107,7 +107,7 @@ - @@ -129,6 +129,12 @@ export default { return [] } }, + questions: { + type: Array, + default() { + return [] + } + }, readingTaskState: { type: Number, required: true @@ -155,6 +161,7 @@ export default { } this.$emit('setFormItemData', { key: question.Id, val: v }) } + this.resetChildValue(question, this.questions) }, resetChild(obj) { obj.forEach(i => { @@ -164,6 +171,17 @@ export default { } }) }, + resetChildValue(obj, arr) { + arr.some(item => { + if (item.ParentId === obj.Id) { + this.$emit('resetFormItemData', item.Id) + } + if (item.Childrens && item.Childrens.length > 0) { + this.resetChildValue(obj, item.Childrens) + } + return item.ParentId === obj.Id + }) + }, limitBlur(valueType, value) { if (isNaN(parseInt(value))) { value = null