This commit is contained in:
xbx 2024-04-17 21:44:36 +08:00
parent ea441d3126
commit 4a1c11dd5e
2 changed files with 10 additions and 9 deletions

View File

@ -101,6 +101,9 @@ export default {
title: { title: {
text: "本批次学院通过率排名", text: "本批次学院通过率排名",
}, },
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
axisPointer: { axisPointer: {

View File

@ -57,7 +57,7 @@ export default {
key: 'grade', key: 'grade',
align: 'center', align: 'center',
customCell: (_, index) => ({ customCell: (_, index) => ({
rowSpan: index % 2 === 0 ? 2 : 0, rowSpan: index % 2 === 0 ? 2 : 0,//graderowSpan
}), }),
}, },
{ {
@ -170,7 +170,6 @@ export default {
result.cet4[grade].forEach(item => { result.cet4[grade].forEach(item => {
if (index % 2 == 0) { if (index % 2 == 0) {
piedata.push({ value: parseFloat(item.gradepassrate - passrate).toFixed(3), name: grade + "时通过" }); piedata.push({ value: parseFloat(item.gradepassrate - passrate).toFixed(3), name: grade + "时通过" });
passrate = parseFloat(item.gradepassrate).toFixed(3); passrate = parseFloat(item.gradepassrate).toFixed(3);
} }
index++ index++
@ -186,16 +185,15 @@ export default {
} }
console.log("tableData", tableData); console.log("tableData", tableData);
this.dataSourceCet4 = tableData; this.dataSourceCet4 = tableData;//
this.total = result.total; this.total = result.total;//
this.passNumberBottom = result.passNumber; this.passNumberBottom = result.passNumber;//
this.passRateBottom = (result.passRate * 100).toFixed(1) + '%'; this.passRateBottom = (result.passRate * 100).toFixed(1) + '%';//
// //
// this.passRatePie =[]//
this.passRatePie =[]
this.passRatePie.push({ value: result.passRate, name: '已通过' }); this.passRatePie.push({ value: result.passRate, name: '已通过' });
this.passRatePie.push({ value: 1 - result.passRate, name: '未通过' }) this.passRatePie.push({ value: 1 - result.passRate, name: '未通过' })
piedata.push({ value: (1 - passrate).toFixed(3), name: '未通过' }); piedata.push({ value: (1 - passrate).toFixed(3), name: '未通过' });//
setTimeout(() => { setTimeout(() => {
this.drawPieChart(piedata); this.drawPieChart(piedata);
}, 100); }, 100);