feat: refactor monolithic App.vue into modular Vue component architecture
- Extract 711-line App.vue into 15+ focused files across 5 directories
- Add data layer (icons, metrics, policies, auditTrail, requests)
- Add composables (useNavigation, useRequests, useChat, useToast)
- Add layout components (SidebarRail, TopBar, FilterBar)
- Add shared components (PanelHead, InfoRow, ToastNotification)
- Add business component (RequestTable) and 5 view components
- Extract global CSS to assets/styles/global.css
- Add start.sh with WSL/Windows cross-platform support
- Add .gitignore for node_modules, dist, and IDE dirs
2026-04-28 17:20:52 +08:00
|
|
|
import { computed, ref } from 'vue'
|
|
|
|
|
import { icons } from '../data/icons.js'
|
|
|
|
|
|
|
|
|
|
export const navItems = [
|
2026-04-29 23:35:56 +08:00
|
|
|
{
|
|
|
|
|
id: 'overview',
|
|
|
|
|
label: '总览',
|
|
|
|
|
navHint: '运营指标与趋势',
|
|
|
|
|
icon: icons.dashboard,
|
|
|
|
|
title: '企业报销智能运营台',
|
|
|
|
|
desc: '面向财务共享中心的审批、风控、SLA与自动化运营看板'
|
|
|
|
|
},
|
2026-05-05 18:22:47 +08:00
|
|
|
{
|
|
|
|
|
id: 'workbench',
|
|
|
|
|
label: '个人工作台',
|
|
|
|
|
navHint: '今日待办与报销进度',
|
|
|
|
|
icon: icons.workspace,
|
|
|
|
|
title: '个人工作台',
|
|
|
|
|
desc: '集中处理今日待办、查看报销进度,并快速进入 AI 报销助手'
|
|
|
|
|
},
|
2026-04-29 23:35:56 +08:00
|
|
|
{
|
|
|
|
|
id: 'requests',
|
2026-04-30 17:11:24 +08:00
|
|
|
label: '差旅申请/报销',
|
|
|
|
|
navHint: '差旅单据与发起申请',
|
2026-04-29 23:35:56 +08:00
|
|
|
icon: icons.list,
|
2026-04-30 17:11:24 +08:00
|
|
|
title: '差旅申请/报销',
|
|
|
|
|
desc: '查看员工差旅报销单据、跟踪进度、发起新申请'
|
|
|
|
|
},
|
2026-05-01 00:39:24 +08:00
|
|
|
{
|
|
|
|
|
id: 'approval',
|
|
|
|
|
label: '审批中心',
|
|
|
|
|
navHint: '待审批单据与批量处理',
|
|
|
|
|
icon: icons.approval,
|
|
|
|
|
title: '审批中心',
|
|
|
|
|
desc: '统一处理待审批单据,聚焦效率、风险与 SLA'
|
|
|
|
|
},
|
2026-04-30 17:11:24 +08:00
|
|
|
{
|
|
|
|
|
id: 'chat',
|
|
|
|
|
label: 'AI助手',
|
2026-05-02 11:30:12 +08:00
|
|
|
navHint: '财务知识问答与制度解释',
|
2026-04-30 17:11:24 +08:00
|
|
|
icon: icons.message,
|
2026-05-02 11:30:12 +08:00
|
|
|
title: '财务AI助手',
|
|
|
|
|
desc: '面向员工与财务场景的智能问答助手,提供制度解读、报销指引与常见问题解答'
|
2026-04-29 23:35:56 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'policies',
|
2026-05-01 00:39:24 +08:00
|
|
|
label: '知识管理',
|
2026-05-02 11:30:12 +08:00
|
|
|
navHint: '制度、文档与知识库',
|
2026-04-29 23:35:56 +08:00
|
|
|
icon: icons.file,
|
2026-05-01 00:39:24 +08:00
|
|
|
title: '财务知识管理中心',
|
2026-05-02 11:30:12 +08:00
|
|
|
desc: '上传制度文档、沉淀财务知识、构建面向员工问答与知识管理的统一知识库'
|
2026-04-29 23:35:56 +08:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'audit',
|
2026-05-05 22:35:38 +08:00
|
|
|
label: '技能中心',
|
|
|
|
|
navHint: 'Skill 设计与版本配置',
|
|
|
|
|
icon: icons.skill,
|
|
|
|
|
title: '技能中心',
|
|
|
|
|
desc: '统一管理技能的触发规则、提示词结构、输出约束与上线版本'
|
2026-04-29 23:35:56 +08:00
|
|
|
}
|
feat: refactor monolithic App.vue into modular Vue component architecture
- Extract 711-line App.vue into 15+ focused files across 5 directories
- Add data layer (icons, metrics, policies, auditTrail, requests)
- Add composables (useNavigation, useRequests, useChat, useToast)
- Add layout components (SidebarRail, TopBar, FilterBar)
- Add shared components (PanelHead, InfoRow, ToastNotification)
- Add business component (RequestTable) and 5 view components
- Extract global CSS to assets/styles/global.css
- Add start.sh with WSL/Windows cross-platform support
- Add .gitignore for node_modules, dist, and IDE dirs
2026-04-28 17:20:52 +08:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
export function useNavigation() {
|
|
|
|
|
const activeView = ref('overview')
|
|
|
|
|
|
|
|
|
|
const currentView = computed(
|
|
|
|
|
() => navItems.find((item) => item.id === activeView.value) ?? navItems[0]
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
function setView(view) {
|
|
|
|
|
activeView.value = view
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return { activeView, currentView, setView, navItems }
|
|
|
|
|
}
|