From df8467bc8891af847802cc6aee501c18d50f451a Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期二, 31 三月 2026 16:32:26 +0800
Subject: [PATCH] #前端
---
rsf-design/src/views/system/role/rolePage.helpers.js | 38 ++++++++++++++++++--------------------
1 files changed, 18 insertions(+), 20 deletions(-)
diff --git a/rsf-design/src/views/system/role/rolePage.helpers.js b/rsf-design/src/views/system/role/rolePage.helpers.js
index d01d937..0b2696f 100644
--- a/rsf-design/src/views/system/role/rolePage.helpers.js
+++ b/rsf-design/src/views/system/role/rolePage.helpers.js
@@ -28,7 +28,9 @@
}
return Object.fromEntries(
- Object.entries(searchParams).filter(([, value]) => value !== '' && value !== void 0 && value !== null)
+ Object.entries(searchParams).filter(
+ ([, value]) => value !== '' && value !== void 0 && value !== null
+ )
)
}
@@ -86,7 +88,8 @@
return null
}
- const source = ROLE_REPORT_SOURCE_ALIAS[column.source ?? column.prop] ?? column.source ?? column.prop
+ const source =
+ ROLE_REPORT_SOURCE_ALIAS[column.source ?? column.prop] ?? column.source ?? column.prop
if (!source || !allowedColumns.has(source) || seenSources.has(source)) {
return null
}
@@ -224,9 +227,7 @@
return []
}
- return treeData
- .map((node) => normalizeRoleScopeNode(scopeType, node))
- .filter(Boolean)
+ return treeData.map((node) => normalizeRoleScopeNode(scopeType, node)).filter(Boolean)
}
function normalizeRoleScopeNode(scopeType, node) {
@@ -242,16 +243,17 @@
? normalizeRoleScopeTreeData(scopeType, node.children)
: []
const metaSource = node.meta && typeof node.meta === 'object' ? node.meta : node
- const authNodes = scopeType === 'menu' && Array.isArray(metaSource.authList) && metaSource.authList.length
- ? metaSource.authList.map((auth, index) => ({
- id: normalizeScopeKey(auth.id ?? auth.authMark ?? `${node.id || 'auth'}-${index}`),
- label: normalizeScopeTitle(auth.title || auth.name || auth.authMark || ''),
- type: 1,
- isAuthButton: true,
- authMark: auth.authMark || auth.authority || auth.code || '',
- children: []
- }))
- : []
+ const authNodes =
+ scopeType === 'menu' && Array.isArray(metaSource.authList) && metaSource.authList.length
+ ? metaSource.authList.map((auth, index) => ({
+ id: normalizeScopeKey(auth.id ?? auth.authMark ?? `${node.id || 'auth'}-${index}`),
+ label: normalizeScopeTitle(auth.title || auth.name || auth.authMark || ''),
+ type: 1,
+ isAuthButton: true,
+ authMark: auth.authMark || auth.authority || auth.code || '',
+ children: []
+ }))
+ : []
const mergedChildren =
authNodes.length > 0 && !children.some((child) => child.isAuthButton)
@@ -291,11 +293,7 @@
}
return Array.from(
- new Set(
- keys
- .map((key) => normalizeRoleId(key))
- .filter((key) => key !== void 0)
- )
+ new Set(keys.map((key) => normalizeRoleId(key)).filter((key) => key !== void 0))
)
}
--
Gitblit v1.9.1