From a9fc77eb8b833ad18039c24ab2b057445f66256e Mon Sep 17 00:00:00 2001 From: sjl <1716605279@qq.com> Date: Wed, 28 Jan 2026 10:33:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=BA=E5=9F=9F=E6=A6=82=E8=A7=88=E6=9C=AA?= =?UTF-8?q?=E5=85=B3=E8=81=94=E6=9A=82=E9=99=8D=E6=AC=A1=E6=95=B0=E5=92=8C?= =?UTF-8?q?=E5=B7=B2=E5=85=B3=E8=81=94=E5=A4=84=E7=90=86=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Region/components/Tableabove.vue | 26 +++---- .../voltageSags/Region/components/echart.vue | 71 ++++++++++--------- 2 files changed, 47 insertions(+), 50 deletions(-) diff --git a/src/views/pqs/voltageSags/Region/components/Tableabove.vue b/src/views/pqs/voltageSags/Region/components/Tableabove.vue index aa1fef0e..59f576f3 100644 --- a/src/views/pqs/voltageSags/Region/components/Tableabove.vue +++ b/src/views/pqs/voltageSags/Region/components/Tableabove.vue @@ -35,8 +35,7 @@
- - +
@@ -102,28 +101,21 @@ const info = (list: any, searchBeginTime: any, searchEndTime: any,selectedAreaNa ] - // let all = 0 + let all = 0 - // list.monthlyStatistics.monthCalculation.forEach((item: any) => { - // all += item.linked + item.notAssociated - // }) - let allNotAssociated = 0 - let allLinked= 0 list.monthlyStatistics.monthCalculation.forEach((item: any) => { - allNotAssociated += item.notAssociated + all += item.linked + item.notAssociated }) - - list.monthlyStatistics.monthCalculation.forEach((item: any) => { - allLinked += item.linked - }) - + shareData.value = [ { month: '总计', - notAssociated: allNotAssociated.toFixed(2), - linked: allLinked.toFixed(2) + notAssociated: all, }, - ...list.monthlyStatistics.monthCalculation + ...list.monthlyStatistics.monthCalculation.map((item: any) => ({ + month: item.month, + notAssociated: item.notAssociated + item.linked + })) ] } diff --git a/src/views/pqs/voltageSags/Region/components/echart.vue b/src/views/pqs/voltageSags/Region/components/echart.vue index d4ba4194..23043521 100644 --- a/src/views/pqs/voltageSags/Region/components/echart.vue +++ b/src/views/pqs/voltageSags/Region/components/echart.vue @@ -48,7 +48,7 @@ const Processing = (list: any) => { return html } }, - + color: ['#07CCCA'], legend: { data: ['暂降次数'] }, @@ -117,7 +117,7 @@ const Grade = (list: any) => { return html } }, - + color: ['#07CCCA'], legend: { data: ['暂降次数'] }, @@ -185,7 +185,10 @@ const Relation = (list: any, interval: number) => { // } else if (item.notAssociated == 1) { // item.notAssociated = 1.3 // } - echartswArr.push(item.notAssociated) + //echartswArr.push(item.notAssociated) + const total = item.notAssociated + item.linked + echartswArr.push(total) + }) monthlyStatistics.value = { title: { @@ -208,9 +211,11 @@ const Relation = (list: any, interval: number) => { }, legend: { - data: ['未关联暂降次数', '已关联处理事件'] + data: ['暂降次数'] + //data: ['未关联暂降次数', '已关联处理事件'] }, - color: ['#07CCCA', '#Ff6600'], + color: ['#07CCCA'], + //color: ['#07CCCA', '#Ff6600'], xAxis: { name: '月份', // 给X轴加单位 data: echartsndArr @@ -221,11 +226,11 @@ const Relation = (list: any, interval: number) => { options: { series: [ { - name: '未关联暂降次数', + name: '暂降次数', type: 'bar', barMaxWidth: 30, barMinHeight: 5, - data: echartswArr, + data: echartswArr, itemStyle: { normal: { label: { @@ -247,32 +252,32 @@ const Relation = (list: any, interval: number) => { } } }, - { - name: '已关联处理事件', - type: 'bar', - barMaxWidth: 30, - data: echartsArr, - itemStyle: { - normal: { - label: { - // show: true, //数字开启显示 - textStyle: { - //数值样式 - color: '#fff', - fontSize: 14, - fontWeight: 600 - } - }, - color: function (params: any) { - if (params.data == 0) { - return '#B3B3B3' - } else { - return '#Ff6600' - } - } - } - } - } + // { + // name: '已关联处理事件', + // type: 'bar', + // barMaxWidth: 30, + // data: echartsArr, + // itemStyle: { + // normal: { + // label: { + // // show: true, //数字开启显示 + // textStyle: { + // //数值样式 + // color: '#fff', + // fontSize: 14, + // fontWeight: 600 + // } + // }, + // color: function (params: any) { + // if (params.data == 0) { + // return '#B3B3B3' + // } else { + // return '#Ff6600' + // } + // } + // } + // } + // } ] } }