From 939fa0fb70d37bdba1edb84eac3fb64e38f37110 Mon Sep 17 00:00:00 2001 From: "@user8949" Date: Wed, 19 Mar 2025 21:08:08 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E4=B8=A5=E9=87=8D=E7=A8=8B=E5=BA=A6t?= =?UTF-8?q?ag=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Jyh/Home/index.vue | 27 ++++++++++++++----- .../Detail/EarlyWarningDetail.vue | 20 +++++++++++++- 2 files changed, 39 insertions(+), 8 deletions(-) diff --git a/src/views/Jyh/Home/index.vue b/src/views/Jyh/Home/index.vue index 20bc929..aa5813a 100644 --- a/src/views/Jyh/Home/index.vue +++ b/src/views/Jyh/Home/index.vue @@ -87,11 +87,11 @@ @click="openWarningDetail(item, index)" > {{ item.subject }} - {{ item.importance }} + {{ tagMap[item.importance].text }}
- {{ item.pulishTime }} + {{ item.publishTime }}
@@ -142,10 +142,23 @@ const homeSearch = ref(null); const dropdownWidth = ref(0); const selectedCate = ref('软件'); const tagMap = { - 高: '#f66f6a', - 中: '#fac20a', - 低: '#5e7ce0' -}; + 'Critical': { + text: '致命', + color: '#c7000b' + }, + 'High': { + text: '高', + color: '#f66f6a' + }, + 'Medium': { + text: '中', + color: '#fac20a' + }, + 'Low': { + text: '低', + color: '#5e7ce0' + } +} const searchInput = ref(null); const openAdvancedSearch = () => { @@ -433,7 +446,7 @@ getNoticeList(); display: flex; align-items: center; gap: 8px; - width: 120px; + width: 140px; flex-shrink: 0; } diff --git a/src/views/Jyh/PersonalCenter/Detail/EarlyWarningDetail.vue b/src/views/Jyh/PersonalCenter/Detail/EarlyWarningDetail.vue index df84f8c..4acf2b0 100644 --- a/src/views/Jyh/PersonalCenter/Detail/EarlyWarningDetail.vue +++ b/src/views/Jyh/PersonalCenter/Detail/EarlyWarningDetail.vue @@ -5,7 +5,7 @@
重要性 - {{warningData.importance}} + {{tagMap[warningData.importance].text}}
@@ -39,6 +39,24 @@ const toolbarConfig = [ ['h1', 'h2', 'bold', 'italic', 'strike', 'underline', 'color', 'font'], ['ul', 'ol', 'checklist', 'code', 'link', 'image', 'table'], ]; +const tagMap = { + 'Critical': { + text: '致命', + color: '#c7000b' + }, + 'High': { + text: '高', + color: '#f66f6a' + }, + 'Medium': { + text: '中', + color: '#fac20a' + }, + 'Low': { + text: '低', + color: '#5e7ce0' + } +} const mode = ref('readonly'); console.log(propsData.warningData) warningData.value = propsData.warningData ?? {