import { createRouter, createWebHashHistory } from 'vue-router'
const routes = [
    {
        path: '/login',
        name: 'LoginPage',
        meta: {
            title: '登录页',
        },
        component: () =>
            import(
                '../views/Login.vue'
            ),
    },
    {
        path: '/',
        name: 'homePage',
        meta: {
            title: '首页',
        },
        component: () =>
            import(
                '../views/homePage.vue'
            ),
        children: [
            {
                path: '/home',
                name: 'homePage',
                meta: {
                    title: '首页',
                },
                component: () =>
                    import(
                        '../components/gatewayPage.vue'
                    ),
            },
            {
                path: '/taskCenter',
                name: 'taskCenter',
                meta: {
                    title: '任务中心',
                },
                component: () =>
                    import(
                        '../components/taskCenter/taskCenterPage.vue'
                    ),
            },
            {
                path: '/assessment',
                name: 'assessment',
                meta: {
                    title: '考评业务',
                },
                children: [
                    {
                        path: '/assessment/evaluationStart',
                        name: 'evaluationStart',
                        meta: {
                            title: '考评目标启动',
                        },
                        component: () =>
                            import(
                                '../components/assessment/evaluationStartPage.vue'
                            ),
                    },
                    {
                        path: '/assessment/evaluationMonth',
                        name: 'evaluationMonth',
                        meta: {
                            title: '月度单位考评',
                        },
                        component: () =>
                            import(
                                '../components/assessment/evaluationMonthPage.vue'
                            ),
                    },
                    {
                        path: '/assessment/evaluationQuarter',
                        name: 'evaluationQuarter',
                        meta: {
                            title: '季度单位考评',
                        },
                        component: () =>
                            import(
                                '../components/assessment/evaluationQuarterPage.vue'
                            ),
                    },
                    {
                        path: '/assessment/evaluationYear',
                        name: 'evaluationYear',
                        meta: {
                            title: '年度目标考评',
                        },
                        component: () =>
                            import(
                                '../components/assessment/evaluationYearPage.vue'
                            ),
                    },
                    {
                        path: '/assessment/evaluationReport',
                        name: 'evaluationReport',
                        meta: {
                            title: '考评报告',
                        },
                        component: () =>
                            import(
                                '../components/assessment/evaluationReportPage.vue'
                            ),
                    },
                ]
            },
            {
                path: '/evaluationSystem',
                name: 'benchmark',
                meta: {
                    title: '考评体系配置',
                },
                children: [
                    {
                        path: '/evaluationSystem/evaluationIndex',
                        name: 'evaluationIndex',
                        meta: {
                            title: '考评指标管理',
                        },
                        component: () =>
                            import(
                                '../components/evaluationSystem/evaluationIndexPage.vue'
                            ),
                    },
                    {
                        path: '/evaluationSystem/evaluationRules',
                        name: 'evaluationRules',
                        meta: {
                            title: '考评规则配置',
                        },
                        component: () =>
                            import(
                                '../components/evaluationSystem/evaluationRulesPage.vue'
                            ),
                    },
                    {
                        path: '/evaluationSystem/company',
                        name: 'company',
                        meta: {
                            title: '考评单位配置',
                        },
                        component: () =>
                            import(
                                '../components/evaluationSystem/evaluationCompanyPage.vue'
                            ),
                    },
                    {
                        path: '/evaluationSystem/department',
                        name: 'department',
                        meta: {
                            title: '考评部门配置',
                        },
                        component: () =>
                            import(
                                '../components/evaluationSystem/evaluationDepartmentPage.vue'
                            ),
                    },
                    {
                        path: '/evaluationSystem/personnel',
                        name: 'personnel',
                        meta: {
                            title: '考评人员配置',
                        },
                        component: () =>
                            import(
                                '../components/evaluationSystem/evaluationPersonnelPage.vue'
                            ),
                    },
                    {
                        path: '/evaluationSystem/achievementK',
                        name: 'achievementK',
                        meta: {
                            title: '业绩考核系数配置',
                        },
                        component: () =>
                            import(
                                '../components/evaluationSystem/achievementKPage.vue'
                            ),
                    },
                    {
                        path: '/evaluationSystem/partyBuildingK',
                        name: 'partyBuildingK',
                        meta: {
                            title: '党建考核系数配置',
                        },
                        component: () =>
                            import(
                                '../components/evaluationSystem/partyBuildingKPage.vue'
                            ),
                    }
                ]
            },
            {
                path: '/knowledge',
                name: 'knowledge',
                meta: {
                    title: '知识库',
                },
                children: [
                    {
                        path: '/knowledgePage/scoringRules',
                        name: 'scoringRules',
                        meta: {
                            title: '考评得分规则',
                        },
                        component: () =>
                            import(
                                '../components/knowledgePage/scoringRulesPage.vue'
                            ),
                    }
                ]
            },
        ]
    },
]

const router = createRouter({
    history: createWebHashHistory(''),
    // history: '',
    routes,
})

export default router