From 6c4bd2467bb6651c6edcf8a9741dcd4e9b1aa6d3 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Fri, 30 Jan 2026 14:42:36 +0800
Subject: [PATCH] feat:权限按钮

---
 packages/utils/common/index.js |   20 +++++++++++++++++---
 1 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/packages/utils/common/index.js b/packages/utils/common/index.js
index 9d00919..43fcec6 100644
--- a/packages/utils/common/index.js
+++ b/packages/utils/common/index.js
@@ -1,3 +1,13 @@
+/*
+ * @Author       : yuan
+ * @Date         : 2026-01-20 17:01:20
+ * @LastEditors  : yuan
+ * @LastEditTime : 2026-01-20 17:20:21
+ * @FilePath     : \packages\utils\common\index.js
+ * @Description  :
+ * Copyright 2026 OBKoro1, All Rights Reserved.
+ * 2026-01-20 17:01:20
+ */
 export function fieldRules(required,max) {
 // export function fieldRules({ required = true, isSelect = false, max = 50,type = 'string' }) {
 	const trigger = ['blur', 'change']
@@ -12,9 +22,13 @@
 	return rules
 }
 
-
-export function getDictLabel(value, dictList) {
-	return dictList.find(item => item.dictKey === value)?.dictValue || value || '-'
+export function getDictLabel(value, dictList = []) {
+	if (value === null || value === undefined || value === '') return '';
+	const values = String(value).split(',');
+	return dictList
+		.filter(item => values.includes(String(item.dictKey)))
+		.map(item => item.dictValue)
+		.join(',');
 }
 
 export function blobDownload(res) {

--
Gitblit v1.9.3