|
|
|
@ -33,8 +33,8 @@ |
|
|
|
|
<div class="stat"> |
|
|
|
|
<div class="nums"> |
|
|
|
|
<div class="item"> |
|
|
|
|
<p class="name">实验总人数</p> |
|
|
|
|
<p class="val">{{ peopleNum }}</p> |
|
|
|
|
<p class="name">{{ permissions && classId != 1 ? '已参加/应参加实验人数' : '实验总人数' }}</p> |
|
|
|
|
<p class="val">{{ peopleNum + (permissions && classId != 1 ? '/' + examCount : '') }}</p> |
|
|
|
|
</div> |
|
|
|
|
<div class="item item2"> |
|
|
|
|
<p class="name">实验平均分</p> |
|
|
|
@ -133,11 +133,7 @@ |
|
|
|
|
prop="experimentalName" |
|
|
|
|
label="考核名称" |
|
|
|
|
min-width="250" |
|
|
|
|
align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
{{ experimentalName }} |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
<el-table-column prop="userName" |
|
|
|
|
label="学生姓名" |
|
|
|
|
min-width="100" |
|
|
|
@ -155,7 +151,7 @@ |
|
|
|
|
width="90" |
|
|
|
|
align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
{{ scope.row.timeSum }}min |
|
|
|
|
{{ scope.row.timeSum + (scope.row.reportId ? 'min' : '') }} |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column prop="submitTime" |
|
|
|
@ -163,14 +159,25 @@ |
|
|
|
|
min-width="150" |
|
|
|
|
align="center"> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column v-if="permissions" |
|
|
|
|
prop="submitTime" |
|
|
|
|
label="状态" |
|
|
|
|
min-width="150" |
|
|
|
|
align="center"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
{{ scope.row.reportId ? '已参加' : '未参加' }} |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column label="操作" |
|
|
|
|
align="center" |
|
|
|
|
width="160"> |
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
<tempalte v-if="scope.row.reportId"> |
|
|
|
|
<el-button type="text" |
|
|
|
|
@click="show(scope.row)">查看成绩报告</el-button> |
|
|
|
|
<el-button type="text" |
|
|
|
|
@click="handleDelete(scope.row)">删除</el-button> |
|
|
|
|
</tempalte> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
</el-table> |
|
|
|
@ -292,6 +299,7 @@ export default { |
|
|
|
|
page: 1, |
|
|
|
|
pageSize: 10, |
|
|
|
|
total: 0, |
|
|
|
|
examCount: 0, |
|
|
|
|
peopleNum: 0, // 总人数 |
|
|
|
|
avgScore: 0, // 平均分 |
|
|
|
|
maxScore: 0, |
|
|
|
@ -359,16 +367,16 @@ export default { |
|
|
|
|
const res = this.permissions ? |
|
|
|
|
await this.$post(`${this.api.getAssessmentDetail}?pageNum=${this.page}&pageSize=10000&assessmentId=${this.id}&classId=${this.classId}&keyword=${this.keyword}&mallId=${this.mallId}`) : |
|
|
|
|
await this.$post(`${this.api.getPracticeDetail}?pageNum=${this.page}&pageSize=10000&projectId=${this.id}&keyWord=${this.keyword}&classId=${this.classId}&mallId=${this.mallId}`) |
|
|
|
|
this.listDataAll = res.page.records |
|
|
|
|
this.listData = res.page.records |
|
|
|
|
this.total = res.page.total |
|
|
|
|
this.avgScore = (+res.avgScore).toFixed(2) |
|
|
|
|
this.examCount = res.examCount |
|
|
|
|
this.peopleNum = res.peopleNum |
|
|
|
|
this.maxScore = res.maxScore |
|
|
|
|
this.minScore = res.minScore |
|
|
|
|
this.errorAnalysis = res.errorAnalysis || {} |
|
|
|
|
this.max = res.highestErrorRate || {} |
|
|
|
|
this.min = res.minimumErrorRate || {} |
|
|
|
|
this.handlePage() |
|
|
|
|
this.getChart() |
|
|
|
|
this.errorChart() |
|
|
|
|
}, |
|
|
|
@ -402,7 +410,7 @@ export default { |
|
|
|
|
: `${this.api.exportPracticeInfo}?projectId=${this.id}&mallId=${this.mallId}` |
|
|
|
|
// 有勾选,就带上勾选的id |
|
|
|
|
if (this.multipleSelection.length) { |
|
|
|
|
const ids = this.multipleSelection.map(e => e.reportId) |
|
|
|
|
const ids = this.multipleSelection.map(e => this.permissions ? e.testStatusId : e.reportId) |
|
|
|
|
url += `&ids=${ids.toString()}` |
|
|
|
|
} |
|
|
|
|
axios.get(url, { |
|
|
|
@ -415,9 +423,17 @@ export default { |
|
|
|
|
}).catch(res => { }) |
|
|
|
|
}, |
|
|
|
|
// 导出实验报告 |
|
|
|
|
exportReport () { |
|
|
|
|
async exportReport () { |
|
|
|
|
// 没选择数据,则导出全部 |
|
|
|
|
const list = this.multipleSelection.length ? this.multipleSelection : this.listDataAll |
|
|
|
|
let list = this.multipleSelection |
|
|
|
|
if (!this.multipleSelection.length) { |
|
|
|
|
// 考核和练习调不同接口 |
|
|
|
|
const res = this.permissions ? |
|
|
|
|
await this.$post(`${this.api.getAssessmentDetail}?pageNum=${this.page}&pageSize=10000&assessmentId=${this.id}&classId=${this.classId}&keyword=${this.keyword}&mallId=${this.mallId}`) : |
|
|
|
|
await this.$post(`${this.api.getPracticeDetail}?pageNum=${this.page}&pageSize=10000&projectId=${this.id}&keyWord=${this.keyword}&classId=${this.classId}&mallId=${this.mallId}`) |
|
|
|
|
list = res.page.records |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
list.forEach(async e => { |
|
|
|
|
const { report, userScores } = await this.$get(`${this.api.reportDetail}?reportId=${e.reportId}`) |
|
|
|
|
userScores.map((e, i) => { |
|
|
|
@ -473,7 +489,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
handleCurrentChange (val) { // 切换分页 |
|
|
|
|
this.page = val; |
|
|
|
|
this.handlePage(); |
|
|
|
|
this.getData(); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
handleSelectionActivationChange (val) { // 多选 |
|
|
|
@ -481,7 +497,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
handleCurrentActivationChange (val) { // 切换分页 |
|
|
|
|
this.pageActivation = val; |
|
|
|
|
this.handlePage(); |
|
|
|
|
this.getData(); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 导出(有勾选:就导勾选中的;没有勾选:就导全部) |
|
|
|
@ -515,7 +531,6 @@ export default { |
|
|
|
|
list.map(n => { |
|
|
|
|
yData[n.score]++ |
|
|
|
|
}) |
|
|
|
|
console.log(333, xData, yData) |
|
|
|
|
let myChart = echarts.init(document.getElementById("chart")); |
|
|
|
|
myChart.setOption({ |
|
|
|
|
title: { text: "实验分数分布图" }, |
|
|
|
|