首页与按专业维度分析

This commit is contained in:
Xubx 2024-10-17 14:08:39 +08:00
parent 80a240675d
commit ccd3305924
2 changed files with 714 additions and 826 deletions

File diff suppressed because it is too large Load Diff

View File

@ -113,6 +113,8 @@
passNumberBottom: 0,
passRateBottom: 0,
passRatePie: [],
lineXData: [],
lineYData: [],
collegeOptions: [],
collegeMajorOptions: [],
entrydateOptions: [],
@ -129,7 +131,7 @@
this.getEntrydateAndCollegeData();
this.getCollegeMajorData();
this.query();
this.map2Chart();
//this.map2Chart();
},
methods: {
//
@ -201,8 +203,12 @@
passRate['大四学年'] = result.cet4['大四学年'];
}
result.cet4 = passRate;
this.lineXData = [];
this.lineYData = [];
for (let grade in result.cet4) {
result.cet4[grade].forEach((item) => {
this.lineXData.push(item.batch);
this.lineYData.push((item.batchpassrate * 100).toFixed(1));
if (index % 2 == 0) {
piedata.push({ value: parseFloat(item.gradepassrate - passrate).toFixed(3), name: grade + '时通过' });
passrate = parseFloat(item.gradepassrate).toFixed(3);
@ -232,6 +238,7 @@
piedata.push({ value: (1 - passrate).toFixed(3), name: '未通过' }); //
setTimeout(() => {
this.drawPieChart(piedata);
this.map2Chart();
}, 100);
// this.drawPieChart();
} finally {
@ -253,7 +260,26 @@
},
},
tooltip: {
trigger: 'item',
trigger: 'axis',
axisPointer: {
type: 'shadow',
},
formatter: function (params) {
return (
params[0].name +
'<br/>' +
'<table>' +
'<tr><td>' +
params[0].marker +
'</td><td style="font-weight: bold;">' +
'&nbsp;&nbsp;&nbsp;&nbsp;' +
params[0].value +
'%' +
'</td></tr>' +
'<tr>' +
'</table>'
);
},
},
grid: {
top: '50px',
@ -263,15 +289,29 @@
},
xAxis: {
type: 'category',
data: ['2017-12-01', '2017-12-01', '2017-12-01', '2017-12-01', '2017-12-01'],
data: this.lineXData,
},
yAxis: {
type: 'value',
},
series: [
{
data: [150, 230, 224, 218, 135],
data: this.lineYData,
type: 'line',
itemStyle: {
normal: {
label: {
show: true, //
position: 'top', //
textStyle: {
//
color: 'black',
fontSize: 12,
},
formatter: '{c}%',
},
},
},
},
],
};