diff --git a/webs/sms-web/src/views/configs/setting_dashboard/new_dashboard_component/AlarmHandling.vue b/webs/sms-web/src/views/configs/setting_dashboard/new_dashboard_component/AlarmHandling.vue
index f0f789a..91932b2 100644
--- a/webs/sms-web/src/views/configs/setting_dashboard/new_dashboard_component/AlarmHandling.vue
+++ b/webs/sms-web/src/views/configs/setting_dashboard/new_dashboard_component/AlarmHandling.vue
@@ -20,7 +20,7 @@
import { ref } from 'vue'
import LineCharts from './echarts/LineCharts.vue'
import ItemCard from './ItemCard.vue'
-import { getOneDayWarnCount, getSevenDayWarnTrend } from 'services/system/dashboard'
+import { getSevenDayWarnTrend } from 'services/system/dashboard'
import echarts from '@cmp/cmp-echarts/hooks/echarts'
export const colorMap = ['rgba(255, 0, 0, 1)', 'rgba(245, 167, 45, 1)', 'rgba(18, 185, 242, 1)', 'rgba(24, 144, 255, 1)']
const chartSetting = {
@@ -53,20 +53,11 @@ export default {
value: 0
}
])
- ;(async function () {
- const res = await getOneDayWarnCount()
- if (!res.success) return
- countData.value[0].value = res.data.critical
- countData.value[1].value = res.data.major
- countData.value[2].value = res.data.minor
- countData.value[3].value = res.data.warning
- })()
const lineData = ref({
keys: [],
values: []
})
;(async function () {
- // 一天是86400秒
const res = await getSevenDayWarnTrend()
if (!res.success) return
const names = Object.keys(res.data)
@@ -77,7 +68,12 @@ export default {
4: '提示告警'
}
if (!names.length) return
-
+ // 左侧
+ countData.value[0].value = res.data[1].reduce((total, { count }) => count + total, 0)
+ countData.value[1].value = res.data[2].reduce((total, { count }) => count + total, 0)
+ countData.value[2].value = res.data[3].reduce((total, { count }) => count + total, 0)
+ countData.value[3].value = res.data[4].reduce((total, { count }) => count + total, 0)
+ // 右侧
const result = {
keys: res.data[names[0]].map(({ date }) => date),
values: names.map(name => {
diff --git a/webs/sms-web/src/views/configs/setting_dashboard/new_dashboard_component/DailyAlarmStatistics.vue b/webs/sms-web/src/views/configs/setting_dashboard/new_dashboard_component/DailyAlarmStatistics.vue
index d6e365a..1b327c7 100644
--- a/webs/sms-web/src/views/configs/setting_dashboard/new_dashboard_component/DailyAlarmStatistics.vue
+++ b/webs/sms-web/src/views/configs/setting_dashboard/new_dashboard_component/DailyAlarmStatistics.vue
@@ -1,14 +1,14 @@
-
+