fix: 左侧菜单重复分组头——移除KPI字典和管报表的多余group
This commit is contained in:
Binary file not shown.
Executable
+31
@@ -0,0 +1,31 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# CMA预警检查 — 通过wrapper脚本避免systemd引号冲突
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
cd /root/cma-management/backend
|
||||||
|
|
||||||
|
VENV="/root/cma-management/backend/venv"
|
||||||
|
|
||||||
|
# 1. KPI阈值检查
|
||||||
|
"$VENV/bin/python3" -c "
|
||||||
|
from app.database import get_db_session
|
||||||
|
from app.api.alert_rules import check_all_kpi_alerts
|
||||||
|
db = next(get_db_session())
|
||||||
|
try:
|
||||||
|
count = check_all_kpi_alerts(db)
|
||||||
|
print(f'KPI预警检查完成: 新增{count}条')
|
||||||
|
finally:
|
||||||
|
db.close()
|
||||||
|
" 2>&1
|
||||||
|
|
||||||
|
# 2. 差异预警推送检查
|
||||||
|
"$VENV/bin/python3" -c "
|
||||||
|
from app.database import get_db_session
|
||||||
|
from app.api.deviation_push import check_all_push
|
||||||
|
db = next(get_db_session())
|
||||||
|
try:
|
||||||
|
count = check_all_push(db)
|
||||||
|
print(f'差异预警检查完成: 新增{count}条')
|
||||||
|
finally:
|
||||||
|
db.close()
|
||||||
|
" 2>&1
|
||||||
@@ -33,7 +33,7 @@ export const MENU_ITEMS: MenuItem[] = [
|
|||||||
{ path: '/my-dashboard', label: '我的工作台', icon: 'Monitor', roles: ['ceo', 'finance', 'business', 'it'], group: '数据基础' },
|
{ path: '/my-dashboard', label: '我的工作台', icon: 'Monitor', roles: ['ceo', 'finance', 'business', 'it'], group: '数据基础' },
|
||||||
|
|
||||||
// ── 数据基础 ──
|
// ── 数据基础 ──
|
||||||
{ path: '/kpis', label: 'KPI字典', icon: 'Document', roles: ['ceo', 'finance', 'business', 'it'], group: '数据基础' },
|
{ path: '/kpis', label: 'KPI字典', icon: 'Document', roles: ['ceo', 'finance', 'business', 'it'] },
|
||||||
{ path: '/data', label: '数据管理', icon: 'Connection', roles: ['ceo', 'finance', 'it'] },
|
{ path: '/data', label: '数据管理', icon: 'Connection', roles: ['ceo', 'finance', 'it'] },
|
||||||
|
|
||||||
// ── 分析决策 ──
|
// ── 分析决策 ──
|
||||||
@@ -48,7 +48,7 @@ export const MENU_ITEMS: MenuItem[] = [
|
|||||||
{ path: '/budget', label: '预算管理', icon: 'Coin', roles: ['ceo', 'finance', 'business', 'it'] },
|
{ path: '/budget', label: '预算管理', icon: 'Coin', roles: ['ceo', 'finance', 'business', 'it'] },
|
||||||
|
|
||||||
// ── 高级分析 ──
|
// ── 高级分析 ──
|
||||||
{ path: '/reports', label: '管理报表', icon: 'DataAnalysis', roles: ['ceo', 'finance', 'business'], group: '分析决策' },
|
{ path: '/reports', label: '管理报表', icon: 'DataAnalysis', roles: ['ceo', 'finance', 'business'] },
|
||||||
{ path: '/alignment', label: '战略执行看板', icon: 'Opportunity', roles: ['ceo', 'finance', 'business', 'it'] },
|
{ path: '/alignment', label: '战略执行看板', icon: 'Opportunity', roles: ['ceo', 'finance', 'business', 'it'] },
|
||||||
{ path: '/dupont-analysis', label: '杜邦分析', icon: 'TrendCharts', roles: ['ceo', 'finance', 'it'] },
|
{ path: '/dupont-analysis', label: '杜邦分析', icon: 'TrendCharts', roles: ['ceo', 'finance', 'it'] },
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user