gongxiangp2/components/department-dashboard/workspace-navigation.ts
2026-08-19 12:08:38 +08:00

115 lines
5.3 KiB
TypeScript

export type WorkspaceSectionKey = 'dashboard' | 'business' | 'assets' | 'organization' | 'governance'
export type WorkspaceItem = {
key: string
title: string
href: string
status: 'connected' | 'framework'
productName?: string
}
export type WorkspaceSection = {
key: WorkspaceSectionKey
title: string
description: string
summary: string
accent: string
accentSoft: string
accentText: string
items: WorkspaceItem[]
}
export const WORKSPACE_SECTIONS: WorkspaceSection[] = [
{
key: 'dashboard',
title: '中心仪表盘',
description: '聚合指标、趋势和团队运行状态,为管理者提供统一观察面。',
summary: '掌握经营与交付全貌',
accent: '#e73b32',
accentSoft: '#fff0ee',
accentText: '#b4231c',
items: [
{ key: 'core-metrics', title: '核心指标', href: '/workspaces/dashboard/core-metrics', status: 'framework' },
{ key: 'business-trends', title: '业务趋势', href: '/workspaces/dashboard/business-trends', status: 'framework' },
{ key: 'brand-health', title: '六品牌健康度', href: '/workspaces/dashboard/brand-health', status: 'framework' },
{ key: 'team-capacity', title: '团队产能', href: '/workspaces/dashboard/team-capacity', status: 'framework' },
{ key: 'management-focus', title: '管理者关注', href: '/workspaces/dashboard/management-focus', status: 'framework' },
],
},
{
key: 'business',
title: '业务经营',
description: '围绕品牌、新品、创意与转化,组织跨团队经营工作。',
summary: '推动品牌与项目向前',
accent: '#e98722',
accentSoft: '#fff4e7',
accentText: '#9a4d08',
items: [
{ key: 'product-launch', title: '新品上新', href: '/workspaces/business/product-launch', status: 'framework' },
{ key: 'brand-building', title: '品牌塑造', href: '/workspaces/business/brand-building', status: 'framework' },
{ key: 'creative-production', title: '创意生产', href: '/workspaces/business/creative-production', status: 'framework' },
{ key: 'performance-conversion', title: '业绩转化', href: '/workspaces/business/performance-conversion', status: 'framework' },
{ key: 'project-collaboration', title: '项目协同', href: '/workspaces/business/project-collaboration', status: 'framework' },
],
},
{
key: 'assets',
title: '资产与AI自动化',
description: '沉淀内容资产与品牌知识,把重复生产环节交给自动化流程。',
summary: '让资产可复用、流程可自动化',
accent: '#0f9f72',
accentSoft: '#e9f8f2',
accentText: '#087052',
items: [
{ key: 'material-library', title: '素材资产库', href: '/assets/material-library', status: 'connected', productName: '由壹点3D素材' },
{ key: 'brand-knowledge', title: '品牌知识库', href: '/workspaces/assets/brand-knowledge', status: 'framework' },
{ key: 'automation-workflows', title: '自动化工作流', href: '/workspaces/assets/automation-workflows', status: 'connected', productName: '2 项工作流已接入' },
{ key: 'value-metrics', title: '价值指标', href: '/workspaces/assets/value-metrics', status: 'framework' },
],
},
{
key: 'organization',
title: '组织管理',
description: '明确人员结构、团队职责和绩效协作关系,建立组织视图。',
summary: '看清组织、职责与负荷',
accent: '#c99300',
accentSoft: '#fff8d9',
accentText: '#725400',
items: [
{ key: 'people-structure', title: '人员架构', href: '/workspaces/organization/people-structure', status: 'framework' },
{ key: 'team-functions', title: '团队职能', href: '/workspaces/organization/team-functions', status: 'framework' },
{ key: 'performance-review', title: '绩效考核', href: '/workspaces/organization/performance-review', status: 'framework' },
{ key: 'people-workload', title: '人员与负荷', href: '/workspaces/organization/people-workload', status: 'framework' },
],
},
{
key: 'governance',
title: '治理与设置',
description: '统一权限、数据口径和通知机制,支撑可控、可追溯的协作。',
summary: '建立部门级工作规则',
accent: '#3569df',
accentSoft: '#edf3ff',
accentText: '#214ba7',
items: [
{ key: 'roles-permissions', title: '权限角色', href: '/workspaces/governance/roles-permissions', status: 'framework' },
{ key: 'data-definitions', title: '数据口径', href: '/workspaces/governance/data-definitions', status: 'framework' },
{ key: 'editing-capabilities', title: '编辑能力', href: '/workspaces/governance/editing-capabilities', status: 'framework' },
{ key: 'notifications', title: '通知机制', href: '/workspaces/governance/notifications', status: 'framework' },
],
},
]
export function getWorkspaceItem(sectionKey: string, itemKey: string) {
const section = WORKSPACE_SECTIONS.find((candidate) => candidate.key === sectionKey)
const item = section?.items.find((candidate) => candidate.key === itemKey)
return section && item ? { section, item } : null
}
export function getFrameworkWorkspaceParams() {
return WORKSPACE_SECTIONS.flatMap((section) =>
section.items
.filter((item) => item.status === 'framework')
.map((item) => ({ section: section.key, item: item.key }))
)
}