fix(pl): 拆分小程序运输证件页签权限,并让证书齐备列表避开证件类型路由。
页签按独立菜单显示,销售办证员默认不含证书齐备;证书齐备接口先于通配证件路径注册,避免 plans 被当成证件类型。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
af79aa50a2
commit
66bad6b219
8 files changed
+171
-20
No files matched your search
@@ -58,7 +58,15 @@ export const WORKBENCH_MODULES = [
|
||||
enabled: true,
|
||||
code: 'pl-plan-cert-webview',
|
||||
icon: '📑',
|
||||
perms: 'mini:pl:plan-cert:list'
|
||||
perms: 'mini:pl:plan-cert:list',
|
||||
anyPerms: [
|
||||
'mini:pl:plan-cert:list',
|
||||
'mini:pl:quota-cert:list',
|
||||
'mini:pl:contract-quota:list',
|
||||
'mini:pl:certificate-usage:list',
|
||||
'mini:pl:plan-cert:segment',
|
||||
'mini:pl:cert-ready:list'
|
||||
]
|
||||
},
|
||||
{
|
||||
name: '合法使用证明',
|
||||
|
||||
@@ -20,6 +20,10 @@ export function filterWorkbenchModules(modules, auth) {
|
||||
const nextMenus = menus.filter((item) => {
|
||||
if (!item || item.enabled === false) return false
|
||||
if (menuAll) return true
|
||||
const anyPerms = Array.isArray(item.anyPerms) ? item.anyPerms : []
|
||||
if (anyPerms.length) {
|
||||
return anyPerms.some((perm) => codeSet.has(String(perm || '').trim()))
|
||||
}
|
||||
const p = item.perms
|
||||
if (!p) return false
|
||||
return codeSet.has(String(p))
|
||||
|
||||
Reference in new issue
Block a user