From da0efc51bce29989c44a2d36baccf243053f03d1 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Tue, 29 Oct 2024 14:06:28 +0800 Subject: [PATCH] fix --- public/index.html | 2 +- src/api/index.js | 1 + src/pages/achievement/info/course.vue | 2 +- src/pages/achievement/info/project.vue | 11 +- src/pages/achievement/list/project.vue | 148 +++++++------------------ src/pages/achievement/show/index.vue | 8 +- src/pages/assessment/add/index.vue | 18 ++- src/pages/match/manage/matchInfo.vue | 2 + src/pages/match/manage/trialReport.vue | 6 +- src/router/permission.js | 14 +-- 10 files changed, 81 insertions(+), 131 deletions(-) diff --git a/public/index.html b/public/index.html index 7b9845e..2a0608a 100644 --- a/public/index.html +++ b/public/index.html @@ -10,7 +10,7 @@ var _hmt = _hmt || []; (function() { var hm = document.createElement('script'); - hm.src = 'https://hm.baidu.com/hm.js?72fbad6ebf1d6c705117fe8fe0686a0e'; + hm.src = 'https://hm.baidu.com/hm.js?e4d7deeca2d6ea71d2bd5fa2365bc654'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(hm, s); })(); diff --git a/src/api/index.js b/src/api/index.js index ed6d5df..a6c34af 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -101,6 +101,7 @@ export default { schoolCourse: `nakadai/nakadai/curriculum/schoolCourse`, // 获取学校购买订单后的课程 getSchoolEffectiveCourse: `nakadai/nakadai/curriculum/getSchoolEffectiveCourse`, projectListByCourseId: `occupationlab/occupationlab/projectManage/getSchoolProjectByAssessent`, // 根据课程id获取实训项目列表 + getProjectOrExamPaperByAssessment: `occupationlab/occupationlab/projectManage/getProjectOrExamPaperByAssessment`, // 成绩管理 deleteExperimentalReport: `occupationlab/occupationlab/achievement/deleteExperimentalReport`, // 单个、批量删除实验报告 diff --git a/src/pages/achievement/info/course.vue b/src/pages/achievement/info/course.vue index a48d4cd..93ff547 100644 --- a/src/pages/achievement/info/course.vue +++ b/src/pages/achievement/info/course.vue @@ -468,7 +468,7 @@ export default { toReport (row) { this.$store.commit('achievement/setRow', this.curRow) // 考核跳实验报告,练习跳项目维度的成绩详情 - this.$router.push(this.curTab == 1 ? `show?reportId=${row.reportId}` : `project?id=${row.projectId}&projectName=${row.projectName}&classId=${this.curRow.classId || ''}&workNumber=${row.workNumber || row.userName}&mallId=${this.id}&fromCourse=1`) + this.$router.push(this.curTab == 1 ? `show?reportId=${row.reportId}` : `project?id=${row.projectId || ''}&paperId=${row.paperId || ''}&projectName=${row.projectName}&classId=${this.curRow.classId || ''}&workNumber=${row.workNumber || row.userName}&mallId=${this.id}&fromCourse=1`) }, getChart () { // 初始化折线图 const data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] diff --git a/src/pages/achievement/info/project.vue b/src/pages/achievement/info/project.vue index 1973378..6f2b3b3 100644 --- a/src/pages/achievement/info/project.vue +++ b/src/pages/achievement/info/project.vue @@ -179,7 +179,8 @@ export default { classes: [], // 班级标签页列表 permissions: +this.$route.query.permissions, experimentalName: this.$route.query.projectName, - id: this.$route.query.id, + id: this.$route.query.id || '', + paperId: this.$route.query.paperId || '', mallId: this.$route.query.mallId, workNumber: this.$route.query.workNumber, keyword: "", @@ -263,7 +264,7 @@ export default { // 考核和练习调不同接口 const res = this.permissions ? await this.$post(`${this.api.getAssessmentDetail}?pageNum=${this.page}&pageSize=${this.pageSize}&assessmentId=${this.id}&classId=${this.classId}&keyword=${this.keyword}&mallId=${this.mallId}`) : - await this.$post(`${this.api.getPracticeDetail}?pageNum=${this.page}&pageSize=${this.pageSize}&projectId=${this.id}&keyWord=${this.keyword}&classId=${this.classId}&mallId=${this.mallId}`) + await this.$post(`${this.api.getPracticeDetail}?pageNum=${this.page}&pageSize=${this.pageSize}&projectId=${this.id}&paperId=${this.paperId}&keyWord=${this.keyword}&classId=${this.classId}&mallId=${this.mallId}`) // 返回格式有两种 const isArr = res.page instanceof Array this.list = isArr ? res.page : res.page.records @@ -286,7 +287,7 @@ export default { // 活跃度 async getActivity () { // 考核和练习调不同接口 - const { message } = await this.$post(`${this.api.practiceActivity}?pageNum=${this.pageActivation}&pageSize=${this.pageSizeActivation}&projectId=${this.id}&keyWord=${this.keyword}&classId=${this.classId}&mallId=${this.mallId}`) + const { message } = await this.$post(`${this.api.practiceActivity}?pageNum=${this.pageActivation}&pageSize=${this.pageSizeActivation}&projectId=${this.id}}&paperId=${this.paperId}&keyWord=${this.keyword}&classId=${this.classId}&mallId=${this.mallId}`) this.activations = message.records this.totalActivation = message.total }, @@ -315,7 +316,7 @@ export default { // 考核和练习的接口不一样 let url = this.permissions ? `${this.api.exportAssessmentInfo}?assessmentId=${this.id}&classId=${this.classId}` - : `${this.api.exportPracticeInfo}?projectId=${this.id}&mallId=${this.mallId}` + : `${this.api.exportPracticeInfo}?projectId=${this.id}&mallId=${this.mallId}&paperId=${this.paperId}` // 有勾选,就带上勾选的id if (this.multipleSelection.length) { const ids = this.multipleSelection.map(e => this.permissions ? e.testStatusId : e.reportId) @@ -435,7 +436,7 @@ export default { responseType: 'blob' }) } else { - res = await axios.get(`${this.api.exportAllActivity}?projectId=${this.id}&mallId=${this.mallId}&classId=${this.classId}&keyWord=${this.keyword}`, { + res = await axios.get(`${this.api.exportAllActivity}?projectId=${this.id}&paperId=${this.paperId}&mallId=${this.mallId}&classId=${this.classId}&keyWord=${this.keyword}`, { headers: { token: this.token }, diff --git a/src/pages/achievement/list/project.vue b/src/pages/achievement/list/project.vue index d81e989..e4e8e2e 100644 --- a/src/pages/achievement/list/project.vue +++ b/src/pages/achievement/list/project.vue @@ -1,159 +1,88 @@ @@ -322,7 +251,7 @@ export default { // 进入实验记录 entry (row) { this.$store.commit('achievement/setReferrer', `${this.$route.path}?${qs.stringify(this.form)}&page=${this.page}`) - this.$router.push(`project?id=${row.assessmentId || row.projectId}&projectName=${row.projectName}&permissions=${row.permissions || 0}&mallId=${this.form.mallId}&classId=${row.classId || ''}`) + this.$router.push(`project?id=${row.assessmentId || row.projectId || ''}&paperId=${row.paperId || ''}&projectName=${row.projectName}&permissions=${row.permissions || 0}&mallId=${this.form.mallId}&classId=${row.classId || ''}`) }, handleDelete (row) { // 删除 this.$confirm("该项目下的所有成绩报告将会删除,是否继续?", "提示", { @@ -392,10 +321,11 @@ export default { \ No newline at end of file diff --git a/src/pages/achievement/show/index.vue b/src/pages/achievement/show/index.vue index 3fd5a8a..87e3247 100644 --- a/src/pages/achievement/show/index.vue +++ b/src/pages/achievement/show/index.vue @@ -109,12 +109,12 @@ {{ i + 1 }}. {{ item.userAnswer || '未填写' }} -
+
{{ scope.row.answer }}