From cfda3a9f0dde1c8ef10b43a664c0715c509ac427 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=97=B6=E5=90=AF=E9=BE=99?= Date: Wed, 28 Aug 2024 17:05:23 +0800 Subject: [PATCH] fix: test --- .../new_dashboard_component/WarningList.vue | 50 +++++++++++++++---- 1 file changed, 41 insertions(+), 9 deletions(-) diff --git a/webs/sms-web/src/views/configs/setting_dashboard/new_dashboard_component/WarningList.vue b/webs/sms-web/src/views/configs/setting_dashboard/new_dashboard_component/WarningList.vue index 76f9699..f5cbda9 100644 --- a/webs/sms-web/src/views/configs/setting_dashboard/new_dashboard_component/WarningList.vue +++ b/webs/sms-web/src/views/configs/setting_dashboard/new_dashboard_component/WarningList.vue @@ -1,6 +1,6 @@ @@ -39,28 +49,40 @@ export default { page: 1, rows: 10 }, - total: 0 + total: 0, + dialog: { + visible: false + }, + detailData: {} } }, created() { this.getItemList() }, methods: { + goBack() { + this.dialog.visible = false + }, + // 获取详情 + async getDetail(row) { + this.detailData = row + this.dialog.visible = true + }, getSeverity(val) { const map = { - 1: { + 4: { text: '严重告警', icon: 严重 }, - 2: { + 3: { text: '重要告警', icon: 重要 }, - 3: { + 2: { text: '次要告警', icon: 次要 }, - 4: { + 1: { text: '常规告警', icon: 常规 } @@ -78,8 +100,8 @@ export default { } }) }, - handleWarningOperation(row) { - console.log('处理告警', row) + goPage() { + this.$router.push({ path: '/oms-web/dashbaord?redirect=/alarm/current' }) } } } @@ -90,4 +112,14 @@ export default { align-items: center; gap: 13px; } +.message-card { + padding: 20px; + font-size: 14px; + line-height: 20px; +} + +.site-message-detail { + white-space: pre-wrap; + word-break: break-all; +}