From 68875fbab6886c12528483a9328c1d0540eed098 Mon Sep 17 00:00:00 2001 From: 梁保满 Date: Sun, 4 Feb 2024 11:42:14 +0800 Subject: [PATCH] 即时测多班汇总(删除) --- src/views/basic/test/components/multipleClass.vue | 0 src/views/basic/test/list.vue | 56 ++++++++++++++++++++------------------------------------ 2 files changed, 20 insertions(+), 36 deletions(-) delete mode 100644 src/views/basic/test/components/multipleClass.vue diff --git a/src/views/basic/test/components/multipleClass.vue b/src/views/basic/test/components/multipleClass.vue deleted file mode 100644 index e69de29..0000000 --- a/src/views/basic/test/components/multipleClass.vue +++ /dev/null diff --git a/src/views/basic/test/list.vue b/src/views/basic/test/list.vue index d2df02b..1d47f6b 100644 --- a/src/views/basic/test/list.vue +++ b/src/views/basic/test/list.vue @@ -251,7 +251,6 @@ export default { endDay: "", }, multipleSelection: [], - multipleSelectionClassId: [], tableData: [], page: 1, size: 20, @@ -336,45 +335,31 @@ export default { }); subjectArr = [...new Set(subjectArr)]; console.log(subjectArr); - if (this.multipleSelectionClassId.length > 1) { + if (ids.length == 1) { + this.$router.push({ + path: "/testAnalysis", + query: { + id: ids[0], + title: this.multipleSelection[0].title, + score: this.multipleSelection[0].examPaperScore || 0, + type: 1, + subjectName: subjectArr.join(), + classId: this.query.classId[0], + params: this.$route.query.params, + }, + }); + } else { //去详情 this.$router.push({ path: "/testAnalysis", query: { ids: ids.join(), - classId: this.multipleSelectionClassId.join(), - type: 5, + classId: this.query.classId[0], + type: subjectArr.length == 1 ? 2 : 3, subjectName: subjectArr.join(), params: this.$route.query.params, }, }); - } else { - if (ids.length == 1) { - this.$router.push({ - path: "/testAnalysis", - query: { - id: ids[0], - title: this.multipleSelection[0].title, - score: this.multipleSelection[0].examPaperScore || 0, - type: 1, - subjectName: subjectArr.join(), - classId: this.query.classId[0], - params: this.$route.query.params, - }, - }); - } else { - //去详情 - this.$router.push({ - path: "/testAnalysis", - query: { - ids: ids.join(), - classId: this.query.classId[0], - type: subjectArr.length == 1 ? 2 : 3, - subjectName: subjectArr.join(), - params: this.$route.query.params, - }, - }); - } } }, // 多班对比 @@ -497,14 +482,13 @@ export default { this.total = data?.count || 0; } else { this.isMultipleClass = true; - this.multipleSelectionClassId = []; + let classArr = []; data?.list?.map((item) => { - if (!this.multipleSelectionClassId.includes(item.classId)) { - this.multipleSelectionClassId.push(item.classId); + if (!classArr.includes(item.classId)) { + classArr.push(item.classId); } }); - - if (this.multipleSelectionClassId.length > 1) { + if (classArr.length > 1) { //多班级 let tableObj = {}; data?.list?.map((item) => { -- libgit2 0.21.4