|
|
@ -3,7 +3,7 @@ |
|
|
|
<el-card shadow="hover" |
|
|
|
<el-card shadow="hover" |
|
|
|
class="m-b-20 head-card"> |
|
|
|
class="m-b-20 head-card"> |
|
|
|
<div class="flex-between m-b-20"> |
|
|
|
<div class="flex-between m-b-20"> |
|
|
|
<el-page-header @back="$router.back()" |
|
|
|
<el-page-header @back="$router.push('list?tab=tab1')" |
|
|
|
:content="goodsName"></el-page-header> |
|
|
|
:content="goodsName"></el-page-header> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
@ -114,7 +114,7 @@ |
|
|
|
<el-table-column label="累计练习时长" |
|
|
|
<el-table-column label="累计练习时长" |
|
|
|
align="center"> |
|
|
|
align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ scope.row.timeSum }}min |
|
|
|
{{ scope.row.cumulativePracticeTime }}min |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
</template> |
|
|
|
</template> |
|
|
@ -520,18 +520,17 @@ export default { |
|
|
|
this.$router.push(this.curTab == 1 ? `show?reportId=${row.reportId}` : `project?id=${row.projectId}&projectName=${row.goodsName}&classId=${this.curRow.classId || ''}&workNumber=${row.workNumber || row.userName}`) |
|
|
|
this.$router.push(this.curTab == 1 ? `show?reportId=${row.reportId}` : `project?id=${row.projectId}&projectName=${row.goodsName}&classId=${this.curRow.classId || ''}&workNumber=${row.workNumber || row.userName}`) |
|
|
|
}, |
|
|
|
}, |
|
|
|
getChart () { // 初始化折线图 |
|
|
|
getChart () { // 初始化折线图 |
|
|
|
const xData = Array.from({ length: 101 }, (v, k) => k) |
|
|
|
const data = {} |
|
|
|
const yData = Array.from({ length: 101 }, (v, k) => 0) |
|
|
|
|
|
|
|
const list = this.listDataAll |
|
|
|
const list = this.listDataAll |
|
|
|
const prop = this.curTab == 0 ? 'avgScore' : 'averageScore' |
|
|
|
const prop = this.curTab == 0 ? 'avgScore' : 'averageScore' |
|
|
|
list.map(n => { |
|
|
|
list.map(n => { |
|
|
|
yData[n[prop]]++ |
|
|
|
if (!data[n[prop]]) { |
|
|
|
|
|
|
|
data[n[prop]] = 1 |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
data[n[prop]]++ |
|
|
|
|
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
return console.log(333, xData, yData) |
|
|
|
console.log(333, data, Object.keys(data), Object.values(data)) |
|
|
|
const nums = this.stageNumber |
|
|
|
|
|
|
|
for (const i in this.stageNumber) { |
|
|
|
|
|
|
|
data.push(nums[i]) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
let myChart = echarts.init(document.getElementById("chart")); |
|
|
|
let myChart = echarts.init(document.getElementById("chart")); |
|
|
|
myChart.setOption({ |
|
|
|
myChart.setOption({ |
|
|
|
title: { text: "实验分数分布图" }, |
|
|
|
title: { text: "实验分数分布图" }, |
|
|
@ -540,16 +539,22 @@ export default { |
|
|
|
name: "分数", |
|
|
|
name: "分数", |
|
|
|
type: "category", |
|
|
|
type: "category", |
|
|
|
boundaryGap: false, |
|
|
|
boundaryGap: false, |
|
|
|
interval: 10, |
|
|
|
interval: 5, |
|
|
|
data: ["0", "10", "20", "30", "40", "50", "60", "70", "80", "90", '100'] |
|
|
|
axisLabel: { |
|
|
|
|
|
|
|
interval: 9, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
data: Object.keys(data) |
|
|
|
}, |
|
|
|
}, |
|
|
|
yAxis: { |
|
|
|
yAxis: { |
|
|
|
name: this.permissions ? "人数" : '成绩报告数量', |
|
|
|
name: this.curTab == 1 ? "人数" : '成绩报告数量', |
|
|
|
type: "value", |
|
|
|
type: "value", |
|
|
|
interval: 1 |
|
|
|
interval: 10, |
|
|
|
|
|
|
|
axisLabel: { |
|
|
|
|
|
|
|
interval: 9, |
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
series: [{ |
|
|
|
series: [{ |
|
|
|
data, |
|
|
|
data: Object.values(data), |
|
|
|
type: "line", |
|
|
|
type: "line", |
|
|
|
areaStyle: {}, |
|
|
|
areaStyle: {}, |
|
|
|
color: ["#8191fd"] |
|
|
|
color: ["#8191fd"] |
|
|
|