From 1fe43e1d70951dd27345b5c5437f9b21e1d01725 Mon Sep 17 00:00:00 2001 From: GGJ <357021191@qq.com> Date: Fri, 5 Jan 2024 16:32:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/echarts/MyEchart.vue | 14 +- src/layouts/admin/index.vue | 452 +++++++++--------- .../Region}/components/Tableabove.vue | 0 .../Region/components/TypeStatistics.vue | 144 ++++++ .../Region}/components/echart.vue | 4 - src/views/Event-boot/Region/overview.vue | 72 +++ src/views/Event-boot/Region/statistics.vue | 76 +++ 7 files changed, 533 insertions(+), 229 deletions(-) rename src/views/{dashboard => Event-boot/Region}/components/Tableabove.vue (100%) create mode 100644 src/views/Event-boot/Region/components/TypeStatistics.vue rename src/views/{dashboard => Event-boot/Region}/components/echart.vue (97%) create mode 100644 src/views/Event-boot/Region/overview.vue create mode 100644 src/views/Event-boot/Region/statistics.vue diff --git a/src/components/echarts/MyEchart.vue b/src/components/echarts/MyEchart.vue index 343a3a7..61d2e90 100644 --- a/src/components/echarts/MyEchart.vue +++ b/src/components/echarts/MyEchart.vue @@ -11,10 +11,10 @@ const chartRef = ref() const props = defineProps(['options']) let chart: echarts.ECharts | any = null const resizeHandler = () => { - chart.getZr().painter.getViewportRoot().style.display = "none"; + chart.getZr().painter.getViewportRoot().style.display = 'none' requestAnimationFrame(() => { chart.resize() - chart.getZr().painter.getViewportRoot().style.display = ""; + chart.getZr().painter.getViewportRoot().style.display = '' }) } const initChart = () => { @@ -28,7 +28,7 @@ const initChart = () => { color: '#000', fontSize: 18 }, - ...props.options.title + ...(props.options.title || null) }, tooltip: { trigger: 'axis', @@ -116,7 +116,7 @@ const initChart = () => { opacity: 0.5 } }, - ...(props.options.yAxis || null), + ...(props.options.yAxis || null) } ], dataZoom: [ @@ -125,13 +125,15 @@ const initChart = () => { height: 13, start: 0, bottom: '20px', - end: 100 + end: 100, + ...(props.options.dataZoom || null) }, { start: 0, height: 13, bottom: '20px', - end: 100 + end: 100, + ...(props.options.dataZoom|| null) } ], color: [ diff --git a/src/layouts/admin/index.vue b/src/layouts/admin/index.vue index 4232e39..e893f78 100644 --- a/src/layouts/admin/index.vue +++ b/src/layouts/admin/index.vue @@ -1,8 +1,8 @@ - + + diff --git a/src/views/dashboard/components/echart.vue b/src/views/Event-boot/Region/components/echart.vue similarity index 97% rename from src/views/dashboard/components/echart.vue rename to src/views/Event-boot/Region/components/echart.vue index e70439f..0f1b9fd 100644 --- a/src/views/dashboard/components/echart.vue +++ b/src/views/Event-boot/Region/components/echart.vue @@ -35,7 +35,6 @@ const Processing = (list: any) => { }, tooltip: { formatter: function (params: any) { - // console.log(params); let html = '区域:' + params[0].name params.forEach((item: any) => { if (item.value == 1.1) { @@ -105,7 +104,6 @@ const Grade = (list: any) => { }, tooltip: { formatter: function (params: any) { - // console.log(params); let html = '电压等级:' + params[0].name params.forEach((item: any) => { if (item.value == 1.1) { @@ -139,7 +137,6 @@ const Grade = (list: any) => { normal: { //这里是颜色 color: function (params: any) { - // console.log(params,'1111111111111111111111'); if (params.data == 1.1) { return '#B3B3B3' } else { @@ -241,7 +238,6 @@ const Relation = (list: any, interval: number) => { } }, color: function (params: any) { - // console.log(params,'1111111111111111111111'); if (params.data == 1.1) { return '#B3B3B3' } else { diff --git a/src/views/Event-boot/Region/overview.vue b/src/views/Event-boot/Region/overview.vue new file mode 100644 index 0000000..5720dd8 --- /dev/null +++ b/src/views/Event-boot/Region/overview.vue @@ -0,0 +1,72 @@ + + + + + diff --git a/src/views/Event-boot/Region/statistics.vue b/src/views/Event-boot/Region/statistics.vue new file mode 100644 index 0000000..9133f3f --- /dev/null +++ b/src/views/Event-boot/Region/statistics.vue @@ -0,0 +1,76 @@ + + + + +