提交一部分丰都大屏

This commit is contained in:
aixianling
2023-10-13 18:10:45 +08:00
parent ab92982e71
commit 3ade163fbd
8 changed files with 175 additions and 14 deletions

View File

@@ -56,7 +56,7 @@ export default {
colors = this.theme === '1' ? this.colors : (options.color || this.colors),
legend = {textStyle: {color: '#fff', padding: [0, 0, 0, 8], fontSize: 14}},
series = data?.[0] ? Array(Object.keys(data?.[0]).length - 1).fill(1)
.map((e, i) => ({type, ...(typeof style == 'object' ? style : style(colors[i]))})) : []
.map((e, i) => ({type, ...(typeof style == 'object' ? style : style(colors[i]))})) : []
let ops = {
tooltip: {},
xAxis: {
@@ -141,8 +141,9 @@ export default {
watchResize() {
this.timer && clearInterval(this.timer)
this.timer = setInterval(() => {
if (this.chart?.getHeight() != this.$refs.AiEchart?.clientHeight ||
this.chart?.getWidth() != this.$refs.AiEchart?.clientWidth) {
const {clientHeight, clientWidth} = this.$refs.AiEchart || {},
h = this.chart?.getHeight(), w = this.chart?.getWidth()
if (h != clientHeight || w != clientWidth) {
this.chart?.resize()
}
}, 1000)