refactor: 菜单按PDCA五组重组 — 规划与目标/执行与控制/监控与评价/复盘与改进/系统与支持
This commit is contained in:
Vendored
+1
@@ -68,6 +68,7 @@ declare module 'vue' {
|
||||
MyDialog: typeof import('./src/components/MyDialog.vue')['default']
|
||||
NodeEditDialog: typeof import('./src/components/strategy-map/NodeEditDialog.vue')['default']
|
||||
ProfitBreakdown: typeof import('./src/components/charts/ProfitBreakdown.vue')['default']
|
||||
RiskCell: typeof import('./src/components/charts/RiskCell.vue')['default']
|
||||
RouterLink: typeof import('vue-router')['RouterLink']
|
||||
RouterView: typeof import('vue-router')['RouterView']
|
||||
StrategyLayer: typeof import('./src/components/strategy-map/StrategyLayer.vue')['default']
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<template>
|
||||
<div class="risk-cell" @click.stop="$emit('click')" style="cursor:pointer;">
|
||||
<template v-if="quadrant">
|
||||
<div v-for="risk in quadrant.risks" :key="risk.id" class="risk-item" :style="{ backgroundColor: riskTypeBg(risk.type) }">
|
||||
<span class="risk-dot" :style="{ backgroundColor: riskTypeColor(risk.type) }"></span>
|
||||
<span class="risk-name">{{ risk.name }}</span>
|
||||
<span class="risk-value">{{ risk.detail?.split(',')[0] || '' }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<div v-else class="risk-empty">—</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
defineProps<{ quadrant: any }>()
|
||||
defineEmits<{ click: [] }>()
|
||||
function riskTypeColor(type: string): string {
|
||||
return { red: '#f56c6c', orange: '#e6a23c', yellow: '#409eff', green: '#67c23a' }[type] || '#999'
|
||||
}
|
||||
function riskTypeBg(type: string): string {
|
||||
return { red: '#fef0f0', orange: '#fdf6ec', yellow: '#ecf5ff', green: '#f0f9eb' }[type] || '#f5f7fa'
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.risk-cell { min-height:80px; border-radius:6px; padding:6px; background:#fafafa; border:1px solid #e8e8e8; }
|
||||
.risk-item { padding:4px 6px; margin-bottom:3px; border-radius:4px; font-size:12px; line-height:1.4; }
|
||||
.risk-item:last-child { margin-bottom:0; }
|
||||
.risk-dot { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:4px; }
|
||||
.risk-name { font-weight:500; }
|
||||
.risk-value { display:block; font-size:11px; color:#666; margin-top:1px; padding-left:12px; }
|
||||
.risk-empty { color:#ddd; text-align:center; line-height:80px; font-size:13px; }
|
||||
</style>
|
||||
@@ -64,13 +64,13 @@ const iconMap: Record<string, any> = {
|
||||
DataBoard, Collection, Edit,
|
||||
}
|
||||
|
||||
// 分组图标映射
|
||||
// 分组图标映射 — PDCA五组
|
||||
const groupIcons: Record<string, any> = {
|
||||
'数据基础': DataBoard,
|
||||
'分析决策': TrendCharts,
|
||||
'行动管理': Edit,
|
||||
'系统管理': Tools,
|
||||
'帮助支持': Document,
|
||||
'规划与目标': DataBoard,
|
||||
'执行与控制': Edit,
|
||||
'监控与评价': TrendCharts,
|
||||
'复盘与改进': DataAnalysis,
|
||||
'系统与支持': Tools,
|
||||
}
|
||||
|
||||
function groupIcon(label: string) {
|
||||
|
||||
+34
-27
@@ -29,42 +29,49 @@ export interface MenuItem {
|
||||
}
|
||||
|
||||
export const MENU_ITEMS: MenuItem[] = [
|
||||
// ── 个人视角 ──
|
||||
{ path: '/my-dashboard', label: '我的工作台', icon: 'Monitor', 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: '/dashboard', label: '驾驶舱', icon: 'DataBoard', roles: ['ceo', 'finance', 'business', 'it'], group: '分析决策' },
|
||||
// ══════════════════════════════════════════════════════════════
|
||||
// GROUP 1: 规划与目标(Plan)
|
||||
// ══════════════════════════════════════════════════════════════
|
||||
{ path: '/my-dashboard', label: '我的工作台', icon: 'Monitor', roles: ['ceo', 'finance', 'business', 'it'], group: '规划与目标' },
|
||||
{ path: '/maps', label: '战略地图', icon: 'DataBoard', roles: ['ceo', 'finance'] },
|
||||
{ path: '/customer', label: '客户维度', icon: 'User', roles: ['ceo', 'finance', 'business', 'it'] },
|
||||
{ path: '/learning-dashboard', label: '学习成长看板', icon: 'Reading', roles: ['ceo', 'finance', 'it'] },
|
||||
{ path: '/maps-review', label: '战略回顾会', icon: 'TrendCharts', roles: ['ceo', 'finance'] },
|
||||
{ path: '/deviations', label: '差异分析', icon: 'DataAnalysis', roles: ['ceo', 'finance', 'business', 'it'] },
|
||||
{ path: '/cost', label: '成本分析', icon: 'Money', roles: ['ceo', 'finance', 'it'] },
|
||||
{ path: '/predict', label: '预测模拟', icon: 'DataLine', roles: ['ceo', 'finance', 'it'] },
|
||||
{ path: '/kpis', label: 'KPI字典', icon: 'Document', roles: ['ceo', 'finance', 'business', 'it'] },
|
||||
{ path: '/budget', label: '预算管理', icon: 'Coin', roles: ['ceo', 'finance', 'business', 'it'] },
|
||||
|
||||
// ── 高级分析 ──
|
||||
{ path: '/reports', label: '管理报表', icon: 'DataAnalysis', roles: ['ceo', 'finance', 'business'] },
|
||||
{ path: '/alignment', label: '战略执行看板', icon: 'Opportunity', roles: ['ceo', 'finance', 'business', 'it'] },
|
||||
{ path: '/dupont-analysis', label: '杜邦分析', icon: 'TrendCharts', roles: ['ceo', 'finance', 'it'] },
|
||||
|
||||
// ── 行动管理 ──
|
||||
{ path: '/alerts', label: '预警中心', icon: 'WarningFilled', roles: ['ceo', 'finance', 'business', 'it'], group: '行动管理' },
|
||||
// ══════════════════════════════════════════════════════════════
|
||||
// GROUP 2: 执行与控制(Do)
|
||||
// ══════════════════════════════════════════════════════════════
|
||||
{ path: '/cost', label: '成本分析', icon: 'Money', roles: ['ceo', 'finance', 'it'], group: '执行与控制' },
|
||||
{ path: '/deviations', label: '差异分析', icon: 'DataAnalysis', roles: ['ceo', 'finance', 'business', 'it'] },
|
||||
{ path: '/action-plans', label: '改善行动', icon: 'Edit', roles: ['ceo', 'finance', 'business', 'it'] },
|
||||
|
||||
// ── 系统管理 ──
|
||||
{ path: '/org', label: '组织管理', icon: 'Collection', roles: ['ceo', 'it'], group: '系统管理' },
|
||||
// ══════════════════════════════════════════════════════════════
|
||||
// GROUP 3: 监控与评价(Check)
|
||||
// ══════════════════════════════════════════════════════════════
|
||||
{ path: '/dashboard', label: '驾驶舱', icon: 'DataBoard', roles: ['ceo', 'finance', 'business', 'it'], group: '监控与评价' },
|
||||
{ path: '/reports', label: '管理报表', icon: 'DataAnalysis', roles: ['ceo', 'finance', 'business'] },
|
||||
{ path: '/dupont-analysis', label: '杜邦分析', icon: 'TrendCharts', roles: ['ceo', 'finance', 'it'] },
|
||||
{ path: '/customer', label: '客户维度', icon: 'User', roles: ['ceo', 'finance', 'business', 'it'] },
|
||||
{ path: '/learning-dashboard', label: '学习成长看板', icon: 'Reading', roles: ['ceo', 'finance', 'it'] },
|
||||
{ path: '/alerts', label: '预警中心', icon: 'WarningFilled', roles: ['ceo', 'finance', 'business', 'it'] },
|
||||
{ path: '/data', label: '数据管理', icon: 'Connection', roles: ['ceo', 'finance', 'it'] },
|
||||
|
||||
// ══════════════════════════════════════════════════════════════
|
||||
// GROUP 4: 复盘与改进(Act)
|
||||
// ══════════════════════════════════════════════════════════════
|
||||
{ path: '/maps-review', label: '战略回顾会', icon: 'TrendCharts', roles: ['ceo', 'finance'], group: '复盘与改进' },
|
||||
{ path: '/predict', label: '预测模拟', icon: 'DataLine', roles: ['ceo', 'finance', 'it'] },
|
||||
{ path: '/data-quality', label: '数据质量', icon: 'WarningFilled', roles: ['ceo', 'finance', 'it'] },
|
||||
|
||||
// ══════════════════════════════════════════════════════════════
|
||||
// GROUP 5: 系统与支持(Infra)
|
||||
// ══════════════════════════════════════════════════════════════
|
||||
{ path: '/knowledge', label: 'CMA知识库', icon: 'Document', roles: ['ceo', 'finance', 'business', 'it'], group: '系统与支持' },
|
||||
{ path: '/guide', label: '新手引导', icon: 'Edit', roles: ['ceo', 'finance', 'business', 'it'] },
|
||||
{ path: '/org', label: '组织管理', icon: 'Collection', roles: ['ceo', 'it'] },
|
||||
{ path: '/users', label: '用户管理', icon: 'User', roles: ['ceo', 'it'] },
|
||||
{ path: '/notifications', label: '通知配置', icon: 'Bell', roles: ['ceo', 'it'] },
|
||||
{ path: '/permissions', label: '系统设置', icon: 'Setting', roles: ['ceo', 'it'] },
|
||||
|
||||
// ── 帮助支持 ──
|
||||
{ path: '/knowledge', label: 'CMA知识库', icon: 'Document', roles: ['ceo', 'finance', 'business', 'it'], group: '帮助支持' },
|
||||
{ path: '/guide', label: '新手引导', icon: 'Edit', roles: ['ceo', 'finance', 'business', 'it'] },
|
||||
]
|
||||
|
||||
// 角色名称映射
|
||||
|
||||
Reference in New Issue
Block a user