From 79ce29d984e28f677a40e1ee0989f678c47f65f4 Mon Sep 17 00:00:00 2001
From: buaixuexideshitongxue <2936013465@qq.com>
Date: Thu, 30 Apr 2026 11:06:27 +0800
Subject: [PATCH] =?UTF-8?q?feat:=E6=A0=87=E7=AD=BE=E5=AD=97=E5=85=B8?=
=?UTF-8?q?=E6=B8=B2=E6=9F=93?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/negative/description.vue | 33 ++++++++++++++++++++++++-
1 file changed, 32 insertions(+), 1 deletion(-)
diff --git a/src/components/negative/description.vue b/src/components/negative/description.vue
index 87f31ae..c6242db 100644
--- a/src/components/negative/description.vue
+++ b/src/components/negative/description.vue
@@ -64,7 +64,7 @@
- {{ getDictLable(dict.sfssTags, negative.currentRow.tag) }}
+ {{ getDictLabel(dict.sfssTags, negative.currentRow.tag) }}
@@ -102,6 +102,37 @@ const dict = catchSotre.getDicts([
"specialSupervision", "suspectProblem", "yesNo", "sfssTags", "handleMethodType"
]);
+function getDictLabel(list, value) {
+ if (!Array.isArray(list)) return '/'
+
+ if (value === null || value === undefined || value === '') return '/'
+
+ let values = []
+
+ // 1️⃣ value 是数组
+ if (Array.isArray(value)) {
+ values = value
+ }
+ // 2️⃣ value 是 "1,2,3" 这种字符串
+ else if (typeof value === 'string' && value.includes(',')) {
+ values = value.split(',').map(v => v.trim())
+ }
+ // 3️⃣ 单值(string / number)
+ else {
+ values = [value]
+ }
+
+ // 4️⃣ 映射成字典中文
+ const labels = values
+ .map(v => {
+ const item = list.find(d => d.dictValue == v)
+ return item?.dictLabel
+ })
+ .filter(Boolean)
+
+ return labels.length ? labels.join(',') : '/'
+}
+
console.log('negative',negative)