|
|
|
@ -326,7 +326,7 @@ export default { |
|
|
|
|
pageSizeDetail: 5, |
|
|
|
|
totalDetail: 0, |
|
|
|
|
curRow: {}, |
|
|
|
|
stageNumber: [], |
|
|
|
|
stageNumber: {}, |
|
|
|
|
loadIns: null |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
@ -351,20 +351,21 @@ export default { |
|
|
|
|
const per = +this.curTab |
|
|
|
|
const res = await this.$post(this.api.productReadScore, { |
|
|
|
|
pageNum: this.page, |
|
|
|
|
pageSize: 10000, |
|
|
|
|
pageSize: this.pageSize, |
|
|
|
|
keyWord: this.keyword, |
|
|
|
|
mallId: this.id, |
|
|
|
|
cid: this.cid, |
|
|
|
|
permissions: per, |
|
|
|
|
classId: this.classId |
|
|
|
|
}) |
|
|
|
|
this.listDataAll = per ? res.listOfAssessmentResults.records : res.userScoreList.records |
|
|
|
|
this.listData = per ? res.listOfAssessmentResults.records : res.userScoreList.records |
|
|
|
|
this.total = per ? res.listOfAssessmentResults.total : res.userScoreList.total |
|
|
|
|
const stat = res.experimentalStatistics |
|
|
|
|
this.avgScore = stat.averageScore |
|
|
|
|
this.peopleNum = stat.experimentalPopulation |
|
|
|
|
this.maxScore = stat.maxScore |
|
|
|
|
this.minScore = stat.minScore |
|
|
|
|
this.stageNumber = res.stageNumber |
|
|
|
|
const err = (per ? res.testErrorRateUnderProduct : res.projectErrorRateAnalysisUnderProduct) || [] |
|
|
|
|
err.forEach(e => { |
|
|
|
|
e.errorRate = (+e.errorRate).toFixed(2) |
|
|
|
@ -379,7 +380,6 @@ export default { |
|
|
|
|
this.show(row) |
|
|
|
|
this.$store.commit('achievement/setRow', null) |
|
|
|
|
}) |
|
|
|
|
this.handlePage() |
|
|
|
|
this.getChart() |
|
|
|
|
}, |
|
|
|
|
initData () { |
|
|
|
@ -405,11 +405,6 @@ export default { |
|
|
|
|
}) |
|
|
|
|
this.initData() |
|
|
|
|
}, |
|
|
|
|
// 分页 |
|
|
|
|
handlePage () { |
|
|
|
|
const list = this.listDataAll |
|
|
|
|
this.listData = list.slice((this.page - 1) * this.pageSize, this.page * this.pageSize) |
|
|
|
|
}, |
|
|
|
|
// 练习考核切换 |
|
|
|
|
tabChange () { |
|
|
|
|
this.$router.push({ |
|
|
|
@ -509,7 +504,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
handleCurrentChange (val) { // 切换分页 |
|
|
|
|
this.page = val |
|
|
|
|
this.handlePage() |
|
|
|
|
this.getData(); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 打开成绩详情 |
|
|
|
@ -566,36 +561,10 @@ export default { |
|
|
|
|
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}`) |
|
|
|
|
}, |
|
|
|
|
getChart () { // 初始化折线图 |
|
|
|
|
const data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] |
|
|
|
|
const list = this.listDataAll |
|
|
|
|
const prop = this.curTab == 0 ? 'avgScore' : 'averageScore' |
|
|
|
|
list.map(n => { |
|
|
|
|
const val = n[prop] |
|
|
|
|
if (val === 0) { |
|
|
|
|
data[0]++; |
|
|
|
|
} else if (val > 0 && val <= 10) { |
|
|
|
|
data[1]++; |
|
|
|
|
} else if (val > 10 && val <= 20) { |
|
|
|
|
data[2]++; |
|
|
|
|
} else if (val > 20 && val <= 30) { |
|
|
|
|
data[3]++; |
|
|
|
|
} else if (val > 30 && val <= 40) { |
|
|
|
|
data[4]++; |
|
|
|
|
} else if (val > 40 && val <= 50) { |
|
|
|
|
data[5]++; |
|
|
|
|
} else if (val > 50 && val <= 60) { |
|
|
|
|
data[6]++; |
|
|
|
|
} else if (val > 60 && val <= 70) { |
|
|
|
|
data[7]++; |
|
|
|
|
} else if (val > 70 && val <= 80) { |
|
|
|
|
data[8]++; |
|
|
|
|
} else if (val > 80 && val <= 90) { |
|
|
|
|
data[9]++; |
|
|
|
|
} else if (val > 90 && val <= 100) { |
|
|
|
|
data[10]++; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
const data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] |
|
|
|
|
for (const i in this.stageNumber) { |
|
|
|
|
data[+(i.replace('num', '')) - 1] = this.stageNumber[i] |
|
|
|
|
} |
|
|
|
|
let myChart = echarts.init(document.getElementById("chart")); |
|
|
|
|
myChart.setOption({ |
|
|
|
|
title: { text: "实验分数分布图" }, |
|
|
|
@ -605,12 +574,13 @@ export default { |
|
|
|
|
type: "category", |
|
|
|
|
boundaryGap: false, |
|
|
|
|
interval: 10, |
|
|
|
|
data: ["0", "10", "20", "30", "40", "50", "60", "70", "80", "90", '100'] |
|
|
|
|
data: ["0-10", "11-20", "21-30", "31-40", "41-50", "51-60", "61-70", "71-80", "81-90", "91-100"] |
|
|
|
|
}, |
|
|
|
|
yAxis: { |
|
|
|
|
name: "人数", |
|
|
|
|
type: "value", |
|
|
|
|
interval: 1 |
|
|
|
|
interval: 5, |
|
|
|
|
minInterval: 5, |
|
|
|
|
}, |
|
|
|
|
series: [{ |
|
|
|
|
data, |
|
|
|
|