From c1e95fd1e950d10edfcc9ba5489f7ea77da25aeb Mon Sep 17 00:00:00 2001 From: lai <371757574@qq.com> Date: Thu, 30 May 2024 14:49:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=AA=E8=A1=A8=E7=9B=98=E5=8E=BB=E9=99=A4?= =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=91=8A=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/faultManage/actAlarm.ts | 4 ++-- .../overview/components/AlarnTypeBar/index.vue | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/api/faultManage/actAlarm.ts b/src/api/faultManage/actAlarm.ts index 7d96ac81..d668a4b5 100644 --- a/src/api/faultManage/actAlarm.ts +++ b/src/api/faultManage/actAlarm.ts @@ -294,7 +294,7 @@ export async function exportAll(query: Record) { * @returns bolb */ export async function origGet() { - let totalSQL = `select count(*) as value,orig_severity as name from alarm WHERE alarm_status='1' group by orig_severity`; + let totalSQL = `select count(*) as value,orig_severity as name from alarm WHERE alarm_status='1' and orig_severity!='Event' group by orig_severity`; // 发起请求 const result = await request({ @@ -332,7 +332,7 @@ export async function top3Sel(filterFlag?: string) { let filter = ` WHERE alarm_status='1'and orig_severity='${filterFlag}'`; if (!filterFlag) filter = "WHERE alarm_status='1'"; - let top3SQL = `select count(*) as value,ne_type as name from alarm ${filter} group by ne_type ORDER BY value desc limit 0,3 `; + let top3SQL = `select count(*) as value,ne_type as name from alarm ${filter} and orig_severity!='Event' group by ne_type ORDER BY value desc limit 0,3 `; // 发起请求 const result = await request({ diff --git a/src/views/dashboard/overview/components/AlarnTypeBar/index.vue b/src/views/dashboard/overview/components/AlarnTypeBar/index.vue index 9a5f5a1e..583bfd03 100644 --- a/src/views/dashboard/overview/components/AlarnTypeBar/index.vue +++ b/src/views/dashboard/overview/components/AlarnTypeBar/index.vue @@ -70,10 +70,10 @@ const alarmTypeType = ref([ value: 0, name: t('views.index.Warning'), }, - { - value: 0, - name: t('views.index.Event'), - }, + // { + // value: 0, + // name: t('views.index.Event'), + // }, ]); /**告警类型Top数据 */ @@ -105,9 +105,9 @@ function initPicture() { case 'Warning': index = 3; break; - case 'Event': - index = 4; - break; + // case 'Event': + // index = 4; + // break; } alarmTypeType.value[index].value = Number(item.value); } @@ -149,7 +149,7 @@ function initPicture() { legend: { orient: 'vertical', right: '2%', - top: '10%', + top: '12%', data: alarmTypeType.value.map((item: any) => item.name), //label数组 textStyle: { color: '#A7D6F4', // 设置图例文字颜色