参加考试{{ peopleNum }}人 | {{ permissions ? `共${min.errorTotal || 0}人做错,` : '' }}错误率{{
min.errorRate }}%
@@ -188,6 +188,7 @@ export default {
id: this.$route.query.id || '',
paperId: this.$route.query.paperId || '',
mallId: this.$route.query.mallId,
+ cid: this.$route.query.cid || '',
workNumber: this.$route.query.workNumber,
keyword: "",
searchTimer: null,
@@ -339,30 +340,58 @@ export default {
},
// 导出实验报告
async exportReport () {
- this.exporting = true
- // 选择了数据则导出选中的,否则不用给reportId,导出全部
- let list = this.multipleSelection
- let reportIds = []
- if (list.length) {
- list.map(e => {
- e.reportId && reportIds.push(e.reportId)
- })
- }
+ if (this.list.length) {
+ this.exporting = true
+ // 选择了数据则导出选中的,否则不用给reportId,导出全部
+ let list = this.multipleSelection
+ let reportIds = []
+ if (list.length) {
+ list.map(e => {
+ e.reportId && reportIds.push(e.reportId)
+ })
+ }
+
+ const per = this.permissions
+ let res
+ if (this.list[0].paperId) {
+ // 理论
+ const data = {
+ ids: reportIds,
+ }
+ if (!reportIds.length) {
+ if (per) {
+ data.assessmentId = this.id
+ } else {
+ data.examPaperId = this.paperId
+ data.mallId = this.mallId
+ data.cid = this.cid
+ }
+ }
+ res = await axios.post(this.api[per ? 'exportExamPaperReports' : 'exportPracticePaperExperimentReport'], data, {
+ headers: {
+ token: this.token
+ },
+ responseType: 'blob'
+ })
+ } else {
+ // 实训
+ const data = {
+ mallId: this.mallId,
+ reportIds
+ }
+ data[per ? 'assessmentId' : 'projectId'] = this.id || this.paperId
+ res = await axios.post(this.api.batchExportReportsAsZip, data, {
+ headers: {
+ token: this.token
+ },
+ responseType: 'blob'
+ })
+ }
- const data = {
- mallId: this.mallId,
- reportIds
+ const name = res.headers['content-disposition']
+ Util.downloadFileDirect(name ? decodeURI(name) : '成绩报告.zip', new Blob([res.data]))
+ this.exporting = false
}
- data[this.permissions ? 'assessmentId' : this.paperId ? 'paperId' : 'projectId'] = this.id || this.paperId
- const res = await axios.post(this.api.batchExportReportsAsZip, data, {
- headers: {
- token: this.token
- },
- responseType: 'blob'
- })
- const name = res.headers['content-disposition']
- Util.downloadFileDirect(name ? decodeURI(name) : '成绩报告.zip', new Blob([res.data]))
- this.exporting = false
},
handleDelete (row) { // 删除
this.$confirm("确定要删除吗?", "提示", {
@@ -489,6 +518,14 @@ export default {
errorChart () {
const data = this.errorAnalysis.scoringPointList
const maxFontLength = data.length > 13 ? 6 : 10
+ const xData = []
+ const yData = []
+ data.forEach(e => {
+ const el = document.createElement('div')
+ el.innerHTML = e.judgmentName
+ xData.push(el.innerText)
+ yData.push(e.errorRate)
+ })
const option = {
tooltip: {
trigger: 'axis',
@@ -540,7 +577,7 @@ export default {
},
// rotate: 45
},
- data: data.map(e => e.judgmentName)
+ data: xData
}],
yAxis: [
{
@@ -587,7 +624,7 @@ export default {
shadowColor: 'rgba(0, 0, 0, 0.1)',
}
},
- data: data.map(e => e.errorRate)
+ data: yData
}
]
}
@@ -696,6 +733,10 @@ export default {
width: 500px;
margin-right: 100px;
}
+
+ .jud-html {
+ max-width: 410px;
+ }
}
}
\ No newline at end of file
diff --git a/src/pages/achievement/list/project.vue b/src/pages/achievement/list/project.vue
index 654b037..66411ca 100644
--- a/src/pages/achievement/list/project.vue
+++ b/src/pages/achievement/list/project.vue
@@ -250,8 +250,10 @@ export default {
},
// 进入实验记录
entry (row) {
+ const { mallId } = this.form
+ const cur = this.curs.find(e => e.mallId == mallId) || {}
this.$store.commit('achievement/setReferrer', `${this.$route.path}?${qs.stringify(this.form)}&page=${this.page}`)
- this.$router.push(`project?id=${row.assessmentId || row.projectId || ''}&paperId=${row.paperId || ''}&projectName=${row.projectName}&permissions=${this.form.permissions}&mallId=${this.form.mallId}&classId=${row.classId || ''}`)
+ this.$router.push(`project?id=${row.assessmentId || row.projectId || ''}&paperId=${row.paperId || ''}&cid=${cur.cid}&projectName=${row.projectName || ''}&permissions=${this.form.permissions}&mallId=${this.form.mallId}&classId=${row.classId || ''}`)
},
handleDelete (row) { // 删除
this.$confirm("该项目下的所有成绩报告将会删除,是否继续?", "提示", {
diff --git a/src/pages/assessment/list/index.vue b/src/pages/assessment/list/index.vue
index 441bef7..48e71f6 100644
--- a/src/pages/assessment/list/index.vue
+++ b/src/pages/assessment/list/index.vue
@@ -1,62 +1,34 @@
-
+
筛选
@@ -324,5 +266,4 @@ export default {
}
};
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/setting.js b/src/setting.js
index d7a1dfb..775a6a6 100644
--- a/src/setting.js
+++ b/src/setting.js
@@ -97,7 +97,7 @@ const Setting = {
// 相同路由,不同参数间进行切换,是否强力更新
sameRouteForceUpdate: false,
// 是否使用动态路由(即角色权限,开启了的话就会取后端返回的权限树来显示头部导肮和页面按钮)
- dynamicRoute: false,
+ dynamicRoute: true,
// 文件上传
upload: {
apiURL: uploadURL,