From 54d11f9a2f395e021486e6a31912616274b3feda Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期一, 08 九月 2025 11:55:10 +0800 Subject: [PATCH] 车间智慧看板页面新增定时刷新功能 --- src/views/mdc/base/modules/WorkshopSignage/ClassUtilizationRateChart.vue | 74 ++++++++----------------------------- 1 files changed, 16 insertions(+), 58 deletions(-) diff --git a/src/views/mdc/base/modules/WorkshopSignage/ClassUtilizationRateChart.vue b/src/views/mdc/base/modules/WorkshopSignage/ClassUtilizationRateChart.vue index 074608e..b91b5a7 100644 --- a/src/views/mdc/base/modules/WorkshopSignage/ClassUtilizationRateChart.vue +++ b/src/views/mdc/base/modules/WorkshopSignage/ClassUtilizationRateChart.vue @@ -1,7 +1,5 @@ <template> - <div id="class-utilizationRate"> - - </div> + <div id="class-utilizationRate"></div> </template> <script> @@ -12,8 +10,8 @@ components: {}, props: { dataSource: { - type: Array, - }, + type: Array + } }, watch: { dataSource: { @@ -35,7 +33,8 @@ this.chartContainer = this.$echarts.init(document.getElementById('class-utilizationRate')) const option = { tooltip: { - fontSize: this.fontSize(0.12) + trigger: 'axis', + fontSize: this.fontSize(0.16) }, xAxis: [ { @@ -55,7 +54,6 @@ axisLine: { lineStyle: { color: '#eee' - // width:fontSize(0.02) } } } @@ -63,7 +61,6 @@ yAxis: [ { type: 'value', - // name:'涓婂懆寮�鏈虹巼', axisTick: { show: true }, @@ -102,7 +99,6 @@ legend: { pageTextStyle: { color: '#eee', - // fontSize:'100%' fontSize: this.fontSize(0.12) }, top: '2%', @@ -133,60 +129,22 @@ } }, symbolSize: this.fontSize(0.16), - // data: [38, 30, 44, 65, 23, 42], data: this.dataSource, itemStyle: { - normal: { - // barBorderRadius:[20,20,0,0], - color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{ - offset: 0, - color: '#96ceff' + color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{ + offset: 0, + color: '#96ceff' + }, + { + offset: 0.6, + color: '#67c2ff' }, - { - offset: 0.6, - color: '#67c2ff' - }, - { - offset: 1, - color: '#1195ff' - }], false) - } + { + offset: 1, + color: '#1195ff' + }], false) } } - // { - // name: '浜т笟鍥巶鍖�', - // type: 'bar', - // axisLabel: { - // show: true, - // interval: 'auto', - // formatter: '{value}%', - // textStyle: { - // color: '#eee', - // fontSize: this.fontSize(0.16), - // fontWeight: 'bold' - // } - // }, - // symbolSize: this.fontSize(0.16), - // // data: [52, 44, 65, 59, 43, 21], - // data: this.dataSource, - // itemStyle: { - // normal: { - // // barBorderRadius:[20,20,0,0], - // color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{ - // offset: 0, - // color: '#ffe9cc' - // }, - // { - // offset: 0.6, - // color: '#ffd46b' - // }, - // { - // offset: 1, - // color: '#ffb530' - // }], false) - // } - // } - // } ] } this.chartContainer.setOption(option, true) -- Gitblit v1.9.3