首页优化

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

View File

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