This commit is contained in:
parent
ea441d3126
commit
4a1c11dd5e
|
@ -101,6 +101,9 @@ export default {
|
||||||
title: {
|
title: {
|
||||||
text: "本批次学院通过率排名",
|
text: "本批次学院通过率排名",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis',
|
trigger: 'axis',
|
||||||
axisPointer: {
|
axisPointer: {
|
||||||
|
|
|
@ -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,//每两行合并一次grade列的单元格,rowSpan为跨度
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue