首页优化

This commit is contained in:
xbx 2024-04-20 20:57:10 +08:00
parent 59d3f54666
commit b85755ed33
2 changed files with 52 additions and 59 deletions

View File

@ -64,7 +64,7 @@
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :xl="24" :style="{ marginBottom: '24px' }"> <a-col :xl="24" :style="{ marginBottom: '24px' }">
<div class="container"> <div class="container">
<div id="map1" style="width: 100%; height: 400px;"></div> <div id="map1" style="width: 100%; height: 600px;"></div>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
@ -196,10 +196,12 @@ export default {
seriesData.push({ seriesData.push({
name: i + '级累计总通过率', name: i + '级累计总通过率',
type: 'bar', type: 'bar',
// barWidth: '30%', //
barWidth: "10%",
data: yData, data: yData,
//
barGap: '30%',
// //
itemStyle: { itemStyle: {
normal: { normal: {
label: { label: {
@ -208,7 +210,7 @@ export default {
formatter: '{c}%', formatter: '{c}%',
textStyle: { // textStyle: { //
color: 'black', color: 'black',
fontSize: 13 fontSize: 10
}, },
}, },
color: colors[j++] color: colors[j++]
@ -253,9 +255,6 @@ export default {
title: { title: {
text: "本批次学院通过率排名", text: "本批次学院通过率排名",
}, },
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
axisPointer: { axisPointer: {
@ -290,7 +289,7 @@ export default {
left: '3%', left: '3%',
right: '4%', right: '4%',
bottom: '3%', bottom: '3%',
containLabel: true containLabel: true,
}, },
xAxis: [ xAxis: [
{ {
@ -323,7 +322,9 @@ export default {
name: '累计总通过率', name: '累计总通过率',
type: 'bar', type: 'bar',
data: seriesData[0].data, data: seriesData[0].data,
barWidth: '60%', //
barWidth: 20,
// barWidth: '60%',
itemStyle: { itemStyle: {
normal: { normal: {
label: { label: {

View File

@ -14,14 +14,14 @@
<a-table :dataSource="dataSourceCet4" :columns="columns" :pagination='false' bordered> <a-table :dataSource="dataSourceCet4" :columns="columns" :pagination='false' bordered>
<template v-slot:passRateSlot> <template v-slot:passRateSlot>
累计总通过率 累计总通过率
<a-tooltip title="累计通过人数 / (学院 / 专业总人数)" placement="top"> <a-tooltip :title="'累计通过人数 / ' + this.totalName + '总人数'" placement="top">
<a-icon type="question-circle" /> <a-icon type="question-circle" />
</a-tooltip> </a-tooltip>
</template> </template>
</a-table> </a-table>
<div style="display: flex; justify-content: space-between; font-size: 15px; margin-top: 10px;" <div style="display: flex; justify-content: space-between; font-size: 15px; margin-top: 10px;"
v-if="total && total > 0"> v-if="total && total > 0">
<span>学院 / 专业总人数: {{ total }}</span> <span>{{ this.totalName }}总人数{{ total }}</span>
<span>累计通过人数: {{ passNumberBottom }}</span> <span>累计通过人数: {{ passNumberBottom }}</span>
<span>累计总通过率: {{ passRateBottom }}</span> <span>累计总通过率: {{ passRateBottom }}</span>
</div> </div>
@ -52,7 +52,7 @@ export default {
dataSourceCet4: [], dataSourceCet4: [],
columns: [ columns: [
{ {
title: '', title: '年',
dataIndex: 'grade', dataIndex: 'grade',
key: 'grade', key: 'grade',
align: 'center', align: 'center',
@ -73,7 +73,7 @@ export default {
align: 'center', align: 'center',
}, },
{ {
title: '通过人数', title: '通过人数',
dataIndex: 'passNumber', dataIndex: 'passNumber',
key: 'passNumber', key: 'passNumber',
align: 'center', align: 'center',
@ -101,6 +101,7 @@ export default {
getCollegeMajor: '/cet/getCollegeMajor' getCollegeMajor: '/cet/getCollegeMajor'
}, },
total: 0, total: 0,
totalName: '',
passNumberBottom: 0, passNumberBottom: 0,
passRateBottom: 0, passRateBottom: 0,
passRatePie: [], passRatePie: [],
@ -187,6 +188,7 @@ 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.totalName = result.totalName;//
this.passNumberBottom = result.passNumber;// this.passNumberBottom = result.passNumber;//
this.passRateBottom = (result.passRate * 100).toFixed(1) + '%';// this.passRateBottom = (result.passRate * 100).toFixed(1) + '%';//
// //
@ -232,54 +234,42 @@ export default {
top: '5%', top: '5%',
left: 'center' left: 'center'
}, },
color: ['#ff2d51', '#ff4777', '#f47983', '#ffb3a7', '#91cc75'],
series: [ series: [
// //
{ // {
name: '四级通过率', // name: '',
type: 'pie', // type: 'pie',
radius: ['0', '30%'], // radius: ['0', '30%'],
avoidLabelOverlap: false, // avoidLabelOverlap: false,
itemStyle: { // itemStyle: {
borderRadius: 3, // borderRadius: 3,
borderColor: '#fff', // borderColor: '#fff',
borderWidth: 2, // borderWidth: 2,
normal: { // },
color: function (colors) { // label: {
var colorList = ['#00CD66', '#FF6A6A']; // position: 'inner',
return colorList[colors.dataIndex]; // fontSize: 14
} // },
}, // emphasis: {
}, // label: {
label: { // show: true,
position: 'inner', // fontSize: 20,
fontSize: 14 // fontWeight: 'bold'
}, // }
emphasis: { // },
label: { // data: this.passRatePie
show: true, // },
fontSize: 20,
fontWeight: 'bold'
}
},
data: this.passRatePie
},
// //
{ {
name: '四级通过率', name: '四级通过率',
type: 'pie', type: 'pie',
radius: ['40%', '60%'], radius: ['35%', '60%'],
avoidLabelOverlap: false,
itemStyle: { itemStyle: {
borderRadius: 10, borderRadius: 10,
borderColor: '#fff', borderColor: '#fff',
borderWidth: 2, borderWidth: 2,
normal: {
color: function (colors) {
var colorList = ['#008B45', '#00CD66', '#00EE76', '#baf5bf', '#FF6A6A'];
return colorList[colors.dataIndex];
}
},
}, },
label: { label: {
show: true, show: true,
@ -287,15 +277,17 @@ export default {
overflow: 'truncate' overflow: 'truncate'
}, },
emphasis: { emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
},
label: { label: {
show: true, show: true,
fontSize: 20, fontSize: 15,
fontWeight: 'bold' fontWeight: 'bold'
} }
}, },
// labelLine: {
// show: false
// },
data: piedata data: piedata
} }
] ]