This commit is contained in:
lb
2022-11-18 14:50:57 +08:00
parent f09c048cf0
commit 9b8f796100
8 changed files with 84 additions and 67 deletions

View File

@@ -200,13 +200,13 @@ export default {
}
.visual-base-table-container >>> .el-table tbody tr:nth-child(odd) {
background-color: #0e203e;
/* background-color: #0e203e90; */
/* background-color: #0e203e; */
background-color: #0e203ecc;
}
.visual-base-table-container >>> .el-table tbody tr:nth-child(even),
.visual-base-table-container >>> .el-table thead {
background-color: #203760;
/* background-color: #20376090; */
/* background-color: #203760; */
background-color: #213961cc;
}
</style>

View File

@@ -108,6 +108,7 @@ export default {
configs: {
title: {
textAlign: 'center',
textVerticalAlign: 'middle',
left: '69%',
top: '46%',
text: '',
@@ -120,8 +121,7 @@ export default {
subtext: '总数/片',
subtextStyle: {
color: '#fff',
fontSize: 12,
fontWeight: 'lighter'
fontSize: 12
}
},
legend: {
@@ -300,13 +300,15 @@ export default {
const fs5 = this.calcFontsize(5 /** px*/)
const fs8 = this.calcFontsize(8 /** px*/)
const fs10 = this.calcFontsize(10 /** px*/)
const fs14 = this.calcFontsize(14 /** px*/)
const fs12 = this.calcFontsize(12 /** px*/)
const fs13 = this.calcFontsize(13 /** px*/)
const fs18 = this.calcFontsize(18 /** px*/)
const fs20 = this.calcFontsize(20 /** px*/)
const legendTopRate = this.calcFontsize(30 /** % */)
this.configs.title.text = this.dataList.reduce((prev, curr) => prev + curr.value * 1000, 0)
this.configs.title.textStyle.fontSize = fs18
this.configs.title.subtextStyle.fontSize = fs14
this.configs.title.textStyle.fontSize = fs20
this.configs.title.subtextStyle.fontSize = fs13
this.configs.legend.top = legendTopRate + '%'
this.configs.legend.left = 0 + '%'
@@ -336,12 +338,12 @@ export default {
this.configs.legend.textStyle.rich.h.height = fs10
this.configs.legend.textStyle.rich.h.borderRadius = fs5
this.configs.series[0].label.rich.first.fontSize = fs10
this.configs.series[0].label.rich.second.fontSize = fs10
this.configs.series[0].label.rich.third.fontSize = fs10
this.configs.series[0].label.rich.fourth.fontSize = fs10
this.configs.series[0].label.rich.fifth.fontSize = fs10
this.configs.series[0].label.rich.sixth.fontSize = fs10
this.configs.series[0].label.rich.first.fontSize = fs12
this.configs.series[0].label.rich.second.fontSize = fs12
this.configs.series[0].label.rich.third.fontSize = fs12
this.configs.series[0].label.rich.fourth.fontSize = fs12
this.configs.series[0].label.rich.fifth.fontSize = fs12
this.configs.series[0].label.rich.sixth.fontSize = fs12
if (datalist) this.configs.series[0].data = datalist
this.chart.setOption(this.configs)
}

View File

@@ -1,5 +1,5 @@
<template>
<div ref="chartContainer" class="chartContainer" style="position: relative; width: 100%; height: calc(100% - 36px)" />
<div ref="chartContainer" class="chartContainer" style="position: relative; width: 100%; height: 100%;" />
</template>
<script>
@@ -31,10 +31,10 @@ export default {
}
},
grid: {
top: '18%',
top: '25%',
left: '2%',
right: '2%',
bottom: '2%',
right: '5%',
bottom: '5%',
containLabel: true
},
xAxis: [
@@ -51,7 +51,7 @@ export default {
textStyle: {
color: 'rgba(255,255,255,1)' //
},
margin: 20
margin: 12
},
data: ['A', 'B', 'C', 'D', 'E', 'F', 'G']
}
@@ -60,9 +60,10 @@ export default {
{
name: '成品率',
type: 'value',
min: 'dataMin',
nameTextStyle: {
color: 'rgba(255,255,255,0.7)',
fontSize: 10,
fontSize: 12,
align: 'right'
},
axisLine: {
@@ -120,6 +121,9 @@ export default {
},
data: [11, 199, 140, 63, 185, 5, 78].map(_ => {
let v = Math.floor(Math.random() * 100)
while (v < 80) {
v = Math.floor(Math.random() * 100)
}
return v
})
},
@@ -154,6 +158,9 @@ export default {
},
data: [151, 57, 31, 7, 77, 88, 119].map(_ => {
let v = Math.floor(Math.random() * 100)
while (v < 80) {
v = Math.floor(Math.random() * 100)
}
return v
})
},
@@ -188,6 +195,9 @@ export default {
},
data: [58, 3, 67, 100, 42, 96, 124].map(_ => {
let v = Math.floor(Math.random() * 100)
while (v < 80) {
v = Math.floor(Math.random() * 100)
}
return v
})
},
@@ -222,6 +232,9 @@ export default {
},
data: [92, 88, 122, 169, 108, 130, 147].map(_ => {
let v = Math.floor(Math.random() * 100)
while (v < 80) {
v = Math.floor(Math.random() * 100)
}
return v
})
},
@@ -260,6 +273,9 @@ export default {
},
data: [44, 40, 118, 197, 123, 95, 96].map(_ => {
let v = Math.floor(Math.random() * 100)
while (v < 80) {
v = Math.floor(Math.random() * 100)
}
return v
})
}