diff --git a/pages_teacher/teacher_teachers/components/audiology.vue b/pages_teacher/teacher_teachers/components/audiology.vue index 7116cfa..fc50646 100644 --- a/pages_teacher/teacher_teachers/components/audiology.vue +++ b/pages_teacher/teacher_teachers/components/audiology.vue @@ -35,9 +35,6 @@ - - - {{quesitem.typeText}} @@ -94,32 +91,51 @@ this.image = !this.image this.tk = id if (this.image == false) { + this.tk = id + }else { this.tk = null } }, checkboxChange(parat, e) { if (e.value) { this.checked.push(parat.id) + const allItemsNoSubsets = parat.modules.every(item => !('subsets' in item)); + parat.modules.forEach(item=>{ + this.$set(item, 'subsets', item.id); + item.subsets = item.id; + this.subsets.push(item.id) + console.log( item.subsets) + }) + } else { let index = this.checked.indexOf(parat.id); if (index !== -1) { this.checked.splice(index, 1); + parat.modules.forEach(item=>{ + this.$delete(item, 'subsets'); + const index = this.subsets.indexOf(item.id); + if (index !== -1) { + this.subsets.splice(index, 1); + } + }) + } } - console.log(this.checked) + console.log(this.checked,'part数组') this.$forceUpdate() }, checkoutzj(quesitem, id) { if (id.value) { this.subsets.push(quesitem.id) + console.log(quesitem) } else { let index2 = this.subsets.indexOf(quesitem.id); if (index2 !== -1) { this.subsets.splice(index2, 1); } } - console.log(this.subsets) + console.log(this.subsets,'题型数组') } } } diff --git a/pages_teacher/teacher_teachers/components/reading.vue b/pages_teacher/teacher_teachers/components/reading.vue index f37d714..c550597 100644 --- a/pages_teacher/teacher_teachers/components/reading.vue +++ b/pages_teacher/teacher_teachers/components/reading.vue @@ -1,5 +1,5 @@