From 8ea67428e9a73e9555b5ba4894572f3ac64a11d3 Mon Sep 17 00:00:00 2001 From: 梁保满 Date: Wed, 4 Jan 2023 18:45:47 +0800 Subject: [PATCH] 飞书bug --- src/api/axios.js | 1 - src/components/setAnswer.vue | 8 ++++---- src/components/upload.vue | 10 ++-------- src/views/analysis/index.vue | 1 + src/views/ask/analysis.vue | 18 ++++++++++-------- src/views/ask/index.vue | 134 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------- src/views/device/index.vue | 6 +++--- src/views/device/log.vue | 1 + src/views/examinationPaper/index.vue | 4 ++-- src/views/login/index.vue | 10 +++++----- src/views/test/analysis.vue | 173 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------- src/views/test/editAnswer.vue | 20 ++++++++++---------- src/views/test/index.vue | 289 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------- 13 files changed, 516 insertions(+), 159 deletions(-) diff --git a/src/api/axios.js b/src/api/axios.js index dcaea45..a316063 100644 --- a/src/api/axios.js +++ b/src/api/axios.js @@ -71,7 +71,6 @@ service.interceptors.response.use( if (status === 403 || status === 401) { if (data.status === 999) { - debugger console.log(data.data) if (data.data) { window.location.href = data.data; diff --git a/src/components/setAnswer.vue b/src/components/setAnswer.vue index d069f1b..752ac0a 100644 --- a/src/components/setAnswer.vue +++ b/src/components/setAnswer.vue @@ -356,10 +356,10 @@ export default { } }, async saveAnswer() { - let questionList = []; - for (let i = 0; i < this.FormQuestionList.length; i++) { - if (this.FormQuestionList[i].qusType) { - this.FormQuestionList.splice(i, 1); + let questionList = [...this.FormQuestionList]; + for (let i = 0; i < questionList.length; i++) { + if (questionList[i].qusType) { + questionList.splice(i, 1); i--; } } diff --git a/src/components/upload.vue b/src/components/upload.vue index f950457..8779670 100644 --- a/src/components/upload.vue +++ b/src/components/upload.vue @@ -30,14 +30,8 @@ export default { name: "downUpData", props: { - id: { - type: String, - default: "", - }, - examId: { - type: String, - default: "", - }, + id: "", + examId: "", url: { type: String, default: "", diff --git a/src/views/analysis/index.vue b/src/views/analysis/index.vue index 9638fbd..0041469 100644 --- a/src/views/analysis/index.vue +++ b/src/views/analysis/index.vue @@ -185,6 +185,7 @@ export default { //中国式星期天是一周的最后一天 day = 7; } + day-- 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"); diff --git a/src/views/ask/analysis.vue b/src/views/ask/analysis.vue index 06a0890..20ce59f 100644 --- a/src/views/ask/analysis.vue +++ b/src/views/ask/analysis.vue @@ -77,12 +77,12 @@ align="center" > {{ scoped.row.participationRate }}% + > - + > + 导出报表 - 设置答案 + 修改答案

@@ -336,6 +337,7 @@ export default { }, handleSuccess() { this.dialogVisible = false; + this._QueryData(); }, async edit() { if (this.editLoading) return; diff --git a/src/views/ask/index.vue b/src/views/ask/index.vue index 2b7a39c..300fd92 100644 --- a/src/views/ask/index.vue +++ b/src/views/ask/index.vue @@ -94,7 +94,9 @@ @change="tabChange" style="margin-bottom: 20px" > - 单课时报表 + 单课时报表 @@ -109,7 +111,7 @@ 总课时数:10 互动总数:22

--> -
+
{{ scoped.row.classCorrectRate }}%
-
+
+ + + + + + + + + +
-
+
+ + + + + + + +
{ + let params = {}; + item.dataList.map((items, index) => { + if (!subjectName.includes(items.subjectName)) { + subjectName.push(items.subjectName); + } + params["answerCorrectRate" + items.subjectName] = items.answerCorrectRate; + params["correctRate" + items.subjectName] = items.correctRate; + params["participationRate" + items.subjectName] = items.participationRate; + params["periodCount" + items.subjectName] = items.periodCount; + params["questionNum" + items.subjectName] = items.questionNum; + }); + return { + ...item, + ...params, + }; + }); + this.phaseOption = [...subjectName]; + } else { + this.tableData = (data?.list && [...data?.list]) || []; + } this.total = data.count; } else { this.$message.error(info); @@ -680,7 +761,26 @@ export default { }); this.loading = false; if (status === 0) { - this.tableData = (data?.list && [...data?.list]) || []; + if (this.role == "ROLE_BANZHUREN") { + let subjectName = []; + this.tableData = data?.list.map((item) => { + let params = {}; + item.dataList.map((items, index) => { + if (!subjectName.includes(items.subjectName)) { + subjectName.push(items.subjectName); + } + params["interactionsNum" + items.subjectName] = items.interactionsNum; + params["interactionsCorrectNum" + items.subjectName] = items.interactionsCorrectNum; + }); + return { + ...item, + ...params, + }; + }); + this.phaseInter = [...subjectName]; + } else { + this.tableData = (data?.list && [...data?.list]) || []; + } this.total = data.count; } else { this.$message.error(info); diff --git a/src/views/device/index.vue b/src/views/device/index.vue index 2f0ca54..b6db961 100644 --- a/src/views/device/index.vue +++ b/src/views/device/index.vue @@ -39,7 +39,7 @@
-
+

{{ count }}

@@ -175,7 +175,7 @@
-
+

{{ count }}

@@ -291,7 +291,7 @@
-
+
diff --git a/src/views/device/log.vue b/src/views/device/log.vue index ad1a947..09f8a23 100644 --- a/src/views/device/log.vue +++ b/src/views/device/log.vue @@ -193,6 +193,7 @@ export default { //中国式星期天是一周的最后一天 day = 7; } + day-- 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"); diff --git a/src/views/examinationPaper/index.vue b/src/views/examinationPaper/index.vue index bcccf87..dae2399 100644 --- a/src/views/examinationPaper/index.vue +++ b/src/views/examinationPaper/index.vue @@ -201,7 +201,7 @@ export default { tableData: null, shareForm: { id: "", - sharingType: 1, //0-任课班级/1-全年级 + sharingType: 0, //0-任课班级/1-全年级 }, shareRulesForm: { sharingType: [ @@ -243,7 +243,7 @@ export default { case 1: //修改分享范围 that.shareForm.id = item.id; - that.shareForm.sharingType = item.sharingType || 1; + that.shareForm.sharingType = item.sharingType; that.dialogVisible = true; break; case 2: diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 6a9a118..fd4dbb0 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -95,12 +95,12 @@ export default { loginForm: { // username: "15911715665", // password: "Csiy88888", - username: "13610050254", - password: "Pw050254#", + // username: "13610050254", + // password: "Pw050254#", // username: "18332123505", // password: "Pw123505#", - // username: "18687826606", - // password: "Pw826606#", + username: "18687826606", + password: "Pw826606#", // username: "18946034886", // password: "Pw034886#", // username: "18893712576", @@ -129,7 +129,7 @@ export default { this.dockkey = getURLParams("dockkey") || ""; if (this.code || this.dockkey) { this.loading = true - // this._LoginCheck(); + this._LoginCheck(); } }, methods: { diff --git a/src/views/test/analysis.vue b/src/views/test/analysis.vue index 32d1751..fa6b76a 100644 --- a/src/views/test/analysis.vue +++ b/src/views/test/analysis.vue @@ -16,7 +16,14 @@ 重新计分 - 暂时不计 + 暂时不计
@@ -46,65 +53,123 @@ >作答明细表
- + - {{ scoped.row.classScoringRate }}% - + + +
+ 汇总 +
    +
  • + 主观题 + {{ paperModifyLog.subjectiveScore }} + {{ + paperModifyLog.subjectiveHighestScore + }} + {{ + paperModifyLog.subjectiveLowestScore + }} + {{ + paperModifyLog.subjectiveAvgScore + }} + {{ paperModifyLog.subjectiveClassScoringRate }}% +
  • +
  • + 客观题 + {{ paperModifyLog.objectiveScore }} + {{ + paperModifyLog.objectiveHighestScore + }} + {{ + paperModifyLog.objectiveLowestScore + }} + {{ paperModifyLog.objectiveAvgScore }} + {{ paperModifyLog.objectiveClassScoringRate }}% +
  • +
  • + 整卷 + {{ paperModifyLog.examPaperScore }} + {{ paperModifyLog.highestScore }} + {{ paperModifyLog.lowestScore }} + {{ paperModifyLog.avgScore }} + {{ paperModifyLog.classScoringRate }}% +
  • +
+
@@ -219,7 +284,7 @@
{ params["que" + items.id] = items.id; - params["score" + items.id] = items.score; - params["answer" + items.id] = items.answer; + params["score" + items.id] = Number(items.score).toFixed(2); + params["answer" + items.id] = + items.answer == 1 ? "✓" : items.answer == 2 ? "✗" : items.answer; params["isRight" + items.id] = items.isRight; params["questionType" + items.id] = items.questionType; }); @@ -498,7 +580,8 @@ export default { } console.log(detail); detail.map((items, index) => { - params[items.option] = items.count; + params["option" + index] = + items.option == 1 ? "✓" : items.option == 2 ? "✗" : items.option; }); return { ...item, @@ -603,4 +686,38 @@ export default { display: flex; justify-content: space-between; } +.hui-box { + display: flex; + text-align: center; + .s-txt { + width: 61px; + line-height: 144px; + background: #e2e2e2; + font-size: 16px; + color: #fff; + font-weight: 700; + } + .hui-ul { + border-top: 1px solid #e2e2e2; + } + .hui-li { + display: flex; + .hui-s { + height: 48px; + line-height: 48px; + border-right: 1px solid #e2e2e2; + border-bottom: 1px solid #e2e2e2; + box-sizing: border-box; + } + .s1 { + width: 100px; + } + .s2 { + width: 110px; + } + .s3 { + width: 120px; + } + } +} \ No newline at end of file diff --git a/src/views/test/editAnswer.vue b/src/views/test/editAnswer.vue index d492278..77c9134 100644 --- a/src/views/test/editAnswer.vue +++ b/src/views/test/editAnswer.vue @@ -299,14 +299,14 @@ export default { score: "", }, watch: { - id: { - handler: function (val) { - if (val) { - this.edit(); - } - }, - immediate: true, - }, + // id: { + // handler: function (val) { + // if (val) { + // this.edit(); + // } + // }, + // immediate: true, + // }, }, data() { return { @@ -486,10 +486,10 @@ export default { } this.diaSetAns = false; }, - async edit() { + async edit(id) { //修改答案 const { data, status, info } = await this.$request.examQuestionList({ - examId: this.id, + examId: id, }); if (status == 0) { this.questionList = deepClone(data?.list || []); diff --git a/src/views/test/index.vue b/src/views/test/index.vue index 3036fbc..71c244c 100644 --- a/src/views/test/index.vue +++ b/src/views/test/index.vue @@ -11,7 +11,6 @@ class="sel" v-model="query.classId" placeholder="选择班级" - @change="changClazz" > 单卷测练报表 阶段测练报表 -
+
- + - - - + + + {{ + scoped.row.subjectiveScore == scoped.row.examPaperScore || + scoped.row.answerNum == 0 + ? scoped.row.goodNum || "-" + : `${scoped.row.goodNum}/${scoped.row.goodRate}%` + }} + {{ + scoped.row.subjectiveScore == scoped.row.examPaperScore || + scoped.row.answerNum == 0 + ? scoped.row.passNum || "-" + : `${scoped.row.passNum}/${scoped.row.passRate}%` + }} + @@ -207,8 +253,13 @@
-
- +
+ + + + + + + + + + +

+ + + + + +