From eb755f7e6f540f98b766ebc09d2e7a82d4ab06fe Mon Sep 17 00:00:00 2001 From: kerwincui <164770707@qq.com> Date: Sat, 21 May 2022 10:45:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E8=A1=A8=E6=A0=B7=E5=BC=8F=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vue/src/views/iot/device/device-statistic.vue | 25 ++++++++++--------- vue/src/views/iot/device/index.vue | 10 +++++++- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/vue/src/views/iot/device/device-statistic.vue b/vue/src/views/iot/device/device-statistic.vue index c079c046..0473911d 100644 --- a/vue/src/views/iot/device/device-statistic.vue +++ b/vue/src/views/iot/device/device-statistic.vue @@ -12,9 +12,9 @@ -
+
-
+
@@ -120,6 +120,7 @@ export default { }, /**监测统计数据 */ getStatistic() { + let color = ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc']; for (let i = 0; i < this.monitorThings.length; i++) { this.chart[i] = echarts.init(this.$refs.statisticMap[i]); var option; @@ -184,18 +185,18 @@ export default { symbol: 'none', sampling: 'lttb', itemStyle: { - color: 'rgb(64, 158, 255)' + color: i>9? color[0]:color[i] }, areaStyle: { - color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ - offset: 0, - color: 'rgb(64, 158, 255)' - }, - { - offset: 1, - color: 'rgb(255, 255, 255)' - } - ]) + // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ + // offset: 0, + // color: 'rgb(64, 158, 255)' + // }, + // { + // offset: 1, + // color: 'rgb(255, 255, 255)' + // } + // ]) }, data: [] }] diff --git a/vue/src/views/iot/device/index.vue b/vue/src/views/iot/device/index.vue index 7cae7d20..cc59bbda 100644 --- a/vue/src/views/iot/device/index.vue +++ b/vue/src/views/iot/device/index.vue @@ -538,6 +538,7 @@ export default { }, /**监测数据 */ getMonitorChart() { + let color = ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc']; for (let i = 0; i < this.monitorThings.length; i++) { this.chart[i] = echarts.init(this.$refs.monitor[i]); var option; @@ -579,7 +580,14 @@ export default { series: [{ name: this.monitorThings[i].name, type: 'line', - showSymbol: false, + symbol: 'none', + sampling: 'lttb', + itemStyle: { + color: i>9? color[0]:color[i] + }, + areaStyle: { + + }, data: [] }] };