From aed068f967499a2b043a63ddb1fa50319e026f4f Mon Sep 17 00:00:00 2001 From: libowei <3423564950@qq.com> Date: Fri, 8 Dec 2023 15:26:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=A3=E8=AF=AD=E5=86=99?= =?UTF-8?q?=E4=BD=9C=E9=98=85=E8=AF=BB=E5=90=AC=E5=8A=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../teacher_teachers/components/audiology.vue | 26 +- .../teacher_teachers/components/reading.vue | 57 ++-- .../teacher_teachers/components/slander.vue | 216 +++++++++------ .../teacher_teachers/teacher_writeadd.vue | 249 +++++++++++++++++- 4 files changed, 425 insertions(+), 123 deletions(-) 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 @@