feature/1.0版本页面优化 #1
File diff suppressed because it is too large
Load Diff
|
@ -113,6 +113,8 @@
|
||||||
passNumberBottom: 0,
|
passNumberBottom: 0,
|
||||||
passRateBottom: 0,
|
passRateBottom: 0,
|
||||||
passRatePie: [],
|
passRatePie: [],
|
||||||
|
lineXData: [],
|
||||||
|
lineYData: [],
|
||||||
collegeOptions: [],
|
collegeOptions: [],
|
||||||
collegeMajorOptions: [],
|
collegeMajorOptions: [],
|
||||||
entrydateOptions: [],
|
entrydateOptions: [],
|
||||||
|
@ -129,7 +131,7 @@
|
||||||
this.getEntrydateAndCollegeData();
|
this.getEntrydateAndCollegeData();
|
||||||
this.getCollegeMajorData();
|
this.getCollegeMajorData();
|
||||||
this.query();
|
this.query();
|
||||||
this.map2Chart();
|
//this.map2Chart();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 获取年级和学院数据
|
// 获取年级和学院数据
|
||||||
|
@ -201,8 +203,12 @@
|
||||||
passRate['大四学年'] = result.cet4['大四学年'];
|
passRate['大四学年'] = result.cet4['大四学年'];
|
||||||
}
|
}
|
||||||
result.cet4 = passRate;
|
result.cet4 = passRate;
|
||||||
|
this.lineXData = [];
|
||||||
|
this.lineYData = [];
|
||||||
for (let grade in result.cet4) {
|
for (let grade in result.cet4) {
|
||||||
result.cet4[grade].forEach((item) => {
|
result.cet4[grade].forEach((item) => {
|
||||||
|
this.lineXData.push(item.batch);
|
||||||
|
this.lineYData.push((item.batchpassrate * 100).toFixed(1));
|
||||||
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);
|
||||||
|
@ -232,6 +238,7 @@
|
||||||
piedata.push({ value: (1 - passrate).toFixed(3), name: '未通过' }); //外置饼图
|
piedata.push({ value: (1 - passrate).toFixed(3), name: '未通过' }); //外置饼图
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.drawPieChart(piedata);
|
this.drawPieChart(piedata);
|
||||||
|
this.map2Chart();
|
||||||
}, 100);
|
}, 100);
|
||||||
// this.drawPieChart();
|
// this.drawPieChart();
|
||||||
} finally {
|
} finally {
|
||||||
|
@ -253,7 +260,26 @@
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
tooltip: {
|
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;">' +
|
||||||
|
' ' +
|
||||||
|
params[0].value +
|
||||||
|
'%' +
|
||||||
|
'</td></tr>' +
|
||||||
|
'<tr>' +
|
||||||
|
'</table>'
|
||||||
|
);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
top: '50px',
|
top: '50px',
|
||||||
|
@ -263,15 +289,29 @@
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: ['2017-12-01', '2017-12-01', '2017-12-01', '2017-12-01', '2017-12-01'],
|
data: this.lineXData,
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
type: 'value',
|
type: 'value',
|
||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
data: [150, 230, 224, 218, 135],
|
data: this.lineYData,
|
||||||
type: 'line',
|
type: 'line',
|
||||||
|
itemStyle: {
|
||||||
|
normal: {
|
||||||
|
label: {
|
||||||
|
show: true, //开启显示
|
||||||
|
position: 'top', //在上方显示
|
||||||
|
textStyle: {
|
||||||
|
//数值样式
|
||||||
|
color: 'black',
|
||||||
|
fontSize: 12,
|
||||||
|
},
|
||||||
|
formatter: '{c}%',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue