From 8068572935cfa5c66b8dad7c50518868cfcf18f9 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Fri, 5 Jul 2024 16:50:59 +0800 Subject: [PATCH] fix --- public/index.html | 2 +- src/api/index.js | 2 + src/components/quill/index.vue | 103 ++-- src/pages/achievement/info/project.vue | 16 +- src/pages/achievement/list/course.vue | 57 +- src/pages/achievement/show/index.vue | 14 +- src/pages/assessment/add/index.vue | 278 ++++----- src/pages/product/show/index.vue | 808 ++++++++++++------------- src/pages/project/add/index.vue | 5 +- src/pages/project/list/index.vue | 224 ++----- src/pages/screen/index.vue | 137 ++--- src/pages/station/preview/index.vue | 1 + src/plugins/requests/index.js | 47 +- src/setting.js | 1 + src/store/modules/project.js | 64 +- src/styles/page/screen.scss | 7 + 16 files changed, 774 insertions(+), 992 deletions(-) diff --git a/public/index.html b/public/index.html index 2a0608a..7b9845e 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?e4d7deeca2d6ea71d2bd5fa2365bc654'; + hm.src = 'https://hm.baidu.com/hm.js?72fbad6ebf1d6c705117fe8fe0686a0e'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(hm, s); })(); diff --git a/src/api/index.js b/src/api/index.js index 15761b2..024a71f 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -126,6 +126,7 @@ export default { exportDetailsOfStudentAssessmentResults: `${host}occupationlab/occupationlab/achievement/exportDetailsOfStudentAssessmentResults`, exportProductPracticeResults: `${host}occupationlab/occupationlab/achievement/exportProductPracticeResults`, exportProductAssessResults: `${host}occupationlab/occupationlab/achievement/exportProductAssessResults`, + exportMultipleExperimentalReports: `${host}occupationlab/occupationlab/achievement/exportMultipleExperimentalReports`, // 项目管理 getSystemIdBySchool: `occupationlab/occupationlab/projectManage/getSystemIdBySchool`, // 获取学校下拥有的系统 @@ -422,6 +423,7 @@ export default { courseRankings: `occupationlab/occupationlab/data/kanban/courseRankings`, platformLoginStatistics: `users/users/user/platformLoginStatistics`, activityRanking: `occupationlab/occupationlab/data/kanban/activityRanking`, + productsWithExperimentalResults: `occupationlab/occupationlab/data/kanban/productsWithExperimentalResults`, // 产品中心 productCategoryList: `nakadai/productClassification/productCategoryList`, diff --git a/src/components/quill/index.vue b/src/components/quill/index.vue index 365045d..eb73e25 100644 --- a/src/components/quill/index.vue +++ b/src/components/quill/index.vue @@ -1,39 +1,21 @@ @@ -303,40 +285,63 @@ export default { diff --git a/src/pages/achievement/info/project.vue b/src/pages/achievement/info/project.vue index e2c2c4f..bd9472e 100644 --- a/src/pages/achievement/info/project.vue +++ b/src/pages/achievement/info/project.vue @@ -263,8 +263,10 @@ 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}`) - this.listData = res.page.records - this.total = res.page.total + // 返回格式有两种 + const isArr = res.page instanceof Array + this.listData = isArr ? res.page : res.page.records + this.total = isArr ? res.total : res.page.total this.avgScore = (+res.avgScore).toFixed(2) this.examCount = res.examCount this.peopleNum = res.peopleNum @@ -339,6 +341,16 @@ export default { list = res.page.records } + const res = await axios.post(this.api.exportMultipleExperimentalReports, list.map(e => e.reportId), { + headers: { + token: this.token + }, + responseType: 'blob' + }) + const name = res.headers['content-disposition'] + util.downloadFileDirect(name ? decodeURI(name) : '成绩报告.xlsx', new Blob([res.data])) + this.exporting = false + return list.forEach(async e => { if (e.reportId) { try { diff --git a/src/pages/achievement/list/course.vue b/src/pages/achievement/list/course.vue index 111da9a..8a1897a 100644 --- a/src/pages/achievement/list/course.vue +++ b/src/pages/achievement/list/course.vue @@ -1,67 +1,39 @@ @@ -253,10 +225,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 8e080a5..65574b5 100644 --- a/src/pages/achievement/show/index.vue +++ b/src/pages/achievement/show/index.vue @@ -218,9 +218,14 @@ export default { index++ } }) - e.lcStudentAnswer.map((n, i) => { - e.answer += `${i + 1}.${n.userAnswer || '未填写'};` - }) + // lcStudentAnswer是后来特意给沙盘项目的且或判分点加的字段,其他系统都没有这个字段,因此如果没有这个字段,则直接显示老的lcRuleRecords + if (e.lcStudentAnswer) { + e.lcStudentAnswer.map((n, i) => { + e.answer += `${i + 1}.${n.userAnswer || '未填写'};` + }) + } else { + e.lcStudentAnswer = e.lcRuleRecords + } }) } else { // python系统显示图片(从userScores里取) list.forEach(e => { @@ -234,7 +239,7 @@ export default { this.expData = list this.loading = false }, - exportPage () { + async exportPage () { const form = Object.assign(this.form, this.infoData) const list = JSON.parse(JSON.stringify(this.expData)) list.map((e, i) => { @@ -387,6 +392,7 @@ samp { padding: 10px 16px; font-size: 14px; color: #333; + white-space: pre-wrap; &.edit { color: #abb3c6; diff --git a/src/pages/assessment/add/index.vue b/src/pages/assessment/add/index.vue index 0a92046..3afcde0 100644 --- a/src/pages/assessment/add/index.vue +++ b/src/pages/assessment/add/index.vue @@ -1,33 +1,24 @@