492 lines
14 KiB
TypeScript
492 lines
14 KiB
TypeScript
import type { App } from 'vue'
|
|
import { createRouter, createWebHashHistory, type RouteRecordRaw } from 'vue-router'
|
|
|
|
export const Layout = () => import('@/layouts/index.vue')
|
|
|
|
// 静态路由
|
|
export const constantRoutes: RouteRecordRaw[] = [
|
|
{
|
|
path: '/login',
|
|
component: () => import('@/views/login/index.vue'),
|
|
meta: { hidden: true }
|
|
},
|
|
{
|
|
path: '/',
|
|
name: '/',
|
|
component: Layout,
|
|
redirect: '/boos/boosAccountManagement',
|
|
children: [
|
|
// {
|
|
// path: 'dashboard',
|
|
// component: () => import('@/views/dashboard/index.vue'),
|
|
// // 用于 keep-alive 功能,需要与 SFC 中自动推导或显式声明的组件名称一致
|
|
// // 参考文档: https://cn.vuejs.org/guide/built-ins/keep-alive.html#include-exclude
|
|
// name: 'Dashboard',
|
|
// meta: {
|
|
// title: 'dashboard',
|
|
// icon: 'homepage',
|
|
// affix: true,
|
|
// keepAlive: true
|
|
// }
|
|
// },
|
|
{
|
|
path: '401',
|
|
component: () => import('@/views/error/401.vue'),
|
|
meta: { hidden: true }
|
|
},
|
|
{
|
|
path: '404',
|
|
component: () => import('@/views/error/404.vue'),
|
|
meta: { hidden: true }
|
|
}
|
|
]
|
|
},
|
|
// 人员管理模块
|
|
// {
|
|
// path: '/personnel',
|
|
// component: Layout,
|
|
// name: 'Personnel',
|
|
// meta: {
|
|
// title: '人员管理',
|
|
// icon: 'setting',
|
|
// alwaysShow: true,
|
|
// permissionIdentifier: 'Personnel'
|
|
// },
|
|
// children: [
|
|
// {
|
|
// path: 'user',
|
|
// name: 'PersonnelUser',
|
|
// component: () => import('@/views/calibration/personnelManagement/index.vue'),
|
|
// meta: {
|
|
// title: '人事管理',
|
|
// permissionIdentifier: 'Personnel:PersonnelUser:view'
|
|
// }
|
|
// },
|
|
// {
|
|
// path: 'department',
|
|
// name: 'Department',
|
|
// component: () => import('@/views/calibration/department/index.vue'),
|
|
// meta: {
|
|
// title: '部门管理',
|
|
// permissionIdentifier: 'Personnel:Department:view'
|
|
// }
|
|
// },
|
|
// {
|
|
// path: 'roleManagement',
|
|
// name: 'RoleManagement',
|
|
// component: () => import('@/views/calibration/roleManagement/index.vue'),
|
|
// meta: {
|
|
// title: '角色管理',
|
|
// permissionIdentifier: 'Personnel:RoleManagement:view'
|
|
// }
|
|
// },
|
|
// {
|
|
// path: 'teamManagement',
|
|
// name: 'TeamManagement',
|
|
// component: () => import('@/views/calibration/teamManagement/index.vue'),
|
|
// meta: {
|
|
// title: '团队管理',
|
|
// permissionIdentifier: 'Personnel:TeamManagement:view'
|
|
// }
|
|
// },
|
|
// {
|
|
// path: 'permissionManagement',
|
|
// name: 'PermissionManagement',
|
|
// component: () => import('@/views/calibration/permissionManagement/index.vue'),
|
|
// meta: {
|
|
// title: '权限管理',
|
|
// permissionIdentifier: 'Personnel:PermissionManagement:view'
|
|
// }
|
|
// }
|
|
// ]
|
|
// },
|
|
// // 财务管理模块
|
|
// {
|
|
// path: '/finance',
|
|
// component: Layout,
|
|
// name: 'Finance',
|
|
// meta: {
|
|
// title: '财务管理',
|
|
// icon: 'setting',
|
|
// alwaysShow: true,
|
|
// permissionIdentifier: 'Finance'
|
|
// },
|
|
// children: [
|
|
// {
|
|
// path: 'onboardingRegistration',
|
|
// name: 'OnboardingRegistration',
|
|
// component: () => import('@/views/calibration/onboardingRegistration/index.vue'),
|
|
// meta: {
|
|
// title: '入职财务登记',
|
|
// permissionIdentifier: 'Finance:OnboardingRegistration:view'
|
|
// }
|
|
// },
|
|
// {
|
|
// path: 'departure',
|
|
// name: 'Departure',
|
|
// component: () => import('@/views/calibration/departureFinancialRegistration/index.vue'),
|
|
// meta: {
|
|
// title: '离职财务登记',
|
|
// permissionIdentifier: 'Finance:Departure:view'
|
|
// }
|
|
// },
|
|
// {
|
|
// path: 'invoiceApplication',
|
|
// name: 'InvoiceApplication',
|
|
// component: () => import('@/views/calibration/invoiceApplication/index.vue'),
|
|
// meta: {
|
|
// title: '开票申请',
|
|
// permissionIdentifier: 'Finance:InvoiceApplication:view'
|
|
// }
|
|
// },
|
|
// {
|
|
// path: 'revenueRecognition',
|
|
// name: 'RevenueRecognition',
|
|
// component: () => import('@/views/calibration/revenueRecognition/index.vue'),
|
|
// meta: {
|
|
// title: '收入确认',
|
|
// permissionIdentifier: 'Finance:RevenueRecognition:view'
|
|
// }
|
|
// },
|
|
// {
|
|
// path: 'accountAdjustmentApplication',
|
|
// name: 'AccountAdjustmentApplication',
|
|
// component: () => import('@/views/calibration/accountAdjustmentApplication/index.vue'),
|
|
// meta: {
|
|
// title: '调账申请',
|
|
// permissionIdentifier: 'Finance:AccountAdjustmentApplication:view'
|
|
// }
|
|
// },
|
|
// {
|
|
// path: 'paymentApplicationForm',
|
|
// name: 'PaymentApplicationForm',
|
|
// component: () => import('@/views/calibration/paymentApplicationForm/index.vue'),
|
|
// meta: {
|
|
// title: '付款申请单',
|
|
// permissionIdentifier: 'Finance:PaymentApplicationForm:view'
|
|
// }
|
|
// },
|
|
// {
|
|
// path: 'reimbursement',
|
|
// name: 'Reimbursement',
|
|
// component: () => import('@/views/calibration/reimbursement/index.vue'),
|
|
// meta: {
|
|
// title: '报销',
|
|
// permissionIdentifier: 'Finance:Reimbursement:view'
|
|
// }
|
|
// },
|
|
// {
|
|
// path: 'salaryBonusAdjustment',
|
|
// name: 'SalaryBonusAdjustment',
|
|
// component: () => import('@/views/calibration/salaryBonusAdjustment/index.vue'),
|
|
// meta: {
|
|
// title: '工资/奖金变更',
|
|
// permissionIdentifier: 'Finance:SalaryBonusAdjustment:view'
|
|
// }
|
|
// }
|
|
// ]
|
|
// },
|
|
// // 业务管理模块
|
|
// {
|
|
// path: '/business',
|
|
// component: Layout,
|
|
// name: 'Business',
|
|
// meta: {
|
|
// title: '业务管理',
|
|
// icon: 'setting',
|
|
// alwaysShow: true,
|
|
// permissionIdentifier: 'Business'
|
|
// },
|
|
// children: [
|
|
// {
|
|
// path: 'conflictOfInterestSearch',
|
|
// name: 'ConflictOfInterestSearch',
|
|
// component: () =>
|
|
// import('@/views/calibration/businessSystem/conflictOfInterestSearch/index.vue'),
|
|
// meta: {
|
|
// title: '利益冲突检索',
|
|
// permissionIdentifier: 'Business:ConflictOfInterestSearch:view'
|
|
// }
|
|
// },
|
|
// {
|
|
// path: 'preRegistration',
|
|
// name: 'PreRegistration',
|
|
// component: () => import('@/views/calibration/businessSystem/preRegistration/index.vue'),
|
|
// meta: {
|
|
// title: '预立案登记',
|
|
// permissionIdentifier: 'Business:PreRegistration:view'
|
|
// }
|
|
// },
|
|
// {
|
|
// path: 'bidRegistration',
|
|
// name: 'BidRegistration',
|
|
// component: () => import('@/views/calibration/businessSystem/bidRegistration/index.vue'),
|
|
// meta: {
|
|
// title: '投标登记',
|
|
// permissionIdentifier: 'Business:BidRegistration:view'
|
|
// }
|
|
// },
|
|
// {
|
|
// path: 'projectRegistration',
|
|
// name: 'ProjectRegistration',
|
|
// component: () => import('@/views/calibration/businessSystem/projectRegistration/index.vue'),
|
|
// meta: {
|
|
// title: '立项登记',
|
|
// permissionIdentifier: 'Business:ProjectRegistration:view'
|
|
// }
|
|
// }
|
|
// ]
|
|
// },
|
|
// // 案件管理模块
|
|
// {
|
|
// path: '/case',
|
|
// component: Layout,
|
|
// name: 'Case',
|
|
// meta: {
|
|
// title: '案件管理',
|
|
// icon: 'setting',
|
|
// permissionIdentifier: 'Case'
|
|
// },
|
|
// children: [
|
|
// {
|
|
// path: 'caseManagement',
|
|
// name: 'CaseManagement',
|
|
// component: () => import('@/views/calibration/caseManagement/index.vue'),
|
|
// meta: {
|
|
// title: '案件管理',
|
|
// permissionIdentifier: 'Case:CaseManagement:view'
|
|
// }
|
|
// },
|
|
// {
|
|
// path: 'caseLabel',
|
|
// name: 'CaseLabel',
|
|
// component: () => import('@/views/calibration/caseLabel/index.vue'),
|
|
// meta: {
|
|
// title: '案件标签',
|
|
// permissionIdentifier: 'Case:CaseLabel:view'
|
|
// }
|
|
// }
|
|
// ]
|
|
// },
|
|
{
|
|
path: '/boos',
|
|
name: 'Boos',
|
|
component: Layout,
|
|
meta: {
|
|
title: 'BOSS账号管理',
|
|
icon: 'setting'
|
|
},
|
|
children: [
|
|
{
|
|
path: 'boosAccountManagement',
|
|
name: 'BoosAccountManagement',
|
|
component: () => import('@/views/BoosAccountManagement/index.vue'),
|
|
meta: {
|
|
title: 'BOSS账号管理'
|
|
}
|
|
}
|
|
]
|
|
},
|
|
// {
|
|
// path: '/task',
|
|
// name: 'Task',
|
|
// component: Layout,
|
|
// meta: {
|
|
// title: '任务管理',
|
|
// icon: 'setting'
|
|
// },
|
|
// children: [
|
|
// {
|
|
// path: 'taskManagement',
|
|
// name: 'TaskManagement',
|
|
// component: () => import('@/views/TaskManagement/index.vue'),
|
|
// meta: {
|
|
// title: '任务管理'
|
|
// }
|
|
// }
|
|
// ]
|
|
// },
|
|
{
|
|
path: '/contact',
|
|
name: 'Contact',
|
|
component: Layout,
|
|
meta: {
|
|
title: '联系方式',
|
|
icon: 'setting'
|
|
},
|
|
children: [
|
|
{
|
|
path: 'contactInformation',
|
|
name: 'ContactInformation',
|
|
component: () => import('@/views/ContactInformation/index.vue'),
|
|
meta: {
|
|
title: '联系方式'
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: '/data',
|
|
name: 'Data',
|
|
component: Layout,
|
|
meta: {
|
|
title: '数据统计',
|
|
icon: 'setting'
|
|
},
|
|
children: [
|
|
{
|
|
path: 'dataStatistics',
|
|
name: 'DataStatistics',
|
|
component: () => import('@/views/DataStatistics/index.vue'),
|
|
meta: {
|
|
title: '数据统计'
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: '/reconciliation',
|
|
name: 'Reconciliation',
|
|
component: Layout,
|
|
meta: {
|
|
title: '复聊管理',
|
|
icon: 'setting'
|
|
},
|
|
children: [
|
|
{
|
|
path: 'reconciliationManagement',
|
|
name: 'ReconciliationManagement',
|
|
component: () => import('@/views/ReconciliationManagement/index.vue'),
|
|
meta: {
|
|
title: '复聊管理'
|
|
}
|
|
}
|
|
]
|
|
}
|
|
// 注册平台登记
|
|
// {
|
|
// path: '/filingRegistration',
|
|
// name: 'FilingRegistration',
|
|
// component: Layout,
|
|
// meta: {
|
|
// title: '注册平台登记',
|
|
// icon: 'setting',
|
|
// permissionIdentifier: 'FilingRegistration'
|
|
// },
|
|
// children: [
|
|
// {
|
|
// path: 'registrationPlatform',
|
|
// name: 'RegistrationPlatform',
|
|
// component: () => import('@/views/calibration/registrationPlatform/index.vue'),
|
|
// meta: {
|
|
// title: '注册平台登记',
|
|
// permissionIdentifier: 'FilingRegistration:RegistrationPlatform:view'
|
|
// }
|
|
// }
|
|
// ]
|
|
// },
|
|
// // 公告
|
|
// {
|
|
// path: '/notice',
|
|
// name: 'Notice',
|
|
// component: Layout,
|
|
// meta: {
|
|
// title: '公告管理',
|
|
// icon: 'setting',
|
|
// permissionIdentifier: 'Notice'
|
|
// },
|
|
// children: [
|
|
// {
|
|
// path: 'announcementManagement',
|
|
// name: 'AnnouncementManagement',
|
|
// component: () => import('@/views/calibration/announcementManagement/index.vue'),
|
|
// meta: {
|
|
// title: '公告管理',
|
|
// permissionIdentifier: 'Notice:AnnouncementManagement:view'
|
|
// }
|
|
// }
|
|
// ]
|
|
// },
|
|
// // 律所标准文件
|
|
// {
|
|
// path: '/lawyer-file',
|
|
// name: 'LawyerFile',
|
|
// component: Layout,
|
|
// meta: {
|
|
// title: '律所标准文件',
|
|
// icon: 'setting',
|
|
// permissionIdentifier: 'LawyerFile'
|
|
// },
|
|
// children: [
|
|
// {
|
|
// path: 'lawFirmStandardDocuments',
|
|
// name: 'LawFirmStandardDocuments',
|
|
// component: () => import('@/views/calibration/lawFirmStandardDocuments/index.vue'),
|
|
// meta: {
|
|
// title: '律所标准文件',
|
|
// permissionIdentifier: 'LawyerFile:LawFirmStandardDocuments:view'
|
|
// }
|
|
// }
|
|
// ]
|
|
// },
|
|
// {
|
|
// path: '/lmportantSchedule',
|
|
// name: 'LmportantSchedule',
|
|
// component: Layout,
|
|
// meta: {
|
|
// title: '日程管理',
|
|
// icon: 'setting',
|
|
// permissionIdentifier: 'LmportantSchedule'
|
|
// },
|
|
// children: [
|
|
// {
|
|
// path: 'lmportantScheduleManagement',
|
|
// name: 'LmportantScheduleManagement',
|
|
// component: () => import('@/views/calibration/lmportantScheduleManagement/index.vue'),
|
|
// meta: {
|
|
// title: '日程管理',
|
|
// permissionIdentifier: 'LmportantSchedule:LmportantScheduleManagement:view'
|
|
// }
|
|
// }
|
|
// ]
|
|
// },
|
|
// {
|
|
// path: '/system',
|
|
// name: 'System',
|
|
// component: Layout,
|
|
// meta: {
|
|
// title: '制度管理',
|
|
// icon: 'setting',
|
|
// permissionIdentifier: 'System'
|
|
// },
|
|
// children: [
|
|
// {
|
|
// path: 'systemManagement',
|
|
// name: 'SystemManagement',
|
|
// component: () => import('@/views/calibration/systemManagement/index.vue'),
|
|
// meta: {
|
|
// title: '制度管理',
|
|
// permissionIdentifier: 'System:SystemManagement:view'
|
|
// }
|
|
// }
|
|
// ]
|
|
// }
|
|
]
|
|
|
|
/**
|
|
* 创建路由
|
|
*/
|
|
const router = createRouter({
|
|
history: createWebHashHistory(),
|
|
routes: constantRoutes,
|
|
// 刷新时,滚动条位置还原
|
|
scrollBehavior: () => ({ left: 0, top: 0 })
|
|
})
|
|
|
|
// 全局注册 router
|
|
export function setupRouter(app: App<Element>) {
|
|
app.use(router)
|
|
}
|
|
|
|
export default router
|