diff --git a/common/http.interceptor.js b/common/http.interceptor.js index 2986464..004bf4f 100644 --- a/common/http.interceptor.js +++ b/common/http.interceptor.js @@ -42,7 +42,7 @@ const install = (Vue, vm) => { // 所以哪怕您重新登录修改了Storage,下一次的请求将会是最新值 // const token = uni.getStorageSync('token'); - const token = " Bearer 0b34feaf02224ccb9d4e09730ab68c35" + const token = " Bearer e465eb9d9ae74b4dad7a63dbe0e54587" // console.log("我是token", token) config.header.Authorization = token; diff --git a/pages/Mystudent/addstu.vue b/pages/Mystudent/addstu.vue index 89d0a64..e522741 100644 --- a/pages/Mystudent/addstu.vue +++ b/pages/Mystudent/addstu.vue @@ -62,8 +62,8 @@ } }, onLoad(option) { - // this.classid=option.id - this.classid=15 + this.classid=option.id + // this.classid=15 this.getallstu() }, methods: { diff --git a/pages/Mystudent/formstu.vue b/pages/Mystudent/formstu.vue index e174b40..202a9a3 100644 --- a/pages/Mystudent/formstu.vue +++ b/pages/Mystudent/formstu.vue @@ -95,8 +95,8 @@ export default { } }, onLoad(option) { - // this.classid=option.id - this.classid=15 + this.classid=option.id + // this.classid=15 }, onShow() { diff --git a/pages/Mystudent/student.vue b/pages/Mystudent/student.vue index cabfb89..f7ccdf5 100644 --- a/pages/Mystudent/student.vue +++ b/pages/Mystudent/student.vue @@ -47,7 +47,7 @@ + style="width:80rpx ;"> 学生人数 diff --git a/pages_teacher/teacher_class/class_detail.vue b/pages_teacher/teacher_class/class_detail.vue index c67606f..7c43fcf 100644 --- a/pages_teacher/teacher_class/class_detail.vue +++ b/pages_teacher/teacher_class/class_detail.vue @@ -131,8 +131,8 @@ } }, onLoad(option) { - /* > */ // this.classid=option.id - this.classid=15 + this.classid=option.id + // this.classid=15 }, onShow(){ diff --git a/pages_teacher/teacher_teachers/components/audiology.vue b/pages_teacher/teacher_teachers/components/audiology.vue index d25bd45..4b2d350 100644 --- a/pages_teacher/teacher_teachers/components/audiology.vue +++ b/pages_teacher/teacher_teachers/components/audiology.vue @@ -37,7 +37,7 @@ shape="circle"> - + {{quesitem.number}} {{quesitem.typeText}} @@ -66,6 +66,8 @@ image: true, tk: null, selectwrite: [], + selectedItems: [], + } }, @@ -93,6 +95,23 @@ this.itemActive = activeindex; this.updateSubsetsInListHearing() console.log(this.listHearing, "this.itemActivethis.itemActive"); + const uniquePartIds = new Set(); + + // Loop through listHearing and collect unique part IDs + this.listHearing.forEach((paper) => { + paper.tests.forEach((test) => { + test.parts.forEach((part) => { + const hasSelectedQuesitem = part.modules.some((quesitem) => quesitem.subsets); + + if (hasSelectedQuesitem) { + uniquePartIds.add(part.id); + } + }); + }); + }); + + // Convert the Set to an array and update selectedItems + this.selectedItems = Array.from(uniquePartIds); }); }, Bages_addActive(TextIndex, id) { @@ -100,14 +119,14 @@ this.$forceUpdate(); }, icon(id) { - this.image = !this.image; - this.tk = id; - if (this.image == false) { - this.tk = id; - } else { - this.tk = null; - } - }, + this.image = !this.image; + if (this.image) { + this.selectedItems = this.selectedItems.filter(item => item !== id); + } else { + this.selectedItems.push(id); + } + console.log(this.selectedItems,'this.selectedItemsthis.selectedItems'); + }, checkboxChange(partitem, e) { if (e.value) { this.listHearing.forEach((paper) => { diff --git a/pages_teacher/teacher_teachers/components/reading.vue b/pages_teacher/teacher_teachers/components/reading.vue index 9196442..2e614d9 100644 --- a/pages_teacher/teacher_teachers/components/reading.vue +++ b/pages_teacher/teacher_teachers/components/reading.vue @@ -37,7 +37,7 @@ shape="circle"> - + {{quesitem.number}}{{quesitem.typeText}} @@ -66,6 +66,7 @@ image: true, tk: null, selectwrite: [], + selectedItems: [], } }, @@ -91,6 +92,24 @@ } this.itemActive = activeindex this.updateSubsetsInListHearing() + const uniquePartIds = new Set(); + + // Loop through listHearing and collect unique part IDs + this.listHearing.forEach((paper) => { + paper.tests.forEach((test) => { + test.parts.forEach((part) => { + const hasSelectedQuesitem = part.modules.some((quesitem) => quesitem.subsets); + + if (hasSelectedQuesitem) { + uniquePartIds.add(part.id); + } + }); + }); + }); + + // Convert the Set to an array and update selectedItems + this.selectedItems = Array.from(uniquePartIds); + console.log( this.selectedItems ,' this.selectedItems '); }) }, // 听力test点击事件 @@ -99,15 +118,15 @@ this.$forceUpdate() }, // 点击变化图表 - icon(id) { - this.image = !this.image - this.tk = id - if (this.image == false) { - this.tk = id - } else { - this.tk = null - } - }, + icon(id) { + this.image = !this.image; + if (this.image) { + this.selectedItems = this.selectedItems.filter(item => item !== id); + } else { + this.selectedItems.push(id); + } + console.log(this.selectedItems,'this.selectedItemsthis.selectedItems'); + }, checkboxChange(partitem, e) { if (e.value) { this.listHearing.forEach((paper) => { @@ -200,6 +219,8 @@ }); }); }); + console.log(this.selectwrite,'selectwriteselectwrite'); + }, // 添加信息到selectwrite数组 diff --git a/pages_teacher/teacher_teachers/teacher_addOperation.vue b/pages_teacher/teacher_teachers/teacher_addOperation.vue index 350d9a2..a48574b 100644 --- a/pages_teacher/teacher_teachers/teacher_addOperation.vue +++ b/pages_teacher/teacher_teachers/teacher_addOperation.vue @@ -1,21 +1,14 @@