From 9681c32dace2c5f492a2ff4289f6a6d7ad7fb2e7 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Thu, 26 Sep 2024 13:51:56 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=9B=E4=BA=8B=E7=9B=B8=E5=85=B3=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E4=B8=AD=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index.js | 2 + src/assets/img/right.svg | 1 + src/assets/img/shrink.svg | 1 + src/assets/img/tag-active.svg | 1 + src/assets/img/tag.svg | 1 + src/assets/img/wrong.svg | 1 + src/const/ques.js | 50 + src/libs/util.js | 37 + src/pages/match/manage/matchArch.vue | 67 +- src/pages/match/manage/matchArchList.vue | 630 ++++------- src/pages/match/manage/matchInfo.vue | 4 +- src/pages/match/manage/matchRank.vue | 6 +- src/pages/match/manage/otherArchList.vue | 597 ++++++++++ src/pages/match/manage/theoryReport.vue | 1001 +++++++++++++++++ .../{matchReport.vue => trialReport.vue} | 19 +- src/pages/student/list/index.vue | 127 ++- src/plugins/requests/index.js | 3 +- src/router/modules/match.js | 116 +- 18 files changed, 2089 insertions(+), 575 deletions(-) create mode 100644 src/assets/img/right.svg create mode 100644 src/assets/img/shrink.svg create mode 100644 src/assets/img/tag-active.svg create mode 100644 src/assets/img/tag.svg create mode 100644 src/assets/img/wrong.svg create mode 100644 src/const/ques.js create mode 100644 src/pages/match/manage/otherArchList.vue create mode 100644 src/pages/match/manage/theoryReport.vue rename src/pages/match/manage/{matchReport.vue => trialReport.vue} (94%) diff --git a/src/api/index.js b/src/api/index.js index 5276f0a..ed6d5df 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -182,6 +182,8 @@ export default { checkTeamStatus: `competition/teamAbnormalInformation/checkTeamStatus`, queryAbnormalTeam: `competition/teamAbnormalInformation/queryAbnormalTeam`, viewEventAllocationInformation: `competition/competitionAutomaticAllocationRecord/viewEventAllocationInformation`, + getDetailedExamScores: `exam/exam/paper/getDetailedExamScores`, + exportExamPaperReport: `exam/exam/paper/exportExamPaperReport`, // 赛事内容 addCompetitionContent: `competition/competition/content/addCompetitionContent`, diff --git a/src/assets/img/right.svg b/src/assets/img/right.svg new file mode 100644 index 0000000..a35728a --- /dev/null +++ b/src/assets/img/right.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/img/shrink.svg b/src/assets/img/shrink.svg new file mode 100644 index 0000000..7ba4e0d --- /dev/null +++ b/src/assets/img/shrink.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/img/tag-active.svg b/src/assets/img/tag-active.svg new file mode 100644 index 0000000..c5183d4 --- /dev/null +++ b/src/assets/img/tag-active.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/img/tag.svg b/src/assets/img/tag.svg new file mode 100644 index 0000000..2661143 --- /dev/null +++ b/src/assets/img/tag.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/img/wrong.svg b/src/assets/img/wrong.svg new file mode 100644 index 0000000..c34c0a0 --- /dev/null +++ b/src/assets/img/wrong.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/const/ques.js b/src/const/ques.js new file mode 100644 index 0000000..3814d19 --- /dev/null +++ b/src/const/ques.js @@ -0,0 +1,50 @@ +export default { + difficults: [ + { + id: 'basic', + name: '基础', + coefficient: 0.2, // 难度系数,试卷里计算试卷难度专用 + theme: 'success', + }, + { + id: 'easy', + name: '普通', + coefficient: 0.4, + theme: '', + }, + { + id: 'medium', + name: '较难', + coefficient: 0.6, + theme: 'warning', + }, + { + id: 'hard', + name: '难', + coefficient: 0.8, + theme: 'danger', + }, + ], + questionTypes: [ + { + id: 'single_choice', + name: '单选题' + }, + { + id: 'multiple_choice', + name: '多选题' + }, + { + id: 'judgement', + name: '判断题' + }, + { + id: 'fill_blank', + name: '填空题' + }, + { + id: 'essay', + name: '问答题' + }, + ], +} diff --git a/src/libs/util.js b/src/libs/util.js index 42f5be1..7b099de 100644 --- a/src/libs/util.js +++ b/src/libs/util.js @@ -220,6 +220,43 @@ const util = { resolve(new Date(data.currentTime)) }) }, + // 阿拉伯数字转化为中文数字 + arabicToChinese (num) { + const arr1 = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九']; + const arr2 = ['', '十', '百', '千', '万', '亿', '点', '']; + const a = `${num}`.replace(/(^0*)/g, '').split('.'); + let k = 0; + let re = ''; + for (let i = a[0].length - 1; i >= 0; i--) { + switch (k) { + case 0: + re = arr2[7] + re; + break; + case 4: + if (!new RegExp(`0{4}//d{${a[0].length - i - 1}}$`).test(a[0])) re = arr2[4] + re; + break; + case 8: + re = arr2[5] + re; + arr2[7] = arr2[5]; + k = 0; + break; + default: + } + if (k % 4 == 2 && a[0].charAt(i + 2) != 0 && a[0].charAt(i + 1) == 0) re = arr1[0] + re; + if (a[0].charAt(i) != 0) re = arr1[a[0].charAt(i)] + arr2[k % 4] + re; + k++; + } + return num > 9 && num < 20 ? re.slice(1) : re; + }, + // 阿拉伯数字转化为英文字母 + numToLetter (num) { + let result = '' + if (num > 26) { + result += numberToLetter((num / 26) >> 0 - 1) + } + result += String.fromCharCode(65 + (num % 26)) + return result + }, }; export default util; \ No newline at end of file diff --git a/src/pages/match/manage/matchArch.vue b/src/pages/match/manage/matchArch.vue index 0ba4be9..26ef488 100644 --- a/src/pages/match/manage/matchArch.vue +++ b/src/pages/match/manage/matchArch.vue @@ -1,53 +1,29 @@ + + \ No newline at end of file diff --git a/src/pages/match/manage/theoryReport.vue b/src/pages/match/manage/theoryReport.vue new file mode 100644 index 0000000..09564ac --- /dev/null +++ b/src/pages/match/manage/theoryReport.vue @@ -0,0 +1,1001 @@ + + + + + \ No newline at end of file diff --git a/src/pages/match/manage/matchReport.vue b/src/pages/match/manage/trialReport.vue similarity index 94% rename from src/pages/match/manage/matchReport.vue rename to src/pages/match/manage/trialReport.vue index 93ffe76..252112a 100644 --- a/src/pages/match/manage/matchReport.vue +++ b/src/pages/match/manage/trialReport.vue @@ -81,7 +81,7 @@ - +