From 5eb1d0e04944c2592db09079adb883fdf2fac0d0 Mon Sep 17 00:00:00 2001
From: buaixuexideshitongxue <2936013465@qq.com>
Date: Tue, 30 Dec 2025 19:20:10 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B6=89=E8=AE=BF=E6=B6=89=E8=AF=89--=E6=A0=87?=
=?UTF-8?q?=E7=AD=BE=E5=8A=9F=E8=83=BD+=E4=BF=AE=E6=94=B9=E4=B8=8D?=
=?UTF-8?q?=E8=83=BD=E4=BF=AE=E6=94=B9=E7=BC=96=E5=8F=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/data/complaintformdialog.vue | 3 +-
src/views/data/ComplaintCollection.vue | 41 +++++++++++++++------
2 files changed, 32 insertions(+), 12 deletions(-)
diff --git a/src/components/data/complaintformdialog.vue b/src/components/data/complaintformdialog.vue
index f02289b..ed52bd8 100644
--- a/src/components/data/complaintformdialog.vue
+++ b/src/components/data/complaintformdialog.vue
@@ -65,6 +65,7 @@
v && (model.originId = '')"
+ :disabled="mode=== 'edit'"
>
无
@@ -206,7 +207,7 @@
-
+
{{ item.dictLabel }}
diff --git a/src/views/data/ComplaintCollection.vue b/src/views/data/ComplaintCollection.vue
index 6582fde..f3d1ac5 100644
--- a/src/views/data/ComplaintCollection.vue
+++ b/src/views/data/ComplaintCollection.vue
@@ -133,7 +133,7 @@
collapse-tags
>
-
+
@@ -238,7 +238,7 @@
-
+
{{ getDictLabel(dict.sfssSourceTable, row.sourceTable) }}
@@ -270,9 +270,9 @@
{{ getDictLabel(dict.yesNo, row.leadApproval) }}
-
+
- {{ getDictLabel(dict.tagList, row.tag) }}
+ {{ getDictLabel(dict.sfssTags, row.tag) }}
@@ -614,6 +614,7 @@ const storeDict = computed(() =>
"specialSupervision",
"checkStatus",
"sfssSourceTable",
+ "sfssTags"
]) || {}
);
@@ -747,14 +748,32 @@ const dict = computed(() => ({
function getDictLabel(list, value) {
if (!Array.isArray(list)) return '/'
- // 兼容 value 是数组:['0'] / ['1']
- if (Array.isArray(value)) value = value[0]
-
if (value === null || value === undefined || value === '') return '/'
- // 兼容你的字典字段:dictValue/dictLabel
- const item = list.find(d => d.dictValue == value)
- return item ? item.dictLabel : '/'
+ 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(',') : '/'
}
// endregion