From f356590c3d2d10238078742b5627013cf9497923 Mon Sep 17 00:00:00 2001 From: 阿宝 Date: Tue, 13 Dec 2022 18:29:18 +0800 Subject: [PATCH] 即时测列表,分析页面 --- src/views/ask/index.vue | 48 ++++++++++++++++++++++++++++++++---------------- src/views/examinationPaper/add.vue | 4 ++-- src/views/examinationPaper/index.vue | 4 ++-- src/views/test/analysis.vue | 431 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----- src/views/test/index.vue | 593 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----- 5 files changed, 1050 insertions(+), 30 deletions(-) diff --git a/src/views/ask/index.vue b/src/views/ask/index.vue index c79d8a5..92c5c48 100644 --- a/src/views/ask/index.vue +++ b/src/views/ask/index.vue @@ -77,10 +77,13 @@ >今天 昨天本周 本周本月 + 本季度

筛选 @@ -460,9 +463,11 @@ export default { }); }, - setDate(index) { + setDate(index) { const that = this; this.date = index == this.date ? "" : index; + let aYear = new Date().getFullYear(); + let aMonth = new Date().getMonth() + 1; that.query.day = ""; that.query.startDay = ""; that.query.endDay = ""; @@ -472,25 +477,36 @@ export default { that.query.startDay = that.query.day; that.query.endDay = that.query.day; break; - case 2: { - let times = new Date().getTime() - 24 * 60 * 60 * 1000; - that.query.day = formatDate(new Date(times), "yyyy-MM-dd"); - that.query.startDay = that.query.day; - that.query.endDay = that.query.day; - break; - } - case 3: { + case 2: let day = new Date().getDay(); if (day == 0) { //中国式星期天是一周的最后一天 day = 7; } - let times1 = new Date().getTime() - 24 * 60 * 60 * 1000 * (day - 1); - let times2 = new Date().getTime() - 24 * 60 * 60 * 1000 * (day - 7); - that.query.startDay = formatDate(new Date(times1), "yyyy-MM-dd"); - that.query.endDay = formatDate(new Date(times2), "yyyy-MM-dd"); + let aTime = new Date().getTime() - 24 * 60 * 60 * 1000 * day; + that.query.startDay = formatDate(new Date(aTime), "yyyy-MM-dd"); + that.query.endDay = formatDate(new Date(), "yyyy-MM-dd"); + break; + case 3: + aMonth = aMonth < 10 ? "0" + aMonth : aMonth; + that.query.startDay = `${aYear}-${aMonth}-01`; + that.query.endDay = formatDate(new Date(), "yyyy-MM-dd"); + break; + case 4: + if (aMonth > 1 && aMonth < 4) { + aMonth = "01"; + } else if (aMonth > 3 && aMonth < 7) { + aMonth = "04"; + } else if (aMonth > 6 && aMonth < 10) { + aMonth = "07"; + } else { + aMonth = "10"; + } + + aMonth = aMonth < 10 ? "0" + aMonth : aMonth; + that.query.startDay = `${aYear}-${aMonth}-01`; + that.query.endDay = formatDate(new Date(), "yyyy-MM-dd"); break; - } } this.page = 1; this._QueryData(); diff --git a/src/views/examinationPaper/add.vue b/src/views/examinationPaper/add.vue index 75ecbff..226ca94 100644 --- a/src/views/examinationPaper/add.vue +++ b/src/views/examinationPaper/add.vue @@ -95,8 +95,8 @@ - 任课班级分享 - 全年级分享 + 任课班级分享 + 全年级分享 diff --git a/src/views/examinationPaper/index.vue b/src/views/examinationPaper/index.vue index 7fdfd8c..0e71d6c 100644 --- a/src/views/examinationPaper/index.vue +++ b/src/views/examinationPaper/index.vue @@ -381,8 +381,8 @@ export default { const { data, status, info } = await this.$request.fetchPaperList({ ...query, status: 1, - // page: this.page, - // size: this.size, + page: this.page, + size: this.size, }); this.loading = false; if (status === 0) { diff --git a/src/views/test/analysis.vue b/src/views/test/analysis.vue index 89c9741..2d69710 100644 --- a/src/views/test/analysis.vue +++ b/src/views/test/analysis.vue @@ -1,13 +1,434 @@ - \ No newline at end of file diff --git a/src/views/test/index.vue b/src/views/test/index.vue index 2d65aed..3f37020 100644 --- a/src/views/test/index.vue +++ b/src/views/test/index.vue @@ -1,16 +1,599 @@ - \ No newline at end of file -- libgit2 0.21.4