Files
syops/frontend/src/app/router/routes/workspace.routes.ts
T

134 lines
5.0 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* app/router/routes/workspace.routes.ts
* 工作台路由表:/workspace 布局壳 + 各业务子页面懒加载。
* 依赖:vue-router;meta.title 存 i18n key(workspace.*),由 guards 解析为 document.title。
* 逻辑:WorkspaceLayout 嵌套应用首页、知识库、排程、反馈等子页;合同付款、立账凭证旧地址重定向到 Chat Agent。
*/
import type { RouteRecordRaw } from 'vue-router';
const contractPaymentChatRedirect = () => import('@/features/contract-payment/views/ContractPaymentChatRedirect.vue');
const voucherCheckChatRedirect = () => import('@/features/voucher-check/views/VoucherCheckChatRedirect.vue');
export const workspaceRoutes: RouteRecordRaw[] = [
{
path: '/workspace',
component: () => import('@/features/workspace/views/WorkspaceLayout.vue'),
meta: { title: 'workspace.title' },
children: [
{ path: '', redirect: '/workspace/applications' },
{
path: 'profile',
name: 'workspace-profile',
component: () => import('@/features/user/views/UserProfilePage.vue'),
meta: { title: 'workspace.nav.profile' },
},
{
path: 'applications',
name: 'workspace-applications',
component: () => import('@/features/workspace/pages/HomePage.vue'),
meta: { workspaceFocus: 'applications' },
},
{
path: 'updates',
name: 'workspace-updates',
component: () => import('@/features/workspace/pages/HomePage.vue'),
meta: { workspaceFocus: 'updates' },
},
{
path: 'knowledge-base',
name: 'workspace-knowledge-base',
component: () => import('@/features/workspace/pages/KnowledgeBasePage.vue'),
meta: { title: 'workspace.nav.knowledgeBase' },
},
{
path: 'knowledge-base/groups/:groupId',
name: 'workspace-knowledge-base-group',
component: () => import('@/features/workspace/pages/KnowledgeBasePage.vue'),
meta: { title: 'workspace.nav.knowledgeBase' },
},
{
path: 'schedule-runs',
name: 'workspace-schedule-runs',
component: () => import('@/features/workspace/pages/ScheduleRunsPage.vue'),
meta: { title: 'workspace.nav.scheduleRuns' },
},
{
path: 'receipt-reports',
name: 'workspace-receipt-reports',
component: () => import('@/features/workspace/pages/ReceiptReportFilesPage.vue'),
meta: { title: 'workspace.nav.receiptReports' },
},
{
path: 'shipping-notice',
redirect: '/workspace/shipping-notice/my-tasks',
},
{
path: 'shipping-notice/customers',
name: 'workspace-shipping-customers',
component: () => import('@/features/shipping-notice/customers/ShippingCustomersPage.vue'),
meta: { title: '货代客户主数据', requiresAdmin: true },
},
{
path: 'shipping-notice/my-tasks',
name: 'workspace-shipping-my-tasks',
component: () => import('@/features/workspace/pages/ShippingMyTasksPage.vue'),
meta: { title: '我的待办' },
},
{
path: 'shipping-notice/tasks/:taskNo?',
name: 'workspace-shipping-tasks',
component: () => import('@/features/workspace/pages/ShippingNoticePage.vue'),
meta: { title: '货代发货任务' },
},
{
path: 'accounting-voucher-check',
name: 'workspace-accounting-voucher-check',
component: voucherCheckChatRedirect,
meta: { title: 'workspace.nav.accountingVoucherCheck' },
},
{
path: 'accounting-voucher-check/runs/:runId',
name: 'workspace-accounting-voucher-check-detail',
component: voucherCheckChatRedirect,
meta: { title: 'workspace.voucherCheck.detailTitle' },
},
{
path: 'contract-payment',
name: 'workspace-contract-payment',
component: contractPaymentChatRedirect,
meta: { title: 'workspace.nav.contractPayment' },
},
{
path: 'contract-payment/review',
name: 'workspace-contract-payment-review',
component: contractPaymentChatRedirect,
meta: { title: 'workspace.nav.contractPaymentReview' },
},
{
path: 'contract-payment/weekly-batches',
name: 'workspace-contract-payment-weekly-batches',
component: contractPaymentChatRedirect,
meta: { title: 'workspace.nav.contractPaymentWeeklyBatches' },
},
{
path: 'contract-payment/contracts/:contractId',
name: 'workspace-contract-payment-detail',
component: contractPaymentChatRedirect,
meta: { title: 'workspace.nav.contractPayment' },
},
{
path: 'feedback',
name: 'workspace-feedback',
component: () => import('@/features/workspace/pages/FeedbackPage.vue'),
meta: { title: 'workspace.nav.feedback' },
},
{
path: 'history',
name: 'workspace-history',
component: () => import('@/features/chat/history/HistoryPage.vue'),
meta: { title: 'workspace.routes.history' },
},
],
},
];